From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Russell King - ARM Linux" <linux@arm.linux.org.uk>
Cc: Russ Dill <russ.dill@gmail.com>,
Jamie Lokier <jamie@shareable.org>,
Ben Dooks <ben-linux-arm@fluff.org>,
linux-mtd <linux-mtd@lists.infradead.org>,
Mike Rapoport <mike@compulab.co.il>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH] [MTD] [NAND] GPIO NAND flash driver
Date: Fri, 10 Oct 2008 18:07:03 -0400 [thread overview]
Message-ID: <8bd0f97a0810101507y589dfd3br4da47c634e83bb36@mail.gmail.com> (raw)
In-Reply-To: <20081010214827.GP435@flint.arm.linux.org.uk>
On Fri, Oct 10, 2008 at 17:48, Russell King - ARM Linux wrote:
> On Fri, Oct 10, 2008 at 03:19:16PM +0100, Jamie Lokier wrote:
>> Mike Rapoport wrote:
>> > + /*
>> > + * Linux memory barriers don't cater for what's required here.
>> > + * What's required is what's here - a read from a separate
>> > + * region with a dependency on that read.
>> > + */
>>
>> It would be nice if this comment explained _why_ it's needed here, not
>> just what it's doing but why this MTD device in particular needs it -
>> for the benefit of someone using this driver on another architecture.
>>
>> If the problem is that "readl" alone doesn't force a read cycle on
>> PXA, it sounds like "readl" on PXA contains a bug which may affect
>> other drivers on that architecture too, and that the right place to
>> fix it is in "readl".
>
> The problem is that a write to GPIO may pass a write to the static
> memory regions, or vice versa. So, what we do is we insert a read
> with a dependency in the execution to ensure that we stall the
> pipeline until that read - and therefore the preceding write has
> completed.
so the function comment should read something like "make sure the gpio
state has actually changed before returning to the higher nand layers"
>> > +static inline void gpio_nand_dosync(struct gpiomtd *gpiomtd) {}
>>
>> Is this dummy implementation likely to be correct on non-ARM
>> architectures, or is this just faking it so the code will compile?
>
> I suspect what's required for various architectures has yet to be
> ascertained. To ask ARM folk to work out what's required for other
> architectures is just like asking you what's required for ARM - I'd
> guess that you've no idea what ARM would require. In the same way,
> we have no idea what other architectures require to ensure that the
> NAND chip sees GPIO changes before actually accessing the NAND.
the Blackfin code should do: SSYNC();
-mike
next prev parent reply other threads:[~2008-10-10 22:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-08 6:01 [PATCH] [MTD] [NAND] GPIO NAND flash driver Mike Rapoport
2008-10-08 6:20 ` Mike Frysinger
2008-10-08 7:28 ` Russell King - ARM Linux
2008-10-08 7:29 ` Mike Frysinger
2008-10-08 8:28 ` Mike Rapoport
2008-10-08 17:41 ` Mike Frysinger
2008-10-10 10:46 ` Mike Rapoport
2008-10-10 14:19 ` Jamie Lokier
2008-10-10 21:48 ` Russell King - ARM Linux
2008-10-10 22:07 ` Mike Frysinger [this message]
2008-10-12 8:02 ` Mike Rapoport
2008-10-12 8:14 ` Mike Frysinger
2008-10-12 8:28 ` Russell King - ARM Linux
2008-10-12 8:56 ` Mike Frysinger
2008-10-12 10:13 ` Russell King - ARM Linux
2008-10-12 10:35 ` David Woodhouse
2008-10-12 10:43 ` Russell King - ARM Linux
2008-10-12 15:04 ` Jamie Lokier
2008-10-12 19:04 ` Mike Frysinger
2008-10-12 19:09 ` Russell King - ARM Linux
2008-10-12 19:22 ` Mike Frysinger
2008-10-12 19:40 ` Russell King - ARM Linux
2008-10-12 10:04 ` Mike Rapoport
2008-10-13 13:59 ` David Woodhouse
2008-10-15 6:38 ` Mike Rapoport
2008-10-15 7:52 ` Russell King - ARM Linux
2008-10-15 8:25 ` Mike Rapoport
2008-10-08 8:30 ` David Woodhouse
2008-10-08 14:25 ` Paulius Zaleckas
-- strict thread matches above, loose matches on Subject: below --
2008-10-19 23:51 David Brownell
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=8bd0f97a0810101507y589dfd3br4da47c634e83bb36@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=ben-linux-arm@fluff.org \
--cc=dwmw2@infradead.org \
--cc=jamie@shareable.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@arm.linux.org.uk \
--cc=mike@compulab.co.il \
--cc=russ.dill@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox