Skip to content
Commit 05f78359 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Brian Norris
Browse files

mtd: nand: don't use {read,write}_buf for 8-bit transfers



According to the Open NAND Flash Interface Specification (ONFI) Revision
3.1 "Parameters are always transferred on the lower 8-bits of the data
bus." for the Get Features and Set Features commands.

So using read_buf and write_buf is wrong for 16-bit wide nand chips as
they use I/O[15:0]. The Get Features command is easily fixed using 4
times the read_byte callback. For Set Features implement a new
overwritable callback "write_byte". Still I expect the default to work
just fine for all controllers and making it overwriteable was just done
for symmetry.

Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
[Brian: fixed warning]
Tested-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent e2e6b7b7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment