Skip to contentSkip to conversation

mtd: brcmnand: Add support for v6.2 controllers

PATCH Applied Florian Fainelli 4 participants 4 messages Mar 10, 2016 – Apr 4, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: brcmnand: Add support for v6.2 controllers

Document and match the brcm,brcmnand-v6.2 compatible string, the controller has a register layout identical to the v6.0 version and supports prefetch. Update the command shift logic to account for v6.2 controller which are the first ones to use a shift of 0 (6.1 used a shift of 24).

---
 Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt | 1 +
 drivers/mtd/nand/brcmnand/brcmnand.c                    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt +1 -0
index c2546ced9c02..deb24cbdda82 100644
@@ -24,6 +24,7 @@ Required properties:
                          brcm,brcmnand-v5.0
                          brcm,brcmnand-v6.0
                          brcm,brcmnand-v6.1
+                         brcm,brcmnand-v6.2
                          brcm,brcmnand-v7.0
                          brcm,brcmnand-v7.1
                          brcm,brcmnand
drivers/mtd/nand/brcmnand/brcmnand.c +2 -1
index e0528397306a..0b7a698cc233 100644
@@ -601,7 +601,7 @@ static void brcmnand_wr_corr_thresh(struct brcmnand_host *host, u8 val)
 
 static inline int brcmnand_cmd_shift(struct brcmnand_controller *ctrl)
 {
-	if (ctrl->nand_version < 0x0700)
+	if (ctrl->nand_version < 0x0602)
 		return 24;
 	return 0;
 }
@@ -2115,6 +2115,7 @@ static const struct of_device_id brcmnand_of_match[] = {
 	{ .compatible = "brcm,brcmnand-v5.0" },
 	{ .compatible = "brcm,brcmnand-v6.0" },
 	{ .compatible = "brcm,brcmnand-v6.1" },
+	{ .compatible = "brcm,brcmnand-v6.2" },
 	{ .compatible = "brcm,brcmnand-v7.0" },
 	{ .compatible = "brcm,brcmnand-v7.1" },
 	{},
Signature · 6 lines
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Florian Fainelli

Document and match the brcm,brcmnand-v6.2 compatible string, the controller has a register layout identical to the v6.0 version and supports prefetch. Update the command shift logic to account for v6.2 controller which are the first ones to use a shift of 0 (6.1 used a shift of 24).

---
 Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt | 1 +
 drivers/mtd/nand/brcmnand/brcmnand.c                    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Acked-by on v1 1/1
#2 lore raw
In reply to Florian Fainelli

+ Boris, Richard

Quoted 4 lines · Florian Fainelli

Document and match the brcm,brcmnand-v6.2 compatible string, the controller has a register layout identical to the v6.0 version and supports prefetch. Update the command shift logic to account for v6.2 controller which are the first ones to use a shift of 0 (6.1 used a shift of 24).

Ah yes, another blip in the ever-shifting register layout of this controller. Fun!

Quoted 2 lines
Quoted 41 lines
---
 Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt | 1 +
 drivers/mtd/nand/brcmnand/brcmnand.c                    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt +1 -0
index c2546ced9c02..deb24cbdda82 100644
@@ -24,6 +24,7 @@ Required properties:
                          brcm,brcmnand-v5.0
                          brcm,brcmnand-v6.0
                          brcm,brcmnand-v6.1
+                         brcm,brcmnand-v6.2
                          brcm,brcmnand-v7.0
                          brcm,brcmnand-v7.1
                          brcm,brcmnand
drivers/mtd/nand/brcmnand/brcmnand.c +2 -1
index e0528397306a..0b7a698cc233 100644
@@ -601,7 +601,7 @@ static void brcmnand_wr_corr_thresh(struct brcmnand_host *host, u8 val)
 
 static inline int brcmnand_cmd_shift(struct brcmnand_controller *ctrl)
 {
-	if (ctrl->nand_version < 0x0700)
+	if (ctrl->nand_version < 0x0602)
 		return 24;
 	return 0;
 }
@@ -2115,6 +2115,7 @@ static const struct of_device_id brcmnand_of_match[] = {
 	{ .compatible = "brcm,brcmnand-v5.0" },
 	{ .compatible = "brcm,brcmnand-v6.0" },
 	{ .compatible = "brcm,brcmnand-v6.1" },
+	{ .compatible = "brcm,brcmnand-v6.2" },
 	{ .compatible = "brcm,brcmnand-v7.0" },
 	{ .compatible = "brcm,brcmnand-v7.1" },
 	{},
Signature · 1 line
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 8 lines · On Sun, 3 Apr 2016 23:53:53 -0700 Brian Norris <[email protected]>…

+ Boris, Richard

Quoted 4 lines · Florian Fainelli

Document and match the brcm,brcmnand-v6.2 compatible string, the controller has a register layout identical to the v6.0 version and supports prefetch. Update the command shift logic to account for v6.2 controller which are the first ones to use a shift of 0 (6.1 used a shift of 24).

Quoted 7 lines

Ah yes, another blip in the ever-shifting register layout of this controller. Fun!

Quoted 2 lines

Applied.

Thanks,

Boris

Quoted 42 lines
Quoted 42 lines
---
 Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt | 1 +
 drivers/mtd/nand/brcmnand/brcmnand.c                    | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/mtd/brcm,brcmnand.txt +1 -0
index c2546ced9c02..deb24cbdda82 100644
@@ -24,6 +24,7 @@ Required properties:
                          brcm,brcmnand-v5.0
                          brcm,brcmnand-v6.0
                          brcm,brcmnand-v6.1
+                         brcm,brcmnand-v6.2
                          brcm,brcmnand-v7.0
                          brcm,brcmnand-v7.1
                          brcm,brcmnand
drivers/mtd/nand/brcmnand/brcmnand.c +2 -1
index e0528397306a..0b7a698cc233 100644
@@ -601,7 +601,7 @@ static void brcmnand_wr_corr_thresh(struct brcmnand_host *host, u8 val)
 
 static inline int brcmnand_cmd_shift(struct brcmnand_controller *ctrl)
 {
-	if (ctrl->nand_version < 0x0700)
+	if (ctrl->nand_version < 0x0602)
 		return 24;
 	return 0;
 }
@@ -2115,6 +2115,7 @@ static const struct of_device_id brcmnand_of_match[] = {
 	{ .compatible = "brcm,brcmnand-v5.0" },
 	{ .compatible = "brcm,brcmnand-v6.0" },
 	{ .compatible = "brcm,brcmnand-v6.1" },
+	{ .compatible = "brcm,brcmnand-v6.2" },
 	{ .compatible = "brcm,brcmnand-v7.0" },
 	{ .compatible = "brcm,brcmnand-v7.1" },
 	{},
Signature · 1 line
2.1.0
Signature · 3 lines
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com