461-v5.3-mtd-spinand-Add-support-for-two-byte-device-IDs.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 53dd94a79d3bfdaae30e5a4ebf474ea1af1d572e Mon Sep 17 00:00:00 2001
  2. From: Jeff Kletsky <[email protected]>
  3. Date: Wed, 22 May 2019 15:05:54 -0700
  4. Subject: [PATCH 2/3] mtd: spinand: Add support for two-byte device IDs
  5. The GigaDevice GD5F1GQ4UFxxG SPI NAND utilizes two-byte device IDs.
  6. http://www.gigadevice.com/datasheet/gd5f1gq4xfxxg/
  7. Signed-off-by: Jeff Kletsky <[email protected]>
  8. Reviewed-by: Frieder Schrempf <[email protected]>
  9. Signed-off-by: Miquel Raynal <[email protected]>
  10. ---
  11. drivers/mtd/nand/spi/core.c | 2 +-
  12. include/linux/mtd/spinand.h | 4 ++--
  13. 2 files changed, 3 insertions(+), 3 deletions(-)
  14. --- a/drivers/mtd/nand/spi/core.c
  15. +++ b/drivers/mtd/nand/spi/core.c
  16. @@ -853,7 +853,7 @@ spinand_select_op_variant(struct spinand
  17. */
  18. int spinand_match_and_init(struct spinand_device *spinand,
  19. const struct spinand_info *table,
  20. - unsigned int table_size, u8 devid)
  21. + unsigned int table_size, u16 devid)
  22. {
  23. struct nand_device *nand = spinand_to_nand(spinand);
  24. unsigned int i;
  25. --- a/include/linux/mtd/spinand.h
  26. +++ b/include/linux/mtd/spinand.h
  27. @@ -290,7 +290,7 @@ struct spinand_ecc_info {
  28. */
  29. struct spinand_info {
  30. const char *model;
  31. - u8 devid;
  32. + u16 devid;
  33. u32 flags;
  34. struct nand_memory_organization memorg;
  35. struct nand_ecc_req eccreq;
  36. @@ -445,7 +445,7 @@ static inline void spinand_set_of_node(s
  37. int spinand_match_and_init(struct spinand_device *dev,
  38. const struct spinand_info *table,
  39. - unsigned int table_size, u8 devid);
  40. + unsigned int table_size, u16 devid);
  41. int spinand_upd_cfg(struct spinand_device *spinand, u8 mask, u8 val);
  42. int spinand_select_target(struct spinand_device *spinand, unsigned int target);