GPIO @ MPC5200

Grant Likely grant.likely at secretlab.ca
Sat Jul 5 00:36:19 EST 2008


On Fri, Jul 04, 2008 at 11:57:14AM +0200, Andre Schwarz wrote:
> Sascha, Grant,
> 
> I'm running on 2.6.26-rc6 with an MPC5200B based system.
> 
> Looks like some (for me) crucial GPIO are touched during boot.
> Is this possible ?
> 
> Of course I have compiled in GPIO-Lib and specified the GPIOs in the dts.
> But no access yet - I'd like to preserve the setup from u-boot...

The GPIO driver only writes to the GPIO registers when a driver actually
requests to use them.  At probe time, the gpio drivers read the current
values from the GPIO registers, so current config should be preserved.

However, the gpiochip_dir hook explicitly sets the output value when it
is called.  It may be that when you are claiming the GPIO line it is
getting set with a default (and wrong) value.

Another possibility; have you verified that it is the GPIO regs getting
clobbered?  Or is port_config getting changed on you?  Which GPIO pins?

g.



More information about the Linuxppc-dev mailing list