aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch
diff options
context:
space:
mode:
authorMatti Laakso <matti.laakso@outlook.com>2018-03-18 17:23:08 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2018-03-31 16:13:19 +0200
commitcae808946ae5f698d8c9e2c58b9b75e69c343c38 (patch)
treed5c642fcbc6705b4d53a0402f08ca6ff1038ce52 /target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch
parent2534141322b0541daa627a516280638c12a262fe (diff)
downloadupstream-cae808946ae5f698d8c9e2c58b9b75e69c343c38.tar.gz
upstream-cae808946ae5f698d8c9e2c58b9b75e69c343c38.tar.bz2
upstream-cae808946ae5f698d8c9e2c58b9b75e69c343c38.zip
pistachio: add kernel 4.14 support
Add patches and config for 4.14, refreshed from 4.9. Signed-off-by: Matti Laakso <matti.laakso@outlook.com>
Diffstat (limited to 'target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch')
-rw-r--r--target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch
new file mode 100644
index 0000000000..00686aaf37
--- /dev/null
+++ b/target/linux/pistachio/patches-4.14/401-mtd-nor-support-mtd-name-from-device-tree.patch
@@ -0,0 +1,34 @@
+From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
+From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
+Date: Sat, 25 Feb 2017 16:42:50 +0000
+Subject: mtd: nor: support mtd name from device tree
+
+Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma@imgtec.com>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/mtd/spi-nor/spi-nor.c
++++ b/drivers/mtd/spi-nor/spi-nor.c
+@@ -2646,6 +2646,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+ struct device *dev = nor->dev;
+ struct mtd_info *mtd = &nor->mtd;
+ struct device_node *np = spi_nor_get_flash_node(nor);
++ const char __maybe_unused *of_mtd_name = NULL;
+ int ret;
+ int i;
+
+@@ -2721,7 +2722,12 @@ int spi_nor_scan(struct spi_nor *nor, co
+ spi_nor_wait_till_ready(nor);
+ }
+
+- if (!mtd->name)
++#ifdef CONFIG_MTD_OF_PARTS
++ of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
++#endif
++ if (of_mtd_name)
++ mtd->name = of_mtd_name;
++ else if (!mtd->name)
+ mtd->name = dev_name(dev);
+ mtd->priv = nor;
+ mtd->type = MTD_NORFLASH;