Zynq(zedboard) Linux Software Resetting Programmable Logic alone

Hi Community,
I am working with the Digilent Zedboard .
I am trying to software reset the whole programmable logic(which uses FCLK_RESET0_N) from Linux.
I found that we can do it through the SLCR(System Level control Registers) and found slcr.c Platform driver(in linux-xlnx/arch/arm/mach-zynq) precompiled in the kernel which has xslcr_reset_periph() function to reset a peripheral.
I can see an entry  for the slcr in the device tree and also see it in
/sys/class/xslcr_reset/fpga0_out
 /sys/devices/amba.0/f8000000.ps7-slcr/xslcr_reset/fpga0_out/
I dont seem to have an entry in /dev  though
How do I use this driver to perform a reset?  Can I do it with a simple 'echo ' as shown for the power management driver in http://www.wiki.xilinx.com/Zynq+Power+Management ?
echo enabled > /sys/devices/amba.0/e0001000.serial/tty/ttyPS0/power
echo (rising|falling|both) > /sys/class/gpio/gpio<n>/edge
or Do I need to write a character device driver that communicates to the platform driver for this? ..Thanks in advance !

I agree with this completely.  The functionality is there, and it seems silly to burn a GPIO pin to recreate it.
The base address to the SLCRs (according to the slcr definition in my devicetree, check yours for 'ps7-slcr') is 0xf80000.  According to slcr.c, the offset for the FPGA reset lines 0x240.  This gives you some options. 
Here are 3 ways to do what you'd like:
1) /sbin/devmem 0xf8000240 32 0xF // resets ALL lines, 0x1 is RESET0, 0x2 RESET1 0x3 RESET0+RESET1
Be sure to write 0xf8000240 to 0x0 to bring it out of reset!
2) mmap /dev/mem and write it in C
3) (untested) change the devicetree "compatible" property to include "uio_pdrv_genirq" with a fake IRQ or modify uio_pdrv.c to read the compatible property.  In either case, this lets you use the UIO system to access these registers from userspace (see http://fpgacpu.wordpress.com/2013/05/28/how-to-design-and-access-a-memory-mapped-device-part-two/).
Keep in mind that, at least with 14.7 kernel, you DO NOT need to recompile your kernel unless you modify uio_pdrv.c  If you use the "fake" IRQ solution, it already comes in the stock kernel.
Hope this helps!  
 

Similar Messages

  • Is there any way to create an installer for Mac OS and Linux OS once a stand alone application is created?

    Is there any way to create an installer for Mac OS and Linux OS once a stand alone application is created?  I have created an executable application that I want to distribute to Mac and Linux users (different applications were created in the respective OS).  I was wondering if there is any way to create an installer?  I think there probably isn't...  If the user were to simply download the Labview Run-time Engine from ni.com would they be able to run the application or is it more complicated than that?
    Thanks so much for your time.

    I think Shane tried to say, that it is on the Mac OS X installation DVD, NOT the LabVIEW for Mac OS X installation medium. And that could very well have changed in recent Mac OS X versions as well. They used to have Xcode on it too, but that seems gone as well.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Installing grub2 1.99rc1 on Linux Software RAID (/dev/md[0-x])

    Hello!
    In the last days I tried to install Archlinux x64 on my server. This server consists of 4 SATA drives. I'm using Linux software Raid with the following configuration:
    mdadm --create --verbose /dev/md0 --auto=yes --level=10 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
    mdadm --create --verbose /dev/md1 --auto=yes --level=10 --raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
    mdadm --create --verbose /dev/md2 --auto=yes --level=0 --raid-devices=4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
    md0 --> / including /boot
    md1 --> /data (my storage partiton)
    md2 --> my swap partion
    In the last step of the installer I don't installed grub and leave the installer without installing a bootloader.
    I mounted the /dev folder to /mnt/dev and chrooted in my new system:
    chroot /mnt bash
    In my new system I installed the new grub2 bootloader with:
    pacman -S grub2-bios
    In the next step I tried to install the bootloader to the MBR with the following command:
    grub_bios-install --boot-directory=/boot --no-floppy --recheck /dev/md0
    But I get the following error:
    /sbin/grub-probe: error: no such disk.
    Auto-detection of a filesystem of /dev/md0 failed.
    Please report this together with the output of "/sbin/grub-probe --device-map="/boot/grub/device.map" --target=fs -v /boot/grub" to <[email protected]>
    I also tried to install the grub2 directly on my discs with the following command:
    grub_bios-install --boot-directory=/boot --no-floppy --recheck /dev/sda
    But the error is the same as above.
    Following the instruction of the error message I executed the following command:
    /sbin/grub-probe --device-map="/boot/grub/device.map
    I get a large debug output:
    /sbin/grub-probe: info: scanning hd3,msdos2 for LVM.
    /sbin/grub-probe: info: the size of hd3 is 3907029168.
    /sbin/grub-probe: info: no LVM signature found
    /sbin/grub-probe: info: scanning hd3,msdos1 for LVM.
    /sbin/grub-probe: info: the size of hd3 is 3907029168.
    /sbin/grub-probe: info: no LVM signature found
    /sbin/grub-probe: info: scanning hd4 for LVM.
    /sbin/grub-probe: info: the size of hd4 is 2068992.
    /sbin/grub-probe: info: no LVM signature found
    /sbin/grub-probe: info: the size of hd4 is 2068992.
    /sbin/grub-probe: info: scanning hd4,msdos1 for LVM.
    /sbin/grub-probe: info: the size of hd4 is 2068992.
    /sbin/grub-probe: info: no LVM signature found
    /sbin/grub-probe: info: changing current directory to /dev.
    /sbin/grub-probe: info: opening md0.
    /sbin/grub-probe: error: no such disk.
    There is a tutorial for installing grub2 at ArchLinux in the wiki:
    https://wiki.archlinux.org/index.php/Grub2
    But I can't find any solution for my problem.
    Does anybody know a solution for this problem?
    Thanks for help
    Best regards,
    Flasher
    Last edited by Flasher (2011-03-03 20:13:13)

    hbswn wrote:Maybe it cannot handle the new mdadm format. Here the other partitions have version 0.90. Only the failing md0 has version 1.2:
    I'm sure it is the cause of the problem. But not new format. The old one (0.90) is incompatible with grub2.
    I hit the same problem and today I managed to fix it.
    What I did: I copied /boot to tmp directory, destroyed /dev/md0 (my /boot) with metadata 0.90, created new /dev/md0 (metadata 1.2), copied back /boot content.
    After that, grub_bios-install /dev/sda && grub_bios-install /dev/sdb finished without any errors.

  • HT2434 How do I get my custom linux software to display at 1280x1024 on my iMac under Parallels? and stay that way when I reboot?

    How do I get my custom linux software to display at 1280x1024 on my iMac under Parallels? and stay that way when I reboot?

    Interesting. Comes with? you didn't have either before? Paragon is commercial and is now v. 10.0, they were the only one keeping updated and was supporting 10.7.4. I would not enable more than one.
    For writing to HFS Paragon has theirs but probably give the nod to MacDrive there.
    I never do an upgrade to a new OS over the old system, I backup (clone) and format the drive with the new OS and do the install so whatever is there I know is clean and also to keep from carrying around leftovers from years and systems past.
    I would assme Paragon is limited. Try their site and knowledge base?
    MacDrive
    http://www.mediafour.com/updates/macdrive
    Paragon HFS
    http://www.paragon-software.com/home/hfs-windows/
    Paragon NTFS
    http://www.macupdate.com/app/mac/26288/ntfs-for-mac-os-x
    http://www.paragon-software.com/home/ntfs-mac/

  • Best software or programme? : I have designs for cards done on a particular app, I need to import somehow typed text (old type writer font) to beside the image? Is something like illustrator or photoshop the best? For card design to then send to printers

    Hello
    I have started designing cards etc
    I have been drawing items on two particular apps on my iPad, but I need to import some old school type writter style text alongside the image.
    What is the best software or programme to do this?
    I don't mind buying some good software
    Basically I would like something in could draw with a stylus on ( or import these images from another app that I can do this on)
    Then add bespoke text beside the image
    Play about with positions, colours sizes etc
    Has anyone tried any of the Wacom products??
    These would all then be sent to printing company to print
    Thanks for your help!

    Hello
    I have started designing cards etc
    I have been drawing items on two particular apps on my iPad, but I need to import some old school type writter style text alongside the image.
    What is the best software or programme to do this?
    I don't mind buying some good software
    Basically I would like something in could draw with a stylus on ( or import these images from another app that I can do this on)
    Then add bespoke text beside the image
    Play about with positions, colours sizes etc
    Has anyone tried any of the Wacom products??
    These would all then be sent to printing company to print
    Thanks for your help!

  • Need Oracle 10.2.0.1.0 Linux software

    I would like to down load Oracle 10.2.0.1.0 Linux software. Where would it be available?

    plz donot post duplicate close this one https://forums.oracle.com/thread/2563999

  • Ata software reset..question

    I get the error ata1 software reset failed (device not ready)  There is a lot of talk
    about this bug all over google.  Reading the gentoo forums it seems it is an error
    with pmp in the kernel which is sata port multiplyer, which allows for daisy chaining sata ports
    like you can with a usb hub.   If you configure the kernel without this support the error goes away.
    So my question is, is there a way to go into the kernel that is installed with installation and do a
    make menuconfig on this kernel?? ( didnt have much time to research this just looking for a quick answer
    im at work )

    No, you'll need to reconfigure and recompile the kernel from ABS.
    http://wiki.archlinux.org/index.php/Ker … n_with_ABS
    Do you know what to change in the config to disable this feature? I have had ata1 software reset + emask timeout problems with a DVD burner and this may be the solution. And it seems there are several using Arch who are having this problem as well.
    Could you post a link to the gentoo thread as well?

  • How do I download software such as Logic Pro 9 on my new MacBook Pro with Retina? It has no disc drive

    How do I download software such as Logic Pro 9 on my new MacBook Pro with Retina? It has no disc drive

    It's available in the App Store as a digital download. You do not need a disc to install software.

  • Can I use Mainstage software instruments in Logic Express 9?

    I would like to add more software (MIDI) instruments to Logic Express 9. I understand Mainstage comes with what used to be called Jam Packs. Can I use those Mainstage software instruments in Logic Express 9? If not, where do i find additional software instruments?

    All JamPacks: yes, no problem.
    Actual instruments, effects, like Space Designer: no, they are part of the application code (MainStage or Logic Pro)

  • RFID Reader,optional with programmable logic controllers to streamline RFID

    RFID is used to automate the process of capturing batch production information for lot tracking. This eliminates the manual scanning typically required with a bar code solution through the use of container and location-based RFID tags interacting with readers on material-handling equipment.
    RFID Reader(interrogator) is a vital RFID system component. A transmitter/receiver that reads the contents of RFID tags in the vicinity. Also called an "RFID interrogator." The maximum distance between the reader's antenna and the tag vary, depending on application.
    In addition, readers can be fitted with an additional interface that converts the radio waves returned from the RFID tag into a form that can then be passed on to another system, like a computer or any programmable logic controller.
    Generally speaking, RFID readers can be divided into two kinds by data collection features. One what is called smart RFID reader with advanced data collection features u2014 such as filtering of redundant tag data, is capable of controlling peripheral devices based on data read from the tag. Another what is called simple RFID reader with a lower price, is need to attach to a separate local server or a programmable logic controller for local decision making.
    The DAILY RFID(company name) series includes RFID readers for almost any application. For a full catalog of DAILY RFID durable RFID Readers and tags, kindly visit http://www.rfid-in-china.com/products_687_1.html.
    Edited by: Jack Pan on Sep 26, 2008 3:16 PM

    Problem is I wasn't compiling libnfc with my code. I've been able to use Visual Studio to compile a C file that uses libnfc (and libusb), but when I adapt the code to work with JNI, changing the main to:
    JNIEXPORT jstring JNICALL Java_libnfc_Main_nativeTagID(JNIEnv *env, jobject obj) (for example)
    I'm getting an error related to the libNFCNative.h. This file is supposed to aid in the creation of the dll file that the Java then uses to call functions from C.
    The .h file has:
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class libnfc_Main */
    #ifndef _Included_libnfc_Main
    #define _Included_libnfc_Main
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     libnfc_Main
    * Method:    nativeTagID
    * Signature: ()Ljava/lang/String;
    JNIEXPORT jstring JNICALL Java_libnfc_Main_nativeTagID
     (JNIEnv *, jobject);
    #ifdef __cplusplus
    #endif
    #endifThe error is as follows:
    ------ Build started: Project: nfc-list, Configuration: Debug Win32 ------
    Linking...
      Creating library C:\Documents and Settings\Augusto\Desktop\libnfc-1.2.1-vs2005\vc-project\Debug\libNFCNative.lib and object C:\Documents and Settings\Augusto\Desktop\libnfc-1.2.1-vs2005\vc-project\Debug\libNFCNative.exp
    MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
    C:\Documents and Settings\Augusto\Desktop\libnfc-1.2.1-vs2005\vc-project\Debug\libNFCNative.dll : fatal error LNK1120: 1 unresolved externalsI've tried SWIG instead of JNI, but I'm having the exactly same error in Visual Studio. Anyone knows the reason for this error?

  • After having upgraded my iPhone 4S to iOS 7.0.2, I can not turn on Wi-Fi or Bluetooth. After trying various tricks I found via online forums such as software reset, enable Airplane mode, and resetting the network settings, I have now also completed reset

    After having upgraded my iPhone 4S to iOS 7.0.2, I can not turn on Wi-Fi or Bluetooth. After trying various tricks I found via online forums such as software reset, enable Airplane mode, and resetting the network settings, I have now also completed reset of the phone WITHOUT success. Is there something more to it? If not learn hardly be any more iPhone for me. Really disappointed. Grateful for help!

    If you have tried all of the steps in this support document http://support.apple.com/kb/TS1559 and have completed all of the user troubleshooting, restart, reset, restore from backup, restore as new, then make an appointment with the Apple store to have the hardware checked.

  • Restoring apps to iphone 4 after software reset

    How do I restore my apps and music after I do a software reset on my iPhone 4.  All the other data is there but the music and apps.  Where can i get those back from?  They did not appear after I restored.

    Are your apps in itunes on your computer?
    If not, then they cannot be restored as you do not have them on your computer.
    Apps/music are not part of the backup that itunes performs when syncing.

  • Oralce linux software

    We have downloaded the Oracle Linux Software from edelivery web site and burned it on CDs. from Disk1-Disk6
    We inserted the Disk1 CD and rebooted the machine and selected to boot from CD/DVD rom. But still the Disk1 CD is not didecting as bootable CD.
    What is right way of ISO image make to bootable CD. Please help.
    Thanks in advance....

    An ISO image needs to be downloaded and that needs to be burned to CD/DVD.
    You cannot download zip/tar archives, burn these to disk, and expect that to boot the platform when the CD/DVD is used.
    So exactly what did you download (file format)? How did you burn it to CD/DVD?

  • Hi, My problem is I cannot connect my apple tv to my account, the user name and password are definitely correct, I upgraded the software, reset the device, but no chance. What should I do?

    Hi, My problem is I cannot connect my apple tv to my account, the user name and password are definitely correct, I upgraded the software, reset the device, but no chance. What should I do?

    Try this:
    Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.
    If that doesn't work then reset the device by going to settings/general/reset/reset all settings  (or for network connection issues 'reset network settings').
    (no media or data will be deleted from the device, this will only take a minute).

  • If I upgrade to Snow Leopard, will I have to re-install software such as Logic Studio?

    If I upgrade to Snow Leopard, will I have to re-install software such as Logic Studio? Do I lose EVRYTHING?

    You normally will not lose anything, but you may have to reinstall some applications since some applications place files in locations that may not be carried over to the new installation. Logic Studio may well fall into this category, though I don't know for sure. You should confirm compatability of your applications with Snow Leopard before you upgrade, since some applications may require upgrading to work properly (or at all). You should also have a good backup - I usually suggest making a complete clone of your current hard drive to an external drive - before attempting the upgrade.
    Regards.

Maybe you are looking for

  • ITunes 7 and nano: can't copy files

    I don't know whats wrong! I updated to iTunes 7 yesterday, and as of today I can no longer copy files to my nano. I go to copy a bunch, and the usage bar at the bottom says that its filling. when it gets to the last file, the usage bar goes back to t

  • Opening pop up window with URL that doesnt show Address Bar

    Hi, I have a requirement where I want to open up a browser window from my Web Dynpro application which points to a URL (Link to a portal KM folder). But the requirement here is that it should not contain any URL address bar !! How do it? Any help/ id

  • Install apps from japan app store

    I currently stay in Singapore and registered my Apple user-id based in Singapore. However if I would like to install some apps (say free apps) from Japan App Store. Is that possible?

  • Sales return invoice based on delivery

    Hi Experts, i have requirement like this. ex: i have raised a return sales order(RE) for 10 items and delivery has has done for 7 items(due to some manual problems).here the invoice is based on order, but here my requirement is invoice is based on re

  • Oracle Alert Doubt

    Hi Gurus Can you please help me out , whether it is possible in oracle alerts. Scenario:- Can we use Images(JPEG) in the Oracle Alerts. Any Help is Highly Aprreciated