Project

General

Profile

Problem with FPGA reload

Added by Brian Rasmussen about 13 years ago

Hi

I have a minor problem when I reload the FPGA image after the OMAP has booted into Linux. I'm not able to export and toggle GPIO's using the sysfs (sys/class/gpio).

If I boot the complete system like this, it works fine:
1. Boot into Linux
2. Load the fpga image using a Xilinx cable and the FPGA JTAG port.
3. Load the FPGA modules into the kernel ("insmod fpga_ctrl.ko" and "insmod fpga_gpio.ko").
4. Release the FPGA (echo "3" > /sys/bus/fpga/devices/fpga_ctrl/cmd).
5. Export some IO's (echo 200 > /sys/class/gpio/export).
6. I can then toggle gpio200 by writing 0 or 1 to the "value" file.

If I then reload the fpga following this procedure, I can't export gpio's again before rebooting Linux:
1. Unexport the exported gpio's.
2. Stops the FPGA.
3. Unload the kernel modules (If I don't do this, it complains about spurious IRQ's and I get some memory dump on the screen).
4. Reload the FPGA with the Xilinx cable
5. Load the FPGA modules into the kernel again. "dmesg" shows the correct fpga modules (Base and GPIO).
6 If I then try to export gpio's, it will not work. I don't get any errors, but the gpio200 directory doesn't show up.

Any ideas why?

Do I have to reload any other kernel gpio or sysfs drivers?

Best regards.
Brian Rasmussen


Replies (1)

RE: Problem with FPGA reload - Added by Michael Williamson about 13 years ago

I think this is a problem with the unload of the fpga_gpio driver. I am not sure if it is unregistering with the gpiolib layer. I am trying to reproduce the problem here.

-Mike

    (1-1/1)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)