All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Schwarz <andre.schwarz@matrix-vision.de>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-ppc list <linuxppc-dev@ozlabs.org>
Subject: Re: GPIO @ MPC5200
Date: Fri, 04 Jul 2008 17:10:46 +0200	[thread overview]
Message-ID: <486E3D76.5090207@matrix-vision.de> (raw)
In-Reply-To: <20080704143619.GA15751@secretlab.ca>

Grant Likely schrieb:
> 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.
>   

The pin in question is PSC2_4, i.e. a wake-up GPIO.
It is configured as push-pull output and driven high.

Since it has an external pull-down resistor I can't say if it is driven
low or re-configured as an input ...

I removed GPIO Lib and the problem is gone.
I'm not yet using it anyway under linux - they're mainly for system
configuration (setting up muxes etc.).

I'll dig into it when I have some time.

thanks,
Andre






MATRIX VISION GmbH, Talstraße 16, DE-71570 Oppenweiler  - Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschäftsführer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

  reply	other threads:[~2008-07-04 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-04  9:57 GPIO @ MPC5200 Andre Schwarz
2008-07-04 14:36 ` Grant Likely
2008-07-04 15:10   ` Andre Schwarz [this message]
2008-07-04 15:58     ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=486E3D76.5090207@matrix-vision.de \
    --to=andre.schwarz@matrix-vision.de \
    --cc=grant.likely@secretlab.ca \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.