summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2022-01-07 10:46:13 -0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2022-01-23 16:37:19 +0100
commit5abd37f6e9d653b748a1acad7e0abcbe540e896a (patch)
tree3d110997666da2c0b63475f38f598df88264d350 /drivers/mtd/nand
parent8e5913005f7bfcebd1c67df63fb63bcbb3bfc302 (diff)
downloadlinux-5abd37f6e9d653b748a1acad7e0abcbe540e896a.tar.bz2
mtd: rawnand: brcmnand: BCMA controller uses command shift of 0
For some odd and unexplained reason the BCMA NAND controller, albeit revision 3.4 uses a command shift of 0 instead of 24 as it should be, quirk that. 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-9-f.fainelli@gmail.com
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmnand.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index eab19df152f3..4759303ece7c 100644
--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
@@ -916,6 +916,12 @@ static void brcmnand_wr_corr_thresh(struct brcmnand_host *host, u8 val)
static inline int brcmnand_cmd_shift(struct brcmnand_controller *ctrl)
{
+ /* Kludge for the BCMA-based NAND controller which does not actually
+ * shift the command
+ */
+ if (ctrl->nand_version == 0x0304 && brcmnand_non_mmio_ops(ctrl))
+ return 0;
+
if (ctrl->nand_version < 0x0602)
return 24;
return 0;