diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-06-26 14:45:12 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-06-26 18:20:37 +0200 |
commit | 84d489f64f3b382d5544e342f66d8806e94e85d3 (patch) | |
tree | dca318969c99733fc177e8564ccad33beb4d2c58 /target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch | |
parent | 3bf35126733a4b4073c1d3388e226c2a8f79d65b (diff) | |
download | upstream-84d489f64f3b382d5544e342f66d8806e94e85d3.tar.gz upstream-84d489f64f3b382d5544e342f66d8806e94e85d3.tar.bz2 upstream-84d489f64f3b382d5544e342f66d8806e94e85d3.zip |
kernel: update to version 4.4.14
Changelog: https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.4.14
Some manual changes to target/linux/generic/patches-4.4/610-
netfilter_match_bypass_default_checks.patch were needed.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch')
-rw-r--r-- | target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch b/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch index 4c45e4f8a1..087d923f7d 100644 --- a/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch +++ b/target/linux/lantiq/patches-4.4/0160-owrt-lantiq-multiple-flash.patch @@ -82,7 +82,6 @@ - if (!ltq_mtd->res) { - dev_err(&pdev->dev, "failed to get memory resource\n"); - return -ENOENT; -- } + for (i = 0; i < pdev->num_resources; i++) { + printk(KERN_NOTICE "lantiq nor flash device: %.8llx at %.8llx\n", + (unsigned long long)resource_size(&pdev->resource[i]), @@ -95,27 +94,14 @@ + dev_err(&pdev->dev, "Could not reserve memory region\n"); + return -ENOMEM; + } - -- ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info), -- GFP_KERNEL); -- if (!ltq_mtd->map) -- return -ENOMEM; ++ + ltq_mtd->map[i].name = ltq_map_name; + ltq_mtd->map[i].bankwidth = 2; + ltq_mtd->map[i].read = ltq_read16; + ltq_mtd->map[i].write = ltq_write16; + ltq_mtd->map[i].copy_from = ltq_copy_from; + ltq_mtd->map[i].copy_to = ltq_copy_to; - -- if (of_find_property(pdev->dev.of_node, "lantiq,noxip", NULL)) -- ltq_mtd->map->phys = NO_XIP; -- else -- ltq_mtd->map->phys = ltq_mtd->res->start; -- ltq_mtd->res->start; -- ltq_mtd->map->size = resource_size(ltq_mtd->res); -- ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res); -- if (IS_ERR(ltq_mtd->map->virt)) -- return PTR_ERR(ltq_mtd->map->virt); ++ + if (of_find_property(pdev->dev.of_node, "lantiq,noxip", NULL)) + ltq_mtd->map[i].phys = NO_XIP; + else @@ -125,30 +111,18 @@ + ltq_mtd->map[i].size); + if (IS_ERR(ltq_mtd->map[i].virt)) + return PTR_ERR(ltq_mtd->map[i].virt); - -- ltq_mtd->map->name = ltq_map_name; -- ltq_mtd->map->bankwidth = 2; -- ltq_mtd->map->read = ltq_read16; -- ltq_mtd->map->write = ltq_write16; -- ltq_mtd->map->copy_from = ltq_copy_from; -- ltq_mtd->map->copy_to = ltq_copy_to; ++ + if (ltq_mtd->map[i].virt == NULL) { + dev_err(&pdev->dev, "Failed to ioremap flash region\n"); + err = PTR_ERR(ltq_mtd->map[i].virt); + goto err_out; + } - -- ltq_mtd->map->map_priv_1 = LTQ_NOR_PROBING; -- ltq_mtd->mtd = do_map_probe("cfi_probe", ltq_mtd->map); -- ltq_mtd->map->map_priv_1 = LTQ_NOR_NORMAL; ++ + ltq_mtd->map[i].map_priv_1 = LTQ_NOR_PROBING; + for (type = rom_probe_types; !ltq_mtd->mtd[i] && *type; type++) + ltq_mtd->mtd[i] = do_map_probe(*type, <q_mtd->map[i]); + ltq_mtd->map[i].map_priv_1 = LTQ_NOR_NORMAL; - -- if (!ltq_mtd->mtd) { -- dev_err(&pdev->dev, "probing failed\n"); -- return -ENXIO; ++ + if (!ltq_mtd->mtd[i]) { + dev_err(&pdev->dev, "probing failed\n"); + return -ENXIO; @@ -164,7 +138,10 @@ + cfi->addr_unlock2 ^= 1; } -- ltq_mtd->mtd->dev.parent = &pdev->dev; +- ltq_mtd->map = devm_kzalloc(&pdev->dev, sizeof(struct map_info), +- GFP_KERNEL); +- if (!ltq_mtd->map) +- return -ENOMEM; + if (devices_found == 1) { + ltq_mtd->cmtd = ltq_mtd->mtd[0]; + } else if (devices_found > 1) { @@ -176,6 +153,34 @@ + err = -ENXIO; + } +- if (of_find_property(pdev->dev.of_node, "lantiq,noxip", NULL)) +- ltq_mtd->map->phys = NO_XIP; +- else +- ltq_mtd->map->phys = ltq_mtd->res->start; +- ltq_mtd->res->start; +- ltq_mtd->map->size = resource_size(ltq_mtd->res); +- ltq_mtd->map->virt = devm_ioremap_resource(&pdev->dev, ltq_mtd->res); +- if (IS_ERR(ltq_mtd->map->virt)) +- return PTR_ERR(ltq_mtd->map->virt); +- +- ltq_mtd->map->name = ltq_map_name; +- ltq_mtd->map->bankwidth = 2; +- ltq_mtd->map->read = ltq_read16; +- ltq_mtd->map->write = ltq_write16; +- ltq_mtd->map->copy_from = ltq_copy_from; +- ltq_mtd->map->copy_to = ltq_copy_to; +- +- ltq_mtd->map->map_priv_1 = LTQ_NOR_PROBING; +- ltq_mtd->mtd = do_map_probe("cfi_probe", ltq_mtd->map); +- ltq_mtd->map->map_priv_1 = LTQ_NOR_NORMAL; +- +- if (!ltq_mtd->mtd) { +- dev_err(&pdev->dev, "probing failed\n"); +- return -ENXIO; +- } +- +- ltq_mtd->mtd->dev.parent = &pdev->dev; +- - cfi = ltq_mtd->map->fldrv_priv; - cfi->addr_unlock1 ^= 1; - cfi->addr_unlock2 ^= 1; |