mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] mtd: nand: ONFI probing for x16 devices on i.MX25 (and others)
@ 2015-02-05 21:21 Uwe Kleine-König
  2015-02-05 21:21 ` [PATCH 1/3] mtd: nand-imx: fix byte reading in x16 mode Uwe Kleine-König
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2015-02-05 21:21 UTC (permalink / raw)
  To: barebox

Hello,

On an i.MX25 based machine barebox issued a warning during startup:

	nand: Trying ONFI probe in 16 bits mode, aborting !

without much side effects as the NAND chip was detected correctly nevertheless.

On the quest to fix this warning I noticed that there isn't much justification
to not probe via ONFI even in x16 mode in the presence of the read_byte
callback that is correctly used in the ONFI detection code. But removing this
early exit in the generic probe routines brought to light that the imx nand
driver didn't implement this read_byte callback correctly.

This series first fixes the imx nand driver to implement the read_byte callback
correctly and then "fixes" the ONFI code to try detection even in x16 mode.
This made the above mentioned warning go away and print

	nand: ONFI flash detected

instead \o/. The generic code change was mostly cherry-picked from Linux, so I
kept the original author annotation here.

As an added bonus there is a little optimisation at the end of the series.

Best regards
Uwe

Brian Norris (1):
  mtd: nand: cleanup ONFI printed errors, warnings

Uwe Kleine-König (2):
  mtd: nand-imx: fix byte reading in x16 mode
  mtd: nand-imx: don't copy more bytes than read from hardware

 drivers/mtd/nand/nand_base.c | 15 ++++++---------
 drivers/mtd/nand/nand_imx.c  | 39 ++++++++++++++++++++-------------------
 2 files changed, 26 insertions(+), 28 deletions(-)

-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-09  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05 21:21 [PATCH 0/3] mtd: nand: ONFI probing for x16 devices on i.MX25 (and others) Uwe Kleine-König
2015-02-05 21:21 ` [PATCH 1/3] mtd: nand-imx: fix byte reading in x16 mode Uwe Kleine-König
2015-02-05 21:21 ` [PATCH 2/3] mtd: nand: cleanup ONFI printed errors, warnings Uwe Kleine-König
2015-02-05 21:21 ` [PATCH 3/3] mtd: nand-imx: don't copy more bytes than read from hardware Uwe Kleine-König
2015-02-09  7:11 ` [PATCH 0/3] mtd: nand: ONFI probing for x16 devices on i.MX25 (and others) Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox