mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 18:19:02 +00:00
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
This commit is contained in:
parent
af3b4077bd
commit
a15dd8ec78
@ -98,7 +98,7 @@
|
|||||||
+ else
|
+ else
|
||||||
+ ltq_mtd->map[i].phys = pdev->resource[i].start;
|
+ ltq_mtd->map[i].phys = pdev->resource[i].start;
|
||||||
+ ltq_mtd->map[i].size = resource_size(&pdev->resource[i]);
|
+ 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);
|
+ ltq_mtd->map[i].size);
|
||||||
+ if (IS_ERR(ltq_mtd->map[i].virt))
|
+ if (IS_ERR(ltq_mtd->map[i].virt))
|
||||||
+ return PTR_ERR(ltq_mtd->map[i].virt);
|
+ return PTR_ERR(ltq_mtd->map[i].virt);
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
+ else
|
+ else
|
||||||
+ ltq_mtd->map[i].phys = pdev->resource[i].start;
|
+ ltq_mtd->map[i].phys = pdev->resource[i].start;
|
||||||
+ ltq_mtd->map[i].size = resource_size(&pdev->resource[i]);
|
+ 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);
|
+ ltq_mtd->map[i].size);
|
||||||
+ if (IS_ERR(ltq_mtd->map[i].virt))
|
+ if (IS_ERR(ltq_mtd->map[i].virt))
|
||||||
+ return PTR_ERR(ltq_mtd->map[i].virt);
|
+ return PTR_ERR(ltq_mtd->map[i].virt);
|
||||||
|
Loading…
Reference in New Issue
Block a user