]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mtd: nand: denali_dt: enable HW_ECC_FIXUP for Altera SOCFPGA variant
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 30 Mar 2017 06:45:53 +0000 (15:45 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 25 Apr 2017 12:18:34 +0000 (14:18 +0200)
There are various customizable parameters, so several variants for
this IP.  A generic compatible like "denali,denali-nand-dt" is
useless.  Moreover, there are multiple things wrong with this string.
(Refer to Rob's comment [1])

The "denali,denali-nand-dt" was added by Altera for the SOCFPGA port.
Replace it with a more specific string "altr,socfpga-denali-nand".
There are no users (in upstream) of the old compatible string.

The Denali IP on SOCFPGA incorporates the hardware ECC fixup engine.
So, this capability should be associated with the compatible.

[1] https://lkml.org/lkml/2016/12/1/450

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Documentation/devicetree/bindings/mtd/denali-nand.txt
drivers/mtd/nand/denali_dt.c

index b04d03a1d49951a0fe6fbecde446fb523919f811..6f4ab4c9bebccf4b7077a6aa6799ebbe55fb4288 100644 (file)
@@ -1,7 +1,8 @@
 * Denali NAND controller
 
 Required properties:
-  - compatible : should be "denali,denali-nand-dt"
+  - compatible : should be one of the following:
+      "altr,socfpga-denali-nand"            - for Altera SOCFPGA
   - reg : should contain registers location and length for data and reg.
   - reg-names: Should contain the reg names "nand_data" and "denali_reg"
   - interrupts : The interrupt number.
@@ -15,7 +16,7 @@ Examples:
 nand: nand@ff900000 {
        #address-cells = <1>;
        #size-cells = <1>;
-       compatible = "denali,denali-nand-dt";
+       compatible = "altr,socfpga-denali-nand";
        reg = <0xff900000 0x100000>, <0xffb80000 0x10000>;
        reg-names = "nand_data", "denali_reg";
        interrupts = <0 144 4>;
index 293ddb8e5a320ddd90e355c1d7832873613745e8..9577bfde960e9b553fd171e9328cb682cc449058 100644 (file)
@@ -33,11 +33,17 @@ struct denali_dt_data {
        unsigned int caps;
 };
 
-static const struct of_device_id denali_nand_dt_ids[] = {
-               { .compatible = "denali,denali-nand-dt" },
-               { /* sentinel */ }
-       };
+static const struct denali_dt_data denali_socfpga_data = {
+       .caps = DENALI_CAP_HW_ECC_FIXUP,
+};
 
+static const struct of_device_id denali_nand_dt_ids[] = {
+       {
+               .compatible = "altr,socfpga-denali-nand",
+               .data = &denali_socfpga_data,
+       },
+       { /* sentinel */ }
+};
 MODULE_DEVICE_TABLE(of, denali_nand_dt_ids);
 
 static u64 denali_dma_mask;