All of lore.kernel.org
 help / color / mirror / Atom feed
From: grinberg@compulab.co.il (Igor Grinberg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: PXA27x: fix workaround for AC97 reset
Date: Sun, 06 Jan 2013 18:24:19 +0200	[thread overview]
Message-ID: <50E9A533.2050106@compulab.co.il> (raw)
In-Reply-To: <87fw2ebe1i.fsf@free.fr>

On 01/06/13 16:07, Robert Jarzmik wrote:
> Igor Grinberg <grinberg@compulab.co.il> writes:
> 
>> Fix the workaround to a hardware bug in the AC97 controller of PXA27x.
>> A bug in the controller's warm reset functionality requires that the MFP
>> used by the controller as the AC97_RESET_n line be temporarily
>> reconfigured as a GPIO (AF0) and manually held high for the duration of
>> the warm reset cycle.
>>
>> The workaround was broken long ago by commit fb1bf8cd
>> ([ARM] pxa: introduce processor specific pxa27x_assert_ac97reset()).
>> The commit above changed the original workaround code in a way that
>> changed the MFP to AF0 (GPIO), but forgot to drive the GPIO high output.
>> This way, the GPIO state was left input (and undriven) and only worked
>> for boards with external pullup on the line.
>>
>> Fix the above breakage by actually configurring the GPIO for output high
>> in case of reset assert and returning it to default state
>> (AF2 and GPDR - input) in case of reset deassert.
> 
> NAK.
> If you return GPIO95 to AF-input, the GPIO95 will be "KP_DKIN<2>", ie. you'll
> map a keyboard input to a AC97 reset.

I'm sorry, I don't understand what do you mean by "AF-input"?
For GPIO95 AF1 means AC97_nRESET and GPDR settings should not meter at all.
So setting GPDR for GPIO95/113 to input is only a safety measure.

> As I said in a mail before, don't put a AC97 reset line as an input pin, this is
> not a sensible patch.

Hmmm... I've opened the PXA27x dev manual once again in several years.
Ok. I was mislead by all the newer SoC where direction pins do not count
unless the MFP in AF-GPIO. As I've remembered now, it is not true for PXA27x.

This is what the manual says:
"Each pin can be programmed as an output, an input, or as bidirectional
for certain alternate functions (that override the value programmed in the
GPIO direction registers)."

So, you're right and GPDR does meter for AC97_nRESET.
I'll send a v2.

Thanks!

-- 
Regards,
Igor.

  reply	other threads:[~2013-01-06 16:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-06 11:12 [PATCH] ARM: PXA27x: fix workaround for AC97 reset Igor Grinberg
2013-01-06 14:07 ` Robert Jarzmik
2013-01-06 16:24   ` Igor Grinberg [this message]
2013-01-06 16:48   ` [PATCH v2] " Igor Grinberg
2013-01-06 19:26     ` Mike Dunn
2013-01-06 22:19     ` Mike Dunn
2013-01-07  9:13       ` Igor Grinberg

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=50E9A533.2050106@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=linux-arm-kernel@lists.infradead.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.