diff options
| author | David Mosberger <davidm@egauge.net> | 2014-03-21 18:05:10 -0400 |
|---|---|---|
| committer | Brian Norris <computersforpeace@gmail.com> | 2014-03-26 02:31:26 -0400 |
| commit | e34fcb07a6d57411de6e15a47724fbe92c5caa42 (patch) | |
| tree | f55de64bc01993d67d68fe74bd2bee7d66095968 /include/linux/mtd | |
| parent | 00d09891eb947f8c4a7cb4d16bf3de305a65de77 (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>
Diffstat (limited to 'include/linux/mtd')
| -rw-r--r-- | include/linux/mtd/nand.h | 11 |
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) | |||
| 925 | */ | 925 | */ |
| 926 | static inline int nand_opcode_8bits(unsigned int command) | 926 | static inline int nand_opcode_8bits(unsigned int command) |
| 927 | { | 927 | { |
| 928 | return command == NAND_CMD_READID || command == NAND_CMD_PARAM; | 928 | switch (command) { |
| 929 | case NAND_CMD_READID: | ||
| 930 | case NAND_CMD_PARAM: | ||
| 931 | case NAND_CMD_GET_FEATURES: | ||
| 932 | case NAND_CMD_SET_FEATURES: | ||
| 933 | return 1; | ||
| 934 | default: | ||
| 935 | break; | ||
| 936 | } | ||
| 937 | return 0; | ||
| 929 | } | 938 | } |
| 930 | 939 | ||
| 931 | /* return the supported JEDEC features. */ | 940 | /* return the supported JEDEC features. */ |
