diff options
author | John Crispin <blogic@openwrt.org> | 2015-02-14 20:48:26 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2015-02-14 20:48:26 +0000 |
commit | 92219e2626723719719c97a1d1a7dad580fc9193 (patch) | |
tree | 52221d7996471f5ec1288e8c5d34a6d5d32e932f /target | |
parent | 066c67fc9699f3be5a5b4c746a6a4f857f77c2d2 (diff) | |
download | master-187ad058-92219e2626723719719c97a1d1a7dad580fc9193.tar.gz master-187ad058-92219e2626723719719c97a1d1a7dad580fc9193.tar.bz2 master-187ad058-92219e2626723719719c97a1d1a7dad580fc9193.zip |
lantiq: Fix flash for targets with NO_XIP
For targets with NO_XIP ltq_mtd->map[i].phys equals -1 and devm_ioremap fails.
Fix this by using pdev->resource[i].start instead.
Signed-off-by: Matti Laakso <malaakso@elisanet.fi>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44450 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/lantiq/patches-3.14/0160-owrt-lantiq-multiple-flash.patch | 2 | ||||
-rw-r--r-- | target/linux/lantiq/patches-3.18/0160-owrt-lantiq-multiple-flash.patch | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/lantiq/patches-3.14/0160-owrt-lantiq-multiple-flash.patch b/target/linux/lantiq/patches-3.14/0160-owrt-lantiq-multiple-flash.patch index ac644abb51..184824716d 100644 --- a/target/linux/lantiq/patches-3.14/0160-owrt-lantiq-multiple-flash.patch +++ b/target/linux/lantiq/patches-3.14/0160-owrt-lantiq-multiple-flash.patch @@ -98,7 +98,7 @@ + else + ltq_mtd->map[i].phys = pdev->resource[i].start; + ltq_mtd->map[i].size = resource_size(&pdev->resource[i]); -+ ltq_mtd->map[i].virt = devm_ioremap(&pdev->dev, ltq_mtd->map[i].phys, ++ ltq_mtd->map[i].virt = devm_ioremap(&pdev->dev, pdev->resource[i].start, + ltq_mtd->map[i].size); + if (IS_ERR(ltq_mtd->map[i].virt)) + return PTR_ERR(ltq_mtd->map[i].virt); diff --git a/target/linux/lantiq/patches-3.18/0160-owrt-lantiq-multiple-flash.patch b/target/linux/lantiq/patches-3.18/0160-owrt-lantiq-multiple-flash.patch index de0076a433..f276d7bfc0 100644 --- a/target/linux/lantiq/patches-3.18/0160-owrt-lantiq-multiple-flash.patch +++ b/target/linux/lantiq/patches-3.18/0160-owrt-lantiq-multiple-flash.patch @@ -103,7 +103,7 @@ + else + ltq_mtd->map[i].phys = pdev->resource[i].start; + ltq_mtd->map[i].size = resource_size(&pdev->resource[i]); -+ ltq_mtd->map[i].virt = devm_ioremap(&pdev->dev, ltq_mtd->map[i].phys, ++ ltq_mtd->map[i].virt = devm_ioremap(&pdev->dev, pdev->resource[i].start, + ltq_mtd->map[i].size); + if (IS_ERR(ltq_mtd->map[i].virt)) + return PTR_ERR(ltq_mtd->map[i].virt); |