diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2022-01-07 21:46:14 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2022-01-23 18:37:19 +0300 |
commit | feca4cc4765a67907a97bddfa94aa6901cbbce7d (patch) | |
tree | 5e6e1d1e541d1b3a584f2728b203e98e12b17da5 /drivers/mtd/nand/raw/brcmnand/brcmnand.c | |
parent | 5abd37f6e9d653b748a1acad7e0abcbe540e896a (diff) | |
download | linux-feca4cc4765a67907a97bddfa94aa6901cbbce7d.tar.xz |
mtd: rawnand: brcmnand: Add BCMA shim
Add a BCMA shim to allow us to register the brcmnand driver using the
BCMA bus which provides indirect memory mapped access to SoC registers.
There are a number of registers that need to be byte swapped because
they are natively big endian, coming directly from the NAND chip, and
there is no bus interface unlike the iProc or STB platforms that
performs the byte swapping for us.
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-10-f.fainelli@gmail.com
Diffstat (limited to 'drivers/mtd/nand/raw/brcmnand/brcmnand.c')
-rw-r--r-- | drivers/mtd/nand/raw/brcmnand/brcmnand.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c index 4759303ece7c..c412f79b81db 100644 --- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c +++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c @@ -598,7 +598,11 @@ enum { static inline bool brcmnand_non_mmio_ops(struct brcmnand_controller *ctrl) { +#if IS_ENABLED(CONFIG_MTD_NAND_BRCMNAND_BCMA) return static_branch_unlikely(&brcmnand_soc_has_ops_key); +#else + return false; +#endif } static inline u32 nand_readreg(struct brcmnand_controller *ctrl, u32 offs) |