[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] GPIO thoughts
Some thoughts on GPIO operation before I forget them.
The IBMGPIO_IN and IBMGPIO_OUT ioctls operate as I would expect:
http://cvs.uclinux.org/cgi-bin/cvsweb.cgi/uClinux-2.4.x/drivers/char/xilinx_gpio/adapter.c?rev=1.2;content-type=text%2Fplain
However, IBMGPIO_TRISTATE uses the MASK field to set the data direction
instead of the data field. That seems counterintuitive to me.
Anyhow, to use the GPIO as outputs--even if the pcore is configured to only
use inputs, the IBMGPIO_TRISTATE ioctl must write out all 0s to set the
current direction.
The first GPIO device is accessed via mach_hearbeat() in
linux-2.4.x/arch/microblaze/platform/uclinux-auto/machine.c It took me a
little while to figure out that this was overriding my GPIO usage. Are
folks out there actively utilizing this heartbeat? I suggest disabling it
by default and letting those that want to use it to enable it. John
Williams: what say you?
Finally, the gpio adapter in the current uclinux tree is much different then
the one in the mainline kernel. Not sure its worth updating right now but
something to be aware of.
Paul
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/