diff options
author | John Crispin <john@openwrt.org> | 2015-02-14 20:48:26 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-02-14 20:48:26 +0000 |
commit | a15dd8ec78ca8acbec00f5535538961f0ec23f71 (patch) | |
tree | 3fca01f205c81d733f1e40a636b1df5fbcb7b78a /target/linux/lantiq | |
parent | af3b4077bd1652163f7aa1c2df63f0f024017dcf (diff) | |
download | mtk-20170518-a15dd8ec78ca8acbec00f5535538961f0ec23f71.zip mtk-20170518-a15dd8ec78ca8acbec00f5535538961f0ec23f71.tar.gz mtk-20170518-a15dd8ec78ca8acbec00f5535538961f0ec23f71.tar.bz2 |
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>
SVN-Revision: 44450
Diffstat (limited to 'target/linux/lantiq')
-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 ac644ab..1848247 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 de0076a..f276d7b 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); |