Thread (50 messages) 50 messages, 11 authors, 2014-03-12

[RFC PATCH v2 08/14] mtd: nand: add sunxi NAND flash controller support

From: Ezequiel Garcia <hidden>
Date: 2014-01-29 18:46:24
Also in: linux-devicetree, lkml

On Wed, Jan 29, 2014 at 10:56:42AM -0700, Jason Gunthorpe wrote:
On Wed, Jan 29, 2014 at 03:34:18PM +0100, Boris BREZILLON wrote:

[..]
quoted
+static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
[..]
quoted
+       ret = sunxi_nand_chip_init_timings(chip, np);
+       if (ret)
+               return ret;
[..]
quoted
+       ret = nand_scan_ident(mtd, nsels, NULL);
This ordering looks a bit problematic, will onfi_get_async_timing_mode
ever return anything other than ONFI_TIMING_MODE_UNKNOWN if it is
called before nand_scan_ident ? What sets clk_rate to non-zero if there
is no DT property?

For a flow that uses onfi_get_async_timing_mode rather than DT the
driver should set the interface to timing mode 0 (slowest) and then
call nand_scan_ident, and then reset the interface to the detected
timing mode.
Yes. And I believe this is a requirement from the ONFI 2.1 spec:

"""
4.1.4.3. Source Synchronous to Asynchronous
[..]

The host shall transition to the asynchronous data interface. Then the
host shall issue the Reset (FFh) command described in the previous paragraph
using asynchronous timing mode 0, thus the host transitions to the asynchronous
data interface prior to issuing the Reset (FFh). A device in any timing mode is
required to recognize a Reset (FFh) command issued in asynchronous timing
mode 0.

[..]

After CE# has been pulled high and then transitioned low again, the host
should issue a Set Features to select the appropriate asynchronous timing mode.
"""

-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help