* bus access for NAND parts
@ 2008-10-29 11:54 Cliff Brake
2008-10-30 22:08 ` Cliff Brake
0 siblings, 1 reply; 4+ messages in thread
From: Cliff Brake @ 2008-10-29 11:54 UTC (permalink / raw)
To: linux-mtd
I've been looking at interfacing a raw NAND device to a PXA270 and
have the following questions. It seems that most devices simply use a
chip select for CE. What is the mechanism that prevents the NAND
driver from getting pre-empted and another device access toggling the
read/write stobes and messing up the NAND cycle while the NAND chip
select is still low? I see memory barriers that should prevent out of
order issues, but I've not located any mechanism yet for preventing a
separate device access from interfering with the NAND access.
Thanks,
Cliff
--
=======================
Cliff Brake
http://bec-systems.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bus access for NAND parts
2008-10-29 11:54 bus access for NAND parts Cliff Brake
@ 2008-10-30 22:08 ` Cliff Brake
2008-10-30 22:24 ` Ricard Wanderlof
0 siblings, 1 reply; 4+ messages in thread
From: Cliff Brake @ 2008-10-30 22:08 UTC (permalink / raw)
To: linux-mtd
On Wed, Oct 29, 2008 at 7:54 AM, Cliff Brake <cliff.brake@gmail.com> wrote:
> I've been looking at interfacing a raw NAND device to a PXA270 and
> have the following questions. It seems that most devices simply use a
> chip select for CE. What is the mechanism that prevents the NAND
> driver from getting pre-empted and another device access toggling the
> read/write stobes and messing up the NAND cycle while the NAND chip
> select is still low? I see memory barriers that should prevent out of
> order issues, but I've not located any mechanism yet for preventing a
> separate device access from interfering with the NAND access.
Correction -- above should say: "It seems that most devices simply use a
_GPIO_ for CE". The chip select is set low in software, and then
multiple bus cycles are run to execute the address and data phases of
the NAND operation. So what keeps another process from interrupting
this and running a bus cycle while the GPIO for NAND CE is still low
-- which would toggle the strobes to the NAND cs.
Thanks,
Cliff
--
=======================
Cliff Brake
http://bec-systems.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bus access for NAND parts
2008-10-30 22:08 ` Cliff Brake
@ 2008-10-30 22:24 ` Ricard Wanderlof
2008-11-04 10:11 ` Matthieu CASTET
0 siblings, 1 reply; 4+ messages in thread
From: Ricard Wanderlof @ 2008-10-30 22:24 UTC (permalink / raw)
To: Cliff Brake; +Cc: linux-mtd@lists.infradead.org
On Thu, 30 Oct 2008, Cliff Brake wrote:
> Correction -- above should say: "It seems that most devices simply use a
> _GPIO_ for CE". The chip select is set low in software, and then
> multiple bus cycles are run to execute the address and data phases of
> the NAND operation. So what keeps another process from interrupting
> this and running a bus cycle while the GPIO for NAND CE is still low
> -- which would toggle the strobes to the NAND cs.
I don't know in general, but in several systems that have multiple buses,
the NAND flash can be the only device on a particular bus, so conflicts
with other devices are not an issue in those cases. Otherwise, it would be
as you say, I agree.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: bus access for NAND parts
2008-10-30 22:24 ` Ricard Wanderlof
@ 2008-11-04 10:11 ` Matthieu CASTET
0 siblings, 0 replies; 4+ messages in thread
From: Matthieu CASTET @ 2008-11-04 10:11 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: linux-mtd@lists.infradead.org
Ricard Wanderlof a écrit :
> On Thu, 30 Oct 2008, Cliff Brake wrote:
>
>> Correction -- above should say: "It seems that most devices simply use a
>> _GPIO_ for CE". The chip select is set low in software, and then
>> multiple bus cycles are run to execute the address and data phases of
>> the NAND operation. So what keeps another process from interrupting
>> this and running a bus cycle while the GPIO for NAND CE is still low
>> -- which would toggle the strobes to the NAND cs.
>
> I don't know in general, but in several systems that have multiple buses,
> the NAND flash can be the only device on a particular bus, so conflicts
> with other devices are not an issue in those cases. Otherwise, it would be
> as you say, I agree.
>
The s3c2412 where the nand bus is shared with SDRAM. nCE is like a gpio
set by software. But it isn't a problem because the nand flash doesn't
care about other bus cycle if nWE/nRE is in high state (see nand
datasheets).
So the arbitration is done with nWE/nRE line and without nCE.
Matthieu
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-04 10:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-29 11:54 bus access for NAND parts Cliff Brake
2008-10-30 22:08 ` Cliff Brake
2008-10-30 22:24 ` Ricard Wanderlof
2008-11-04 10:11 ` Matthieu CASTET
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox