From f1d84023cb38d9159d3f5bcf290dd100ca724690 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 12 Nov 2017 23:06:30 +0100 Subject: lantiq: kernel 4.14: update patches and config Signed-off-by: Hauke Mehrtens Signed-off-by: Mathias Kresin --- .../0160-owrt-lantiq-multiple-flash.patch | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'target/linux/lantiq/patches-4.14/0160-owrt-lantiq-multiple-flash.patch') diff --git a/target/linux/lantiq/patches-4.14/0160-owrt-lantiq-multiple-flash.patch b/target/linux/lantiq/patches-4.14/0160-owrt-lantiq-multiple-flash.patch index fd8b7b8923..304ff4bac8 100644 --- a/target/linux/lantiq/patches-4.14/0160-owrt-lantiq-multiple-flash.patch +++ b/target/linux/lantiq/patches-4.14/0160-owrt-lantiq-multiple-flash.patch @@ -71,9 +71,9 @@ + }; + const char **type; - if (of_machine_is_compatible("lantiq,falcon") && - (ltq_boot_select() != BS_FLASH)) { -@@ -126,75 +162,89 @@ ltq_mtd_probe(struct platform_device *pd + ltq_mtd = devm_kzalloc(&pdev->dev, sizeof(struct ltq_mtd), GFP_KERNEL); + if (!ltq_mtd) +@@ -120,75 +156,89 @@ ltq_mtd_probe(struct platform_device *pd platform_set_drvdata(pdev, ltq_mtd); @@ -141,17 +141,7 @@ - GFP_KERNEL); - if (!ltq_mtd->map) - return -ENOMEM; -+ if (devices_found == 1) { -+ ltq_mtd->cmtd = ltq_mtd->mtd[0]; -+ } else if (devices_found > 1) { -+ /* -+ * We detected multiple devices. Concatenate them together. -+ */ -+ ltq_mtd->cmtd = mtd_concat_create(ltq_mtd->mtd, devices_found, dev_name(&pdev->dev)); -+ if (ltq_mtd->cmtd == NULL) -+ err = -ENXIO; -+ } - +- - if (of_find_property(pdev->dev.of_node, "lantiq,noxip", NULL)) - ltq_mtd->map->phys = NO_XIP; - else @@ -176,8 +166,17 @@ - if (!ltq_mtd->mtd) { - dev_err(&pdev->dev, "probing failed\n"); - return -ENXIO; -- } -- ++ if (devices_found == 1) { ++ ltq_mtd->cmtd = ltq_mtd->mtd[0]; ++ } else if (devices_found > 1) { ++ /* ++ * We detected multiple devices. Concatenate them together. ++ */ ++ ltq_mtd->cmtd = mtd_concat_create(ltq_mtd->mtd, devices_found, dev_name(&pdev->dev)); ++ if (ltq_mtd->cmtd == NULL) ++ err = -ENXIO; + } + - ltq_mtd->mtd->dev.parent = &pdev->dev; - mtd_set_of_node(ltq_mtd->mtd, pdev->dev.of_node); - -- cgit v1.2.3