summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Mosberger <davidm@egauge.net>2014-03-21 16:05:10 -0600
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 08:58:06 -0500
commit4586b1a712570e0e0a026b17bdea34c0a984754b (patch)
tree75167af1ccf73f156a690987e7c8bea09efed708 /include
parent2164330c88cbca1efd2d954371277b51788e530b (diff)
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@egauge.net> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/nand.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 0747fef2bfc6..450d61ec7f06 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. */