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>
This commit is contained in:
parent
00d09891eb
commit
e34fcb07a6
1 changed files with 10 additions and 1 deletions
|
|
@ -925,7 +925,16 @@ static inline bool nand_is_slc(struct nand_chip *chip)
|
||||||
*/
|
*/
|
||||||
static inline int nand_opcode_8bits(unsigned int command)
|
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. */
|
/* return the supported JEDEC features. */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue