Still struggling with Xilinx GPIO...

Guillaume Dargaud dargaud at
Wed May 28 19:51:09 EST 2008

Hi John,

> Try using channel 1. It may be set up where the first channel is 1 and not 
> 0.

Not sure what you mean...

I'm actually not clear how many devices I should have:

$ grep "GPIO.*BASEADDR" 

But depending on the examples I look at, they define either:

crw-rw-rw-    1 root     root      10, 185 May 26 13:49 xgpio
crw-rw-rw-    1 root     root      10, 185 May 26 13:18 xgpio0
crw-rw-rw-    1 root     root      10, 186 May 26 13:18 xgpio1
crw-rw-rw-    1 root     root      10, 187 May 26 13:18 xgpio2

If that is the former, I see the code uses:
And I guess that's what you are refering to, right ?

Putting 1 gives me a working program, but no LED lights up and the buttons 
are always shown at 0.
Putting 0 gives a nice core dump as in my previous msg.
Putting 2 locks up the system.

And... I don't see how the code manages to read/wite all 3 GPIOs with only 
two IOCTL calls. Shouldn't they be 3 different calls using different 
addresses ?!? Argh, this complete lack of documentation in maddening. Not 
everything can be understood from reading the source.

Guillaume Dargaud

More information about the Linuxppc-dev mailing list