aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2016-05-31 08:39:53 +0200
committerMathias Kresin <dev@kresin.me>2016-11-29 21:40:16 +0100
commit860210c3731f97eec507fd1c8d4554fd80394edb (patch)
tree74b7451da73d591768a7eeb8df1e4cf3ca755a8d
parent62a347b1d9061cd0b6e1c7de7044679cfce9b674 (diff)
downloadupstream-860210c3731f97eec507fd1c8d4554fd80394edb.tar.gz
upstream-860210c3731f97eec507fd1c8d4554fd80394edb.tar.bz2
upstream-860210c3731f97eec507fd1c8d4554fd80394edb.zip
lantiq: backport kernel patch to pass of node to nand_dt_init
Backport upstream commit a61ae81a1907af1987ad4c77300508327bc48b23. The actually purpose of the patch was to do some cleanup. As a side effect of this cleanup, the device node is now passed to nand_dt_init. This allows to use the common nand device tree properties - nand-bus-width - nand-on-flash-bbt - nand-ecc-mode - nand-ecc-step-size - nand-ecc-strength for the plat_nand driver. Signed-off-by: Mathias Kresin <dev@kresin.me>
-rw-r--r--target/linux/lantiq/dts/BTHOMEHUBV5A.dts2
-rw-r--r--target/linux/lantiq/patches-4.4/0047-mtd-plat-nand-pass-of-node.patch27
2 files changed, 27 insertions, 2 deletions
diff --git a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts
index 2dea927095..e1b3e7131d 100644
--- a/target/linux/lantiq/dts/BTHOMEHUBV5A.dts
+++ b/target/linux/lantiq/dts/BTHOMEHUBV5A.dts
@@ -207,8 +207,6 @@
reg = <0x7000 0 0 0 0>;
qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
qca,disable-5ghz;
- mtd-mac-address = <&caldata 0x110c>;
- mtd-mac-address-increment = <2>;
};
};
diff --git a/target/linux/lantiq/patches-4.4/0047-mtd-plat-nand-pass-of-node.patch b/target/linux/lantiq/patches-4.4/0047-mtd-plat-nand-pass-of-node.patch
new file mode 100644
index 0000000000..f7d22b36f7
--- /dev/null
+++ b/target/linux/lantiq/patches-4.4/0047-mtd-plat-nand-pass-of-node.patch
@@ -0,0 +1,27 @@
+--- a/drivers/mtd/nand/plat_nand.c
++++ b/drivers/mtd/nand/plat_nand.c
+@@ -31,6 +31,7 @@ static int plat_nand_probe(struct platfo
+ {
+ struct platform_nand_data *pdata = dev_get_platdata(&pdev->dev);
+ struct mtd_part_parser_data ppdata;
++ struct device_node *np = pdev->dev.of_node;
+ struct plat_nand_data *data;
+ struct resource *res;
+ const char **part_types;
+@@ -58,6 +59,7 @@ static int plat_nand_probe(struct platfo
+ return PTR_ERR(data->io_base);
+
+ data->chip.priv = &data;
++ data->chip.flash_node = np;
+ data->mtd.priv = &data->chip;
+ data->mtd.dev.parent = &pdev->dev;
+
+@@ -105,7 +107,7 @@ static int plat_nand_probe(struct platfo
+
+ part_types = pdata->chip.part_probe_types;
+
+- ppdata.of_node = pdev->dev.of_node;
++ ppdata.of_node = np;
+ err = mtd_device_parse_register(&data->mtd, part_types, &ppdata,
+ pdata->chip.partitions,
+ pdata->chip.nr_partitions);