mtd: rawnand: brcmnand: Allow SoC to provide I/O operations
authorFlorian Fainelli <f.fainelli@gmail.com>
Fri, 7 Jan 2022 18:46:07 +0000 (10:46 -0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Sun, 23 Jan 2022 15:37:18 +0000 (16:37 +0100)
commit25f97138f8c225dbf365b428a94d7b30a6daefb3
treee6c7cb880c318b4f4d4500177866f3317c000046
parent9e37532b1820b4d86b17c74bf3d176d79c80974b
mtd: rawnand: brcmnand: Allow SoC to provide I/O operations

Allow a brcmnand_soc instance to provide a custom set of I/O operations
which we will require when using this driver on a BCMA bus which is not
directly memory mapped I/O. Update the nand_{read,write}_reg accordingly
to use the SoC operations if provided.

To minimize the penalty on other SoCs which do support standard MMIO
accesses, we use a static key which is disabled by default and gets
enabled if a soc implementation does provide I/O operations.

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-3-f.fainelli@gmail.com
drivers/mtd/nand/raw/brcmnand/brcmnand.c
drivers/mtd/nand/raw/brcmnand/brcmnand.h