mtd: nand: fix GET/SET_FEATURES address on 16-bit devices
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Apr 5 02:59:06 EDT 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=e34fcb07a6d57411de6e15a47724fbe92c5caa42
Commit: e34fcb07a6d57411de6e15a47724fbe92c5caa42
Parent: 00d09891eb947f8c4a7cb4d16bf3de305a65de77
Author: David Mosberger <davidm at egauge.net>
AuthorDate: Fri Mar 21 16:05:10 2014 -0600
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Mar 25 23:31:26 2014 -0700
mtd: nand: fix GET/SET_FEATURES address on 16-bit devices
GET_FEATURES and SET_FEATURES also need byte-addressing on 16-bit devices.
Signed-off-by: David Mosberger <davidm at egauge.net>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
include/linux/mtd/nand.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 0747fef..450d61e 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -925,7 +925,16 @@ static inline bool nand_is_slc(struct nand_chip *chip)
*/
static inline int nand_opcode_8bits(unsigned int command)
{
- return command == NAND_CMD_READID || command == NAND_CMD_PARAM;
+ switch (command) {
+ case NAND_CMD_READID:
+ case NAND_CMD_PARAM:
+ case NAND_CMD_GET_FEATURES:
+ case NAND_CMD_SET_FEATURES:
+ return 1;
+ default:
+ break;
+ }
+ return 0;
}
/* return the supported JEDEC features. */
More information about the linux-mtd-cvs
mailing list