summaryrefslogtreecommitdiff
path: root/include/linux/bcma
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2022-01-07 10:46:11 -0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-01-23 16:37:18 +0100
commit02d1d0e4dfc3fdc5aa05b78e7def00dc1e62257e (patch)
treea99b36648a6b17dc8c9cd9e7f111496bff58b420 /include/linux/bcma
parentf5619f3774d0ef6ddbb8de4c782cc4e42966c524 (diff)
mtd: rawnand: brcmnand: Add platform data structure for BCMA
Update the BCMA's chipcommon nand flash driver to detect which chip-select is used and pass that information via platform data to the brcmnand driver. Make sure that the brcmnand platform data structure is always at the beginning of the platform data of the "nflash" device created by BCMA to allow brcmnand to safely de-reference it. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20220107184614.2670254-7-f.fainelli@gmail.com
Diffstat (limited to 'include/linux/bcma')
-rw-r--r--include/linux/bcma/bcma_driver_chipcommon.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/bcma/bcma_driver_chipcommon.h b/include/linux/bcma/bcma_driver_chipcommon.h
index d35b9206096d..e3314f746bfa 100644
--- a/include/linux/bcma/bcma_driver_chipcommon.h
+++ b/include/linux/bcma/bcma_driver_chipcommon.h
@@ -3,6 +3,7 @@
#define LINUX_BCMA_DRIVER_CC_H_
#include <linux/platform_device.h>
+#include <linux/platform_data/brcmnand.h>
#include <linux/gpio.h>
/** ChipCommon core registers. **/
@@ -599,6 +600,10 @@ struct bcma_sflash {
#ifdef CONFIG_BCMA_NFLASH
struct bcma_nflash {
+ /* Must be the fist member for the brcmnand driver to
+ * de-reference that structure.
+ */
+ struct brcmnand_platform_data brcmnand_info;
bool present;
bool boot; /* This is the flash the SoC boots from */
};