ARM: BCM5301X: Specify NAND chip select and ECC in separated files
authorRafał Miłecki <zajec5@gmail.com>
Mon, 6 Jun 2016 07:43:49 +0000 (09:43 +0200)
committerFlorian Fainelli <f.fainelli@gmail.com>
Thu, 7 Jul 2016 02:42:26 +0000 (19:42 -0700)
Using separated file with common chip select parameters will allow us
adding other ECC setups without code duplication.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
arch/arm/boot/dts/bcm5301x-nand-cs0-bch8.dtsi
arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi [new file with mode: 0644]

index d10781e36f54e85aaf5edc65a51862f3caf6de90..9a9630ded306a2f96e3f581f9761ed2e4cedde53 100644 (file)
@@ -9,16 +9,10 @@
  * Licensed under the GNU/GPL. See COPYING for details.
  */
 
-/ {
-       nand@18028000 {
-               nandcs@0 {
-                       compatible = "brcm,nandcs";
-                       reg = <0>;
-                       #address-cells = <1>;
-                       #size-cells = <1>;
+#include "bcm5301x-nand-cs0.dtsi"
 
-                       nand-ecc-strength = <8>;
-                       nand-ecc-step-size = <512>;
-               };
-       };
+&nandcs {
+       nand-ecc-algo = "bch";
+       nand-ecc-strength = <8>;
+       nand-ecc-step-size = <512>;
 };
diff --git a/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi b/arch/arm/boot/dts/bcm5301x-nand-cs0.dtsi
new file mode 100644 (file)
index 0000000..1684951
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+ * Broadcom Northstar NAND.
+ *
+ * Copyright (C) 2015 Hauke Mehrtens <hauke@hauke-m.de>
+ *
+ * Licensed under the GNU/GPL. See COPYING for details.
+ */
+
+/ {
+       nand@18028000 {
+               nandcs: nandcs@0 {
+                       compatible = "brcm,nandcs";
+                       reg = <0>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+               };
+       };
+};