summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorShiraz Hashim <shiraz.hashim@st.com>2012-03-07 12:30:51 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-27 01:45:55 +0200
commitb2acc92e144336dd29e30dc5d26439355be750b6 (patch)
tree8ecb61eb7f43e30d755b09a5d5ff34299f693612 /drivers/mtd
parentmtd: fsmc_nand: ECC1 & ECC4 layout separated for different page sizes (diff)
downloadlinux-b2acc92e144336dd29e30dc5d26439355be750b6.tar.xz
linux-b2acc92e144336dd29e30dc5d26439355be750b6.zip
mtd: fsmc: use ALE and CLE offsets from platform data
ALE and CLE offsets can be different on different devices. Let devices pass these offsets to the fsmc driver through platform data. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/fsmc_nand.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index abbff77fd106..4dda9bb38334 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -729,27 +729,28 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
goto err_probe1;
}
- host->resaddr = request_mem_region(res->start + PLAT_NAND_ALE,
+ host->resaddr = request_mem_region(res->start + pdata->ale_off,
resource_size(res), pdev->name);
if (!host->resaddr) {
ret = -EIO;
goto err_probe1;
}
- host->addr_va = ioremap(res->start + PLAT_NAND_ALE, resource_size(res));
+ host->addr_va = ioremap(res->start + pdata->ale_off,
+ resource_size(res));
if (!host->addr_va) {
ret = -EIO;
goto err_probe1;
}
- host->rescmd = request_mem_region(res->start + PLAT_NAND_CLE,
+ host->rescmd = request_mem_region(res->start + pdata->cle_off,
resource_size(res), pdev->name);
if (!host->rescmd) {
ret = -EIO;
goto err_probe1;
}
- host->cmd_va = ioremap(res->start + PLAT_NAND_CLE, resource_size(res));
+ host->cmd_va = ioremap(res->start + pdata->cle_off, resource_size(res));
if (!host->cmd_va) {
ret = -EIO;
goto err_probe1;