This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

GPMC example device driver for an FPGA

Other Parts Discussed in Thread: AM3517

I am writing a device driver for an FPGA connected to the GPMC bus. I am try to adapt the smsc911x device driver for my FPGA device driver. However, the smsc911x is a network device driver and the FPGA is a character driver i believe. I have a skeleton device driver with the init & exit functions which in turn call the platform_driver_register and platform_driver_unregister. However, the probe, remove and shutdown functions that should be called when the driver is registered and unregistered never gets called. I have read some where that i need to edit a board file in arc/arm/mach-omap2/   directory but i don't know what to edit in the board file.  How do i specify the read/write callbacks that will be called back when the user-space program opens the driver for read/write operation. In the smsc911x this is done using an instance of the net device driver framework. Can anyone provide a bit of an insight that could help me. Thanks

  • Hi,

    You must register the device for your driver, please refer to any board file (e.g board-omap3evm.c file) where you will find function "platform_device_register" being called. The most important point you must make sure that, the "name" used in both "platform_device" (in board file) and "platform_driver" (driver file) must be same.

     

    Thanks,

    Vaibhav

  • I’m trying to do (almost) exactly the same: use GPMC to read/write an array of 16 bit-wide, configuration registers located inside an FPGA chip.

    The technology I use is the Sitara AM3517 SoC from TI. My target development board is LogicPD’s eXperimenter board fitted with LogicPD’s AM3517 SOM. The SOM has a NAND flash memory connected to CS0* or (optionally) CS2* select lines. So what I did was to duplicate the initialization code from the NAND chip, but for CS1 instead of CS0/2. All I got so far were ‘device busy’ result code when my module calls the gpmc_cs_write_reg() function. 

    I can’t figure out why: I tried using CS3* and it's reported as busy.  I searched for documents for GPMC ‘howto’ and source docs but the whole library does not seem very well documented. Is there some documentation about gpmc kernel functions? 

    Thanks,

    Yves McDonald