Semantics or examples for Xilinx xgpio driver under Linux?

Oct 26, 2006 2 Replies

I'm trying to understand the proper way to use the xgpio driver that comes with the MontaVista kernel. The driver includes adapter.c to look for available gpio devices and map them into the memory space, but doesn't seem to make the ioremap'ed addresses available to the user. Consequently, if I XGpio_Initialize() and then XGpio_SetDataDirection() normally, I get a segmentation fault.



I wasn't able to find much of anything that addressed this, or that showed me how Xilinx and/or MontaVista intended for it to be used. Can anybody point me in the right direction?



(Two comments: 1) The same question applies to any of the Xilinx devices that use the separate adapter.c paradigm. 2) GPIO isn't the specific concern, because I've written a linux driver of my own that does the job just fine, but I'm going to need to extend the concepts to other devices, and am trying to gauge how much to keep and how much to redo from scratch.)


Ah, I see. The functionality is supported through ioctl() and struct ibm_gpio_ioctl_data. A little strange, but okay.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required