diff options
author | Shiraz Hashim <shiraz.hashim@st.com> | 2012-03-07 06:30:51 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-26 19:45:55 -0400 |
commit | b2acc92e144336dd29e30dc5d26439355be750b6 (patch) | |
tree | 8ecb61eb7f43e30d755b09a5d5ff34299f693612 /drivers | |
parent | e29ee57b1d33abf119cb332a3d8fa69c9cd39096 (diff) |
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')
-rw-r--r-- | drivers/mtd/nand/fsmc_nand.c | 9 |
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) | |||
729 | goto err_probe1; | 729 | goto err_probe1; |
730 | } | 730 | } |
731 | 731 | ||
732 | host->resaddr = request_mem_region(res->start + PLAT_NAND_ALE, | 732 | host->resaddr = request_mem_region(res->start + pdata->ale_off, |
733 | resource_size(res), pdev->name); | 733 | resource_size(res), pdev->name); |
734 | if (!host->resaddr) { | 734 | if (!host->resaddr) { |
735 | ret = -EIO; | 735 | ret = -EIO; |
736 | goto err_probe1; | 736 | goto err_probe1; |
737 | } | 737 | } |
738 | 738 | ||
739 | host->addr_va = ioremap(res->start + PLAT_NAND_ALE, resource_size(res)); | 739 | host->addr_va = ioremap(res->start + pdata->ale_off, |
740 | resource_size(res)); | ||
740 | if (!host->addr_va) { | 741 | if (!host->addr_va) { |
741 | ret = -EIO; | 742 | ret = -EIO; |
742 | goto err_probe1; | 743 | goto err_probe1; |
743 | } | 744 | } |
744 | 745 | ||
745 | host->rescmd = request_mem_region(res->start + PLAT_NAND_CLE, | 746 | host->rescmd = request_mem_region(res->start + pdata->cle_off, |
746 | resource_size(res), pdev->name); | 747 | resource_size(res), pdev->name); |
747 | if (!host->rescmd) { | 748 | if (!host->rescmd) { |
748 | ret = -EIO; | 749 | ret = -EIO; |
749 | goto err_probe1; | 750 | goto err_probe1; |
750 | } | 751 | } |
751 | 752 | ||
752 | host->cmd_va = ioremap(res->start + PLAT_NAND_CLE, resource_size(res)); | 753 | host->cmd_va = ioremap(res->start + pdata->cle_off, resource_size(res)); |
753 | if (!host->cmd_va) { | 754 | if (!host->cmd_va) { |
754 | ret = -EIO; | 755 | ret = -EIO; |
755 | goto err_probe1; | 756 | goto err_probe1; |