Skip to content

Commit

Permalink
mtd: spinand: Add support for two-byte device IDs
Browse files Browse the repository at this point in the history
The GigaDevice GD5F1GQ4UFxxG SPI NAND utilizes two-byte device IDs.

http://www.gigadevice.com/datasheet/gd5f1gq4xfxxg/

Signed-off-by: Jeff Kletsky <git-commits@allycomm.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
  • Loading branch information
Jeff Kletsky authored and Miquel Raynal committed Jun 27, 2019
1 parent bded033 commit 8788449
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/mtd/nand/spi/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ spinand_select_op_variant(struct spinand_device *spinand,
*/
int spinand_match_and_init(struct spinand_device *spinand,
const struct spinand_info *table,
unsigned int table_size, u8 devid)
unsigned int table_size, u16 devid)
{
struct nand_device *nand = spinand_to_nand(spinand);
unsigned int i;
Expand Down
4 changes: 2 additions & 2 deletions include/linux/mtd/spinand.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ struct spinand_ecc_info {
*/
struct spinand_info {
const char *model;
u8 devid;
u16 devid;
u32 flags;
struct nand_memory_organization memorg;
struct nand_ecc_req eccreq;
Expand Down Expand Up @@ -452,7 +452,7 @@ static inline void spinand_set_of_node(struct spinand_device *spinand,

int spinand_match_and_init(struct spinand_device *dev,
const struct spinand_info *table,
unsigned int table_size, u8 devid);
unsigned int table_size, u16 devid);

int spinand_upd_cfg(struct spinand_device *spinand, u8 mask, u8 val);
int spinand_select_target(struct spinand_device *spinand, unsigned int target);
Expand Down

0 comments on commit 8788449

Please sign in to comment.