summaryrefslogtreecommitdiff
path: root/include/linux/platform_data/mtd-davinci.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2018-04-30 10:24:42 +0200
committerSekhar Nori <nsekhar@ti.com>2018-05-02 14:58:30 +0530
commitbde1a3d84634f98151e3f748ab90865e9f544b10 (patch)
tree5ea16a8da56be78b3d5a2c3f5f1fedd4030b3cec /include/linux/platform_data/mtd-davinci.h
parent60cc43fc888428bb2f18f08997432d426a243338 (diff)
mtd: rawnand: davinci: store the core chipselect number in platform data
We have the 'ti,davinci-chipselect' property in the device tree, but when using platform data the driver silently uses the id field of struct platform_device as the chipselect. This is confusing and we almost broke the nand support again recently after converting the platform to common clock framework (which changed the device id in the clock lookup - the problem is gone now that we no longer acquire the clock in the nand driver. This patch adds a new field - core_chipsel - to the platform_data. Subsequent patches will convert the platforms to using this new field. Acked-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'include/linux/platform_data/mtd-davinci.h')
-rw-r--r--include/linux/platform_data/mtd-davinci.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/platform_data/mtd-davinci.h b/include/linux/platform_data/mtd-davinci.h
index f1a2cf655bdb..1bbfa27cccb4 100644
--- a/include/linux/platform_data/mtd-davinci.h
+++ b/include/linux/platform_data/mtd-davinci.h
@@ -56,6 +56,16 @@ struct davinci_nand_pdata { /* platform_data */
uint32_t mask_ale;
uint32_t mask_cle;
+ /*
+ * 0-indexed chip-select number of the asynchronous
+ * interface to which the NAND device has been connected.
+ *
+ * So, if you have NAND connected to CS3 of DA850, you
+ * will pass '1' here. Since the asynchronous interface
+ * on DA850 starts from CS2.
+ */
+ uint32_t core_chipsel;
+
/* for packages using two chipselects */
uint32_t mask_chipsel;