linux-mips
[Top] [All Lists]

Re: [PATCH] PNX8550 NAND flash driver

To: Jurgen <jurgen.parmentier@telenet.be>
Subject: Re: [PATCH] PNX8550 NAND flash driver
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 26 Jul 2006 09:02:53 +0200
Cc: linux-mtd@lists.infradead.org, "Vladimir A. Barinov" <vbarinov@ru.mvista.com>, Todd Poynor <tpoynor@mvista.com>, linux-mips@linux-mips.org
In-reply-to: <44C66437.9030402@telenet.be>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <43A2F819.1040106@ru.mvista.com> <43C69EC2.2070601@mvista.com> <43F1D439.60205@ru.mvista.com> <1152525196.30929.11.camel@localhost> <44C66437.9030402@telenet.be>
Reply-to: tglx@linutronix.de
Sender: linux-mips-bounce@linux-mips.org
On Tue, 2006-07-25 at 20:34 +0200, Jurgen wrote:
> Root cause of the problem lies within the early implementation of the 
> low-level NAND commands. There was a severe risk that the PCI accesses 
> were stalled because of a Read Status command for the NAND Flash. This 
> Read Status was launched immediately after program/erase command. The 
> hardware itself will wait for the Ready/Busy to be high and only then 
> launch the Read Status command. This behavior caused timeout on the 
> internal bus because PCI was unable to use the pins during this wait.

The hardware design is broken. Status Read can be requested while R/B is
low. See NAND datasheets.

> If this problem was coinciding with an ISR that tried to perform a PCI 
> status register, then this PCI access could possibly timeout (because 
> the PCI pins were already claimed for the XIO access that is depending 
> on the RBY signal).
> 
> Since the problem only showed during the PCI device ISR, the 
> quick'n'dirty hack was to disable interrupts during XIO accesses.
> 
> A better fix that should be available somewhere, is to improve the 
> low-level NAND driver that will first check the status of the Ready/Busy 
> line and only THEN launch the Read NAND Status command...

Thats not an improvement. Thats a hack for your broken hardware. You'd
burden the R/B check on every sane hardware out there.

You can add the R/B check to the chip->cmd_ctrl() function of your board
driver.

        tglx



<Prev in Thread] Current Thread [Next in Thread>