aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm47xx/patches-5.10/107-mtd-rawnand-brcmnand-BCMA-controller-uses-command-shift-of-0.patch
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2021-12-22 19:25:14 -0800
committerFlorian Fainelli <f.fainelli@gmail.com>2022-06-20 14:29:12 -0700
commitacff8aec0c629859fec4ebac2073c4fe37c8035a (patch)
treec91db3c21d6a9ae4c0c8a8e9c754508b31aca3bf /target/linux/bcm47xx/patches-5.10/107-mtd-rawnand-brcmnand-BCMA-controller-uses-command-shift-of-0.patch
parentcd3de51bb4a18f922a961fdeb42c1c8f1f80b425 (diff)
downloadupstream-acff8aec0c629859fec4ebac2073c4fe37c8035a.tar.gz
upstream-acff8aec0c629859fec4ebac2073c4fe37c8035a.tar.bz2
upstream-acff8aec0c629859fec4ebac2073c4fe37c8035a.zip
bcm47xx: Add support for brcmnand controller on BCMA bus
Back port the patches being submitted upstream in order to make the NAND controller work on BCM47187/5358. This is a prerequisite for supporting devices like the Netgear WNR3500L V2. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Diffstat (limited to 'target/linux/bcm47xx/patches-5.10/107-mtd-rawnand-brcmnand-BCMA-controller-uses-command-shift-of-0.patch')
-rw-r--r--target/linux/bcm47xx/patches-5.10/107-mtd-rawnand-brcmnand-BCMA-controller-uses-command-shift-of-0.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/target/linux/bcm47xx/patches-5.10/107-mtd-rawnand-brcmnand-BCMA-controller-uses-command-shift-of-0.patch b/target/linux/bcm47xx/patches-5.10/107-mtd-rawnand-brcmnand-BCMA-controller-uses-command-shift-of-0.patch
new file mode 100644
index 0000000000..39f34aab29
--- /dev/null
+++ b/target/linux/bcm47xx/patches-5.10/107-mtd-rawnand-brcmnand-BCMA-controller-uses-command-shift-of-0.patch
@@ -0,0 +1,29 @@
+From: Florian Fainelli <f.fainelli@gmail.com>
+Subject: [PATCH v3 8/9] mtd: rawnand: brcmnand: BCMA controller uses command shift of 0
+Date: Fri, 07 Jan 2022 10:46:13 -0800
+Content-Type: text/plain; charset="utf-8"
+
+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>
+---
+ drivers/mtd/nand/raw/brcmnand/brcmnand.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/mtd/nand/raw/brcmnand/brcmnand.c
++++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
+@@ -913,6 +913,12 @@ static void brcmnand_wr_corr_thresh(stru
+
+ 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;