aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMichael Trimarchi2022-07-20 18:22:05 +0200
committerMichael Trimarchi2022-07-22 10:34:02 +0200
commitbd87603d5a5006b751845507102fc3ae1d8cd57f (patch)
tree8ca60b2b10f2b58858960a1a0d1ccaeed10c1bd7 /include/linux
parent1ca6f9483e9ab56fa66b2e922b2df2c9ad609fbb (diff)
mtd: nand: Store nand ID in struct nand_chip
Upstream linux commit 7f501f0a72036d. Store the NAND ID in struct nand_chip to avoid passing id_data and id_len as function parameters. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/rawnand.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index 3417ca2a0d2..f2c6a978cbf 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -507,6 +507,19 @@ static inline void nand_hw_control_init(struct nand_hw_control *nfc)
init_waitqueue_head(&nfc->wq);
}
+/* The maximum expected count of bytes in the NAND ID sequence */
+#define NAND_MAX_ID_LEN 8
+
+/**
+ * struct nand_id - NAND id structure
+ * @data: buffer containing the id bytes.
+ * @len: ID length.
+ */
+struct nand_id {
+ u8 data[NAND_MAX_ID_LEN];
+ int len;
+};
+
/**
* struct nand_ecc_step_info - ECC step information of ECC engine
* @stepsize: data bytes per ECC step
@@ -888,6 +901,8 @@ nand_get_sdr_timings(const struct nand_data_interface *conf)
struct nand_chip {
struct mtd_info mtd;
+ struct nand_id id;
+
void __iomem *IO_ADDR_R;
void __iomem *IO_ADDR_W;