]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: mxc-nand: Allow to use column addresses different from 0
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 10 Feb 2015 18:59:58 +0000 (19:59 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 11 Mar 2015 22:20:29 +0000 (15:20 -0700)
commit41ecabf3c0f4f630f1b846a97b0367cd10edb01b
treed1074b773013f41fd9acb1506a0e9b0ce6fa54c8
parent895c650eaaee0aa1d0a717f5d0575bf0f53c2f5f
mtd: mxc-nand: Allow to use column addresses different from 0

The mxc-nand controller works pagewise and so usually only sends
commands to the flash chip with column == 0. A request with column != 0
from the upper layer is then fulfilled by indexing appropriately into the
device's RAM buffer.

To be able to access the ONFI marker at offset 0x20 in reply to the
READID command however it's invalid to read 32 bytes starting from
column 0.

So let the function used to send the address cycles send the column
address actually passed instead of 0 and fix all callers to pass 0
instead appropriately. Also add some warnings in case this patch changes
the drivers semantics.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/mxc_nand.c