Commit 7c4db57c authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Sekhar Nori

ARM: davinci: aemif: stop using pdev->id as nand chipselect

All platforms now use the core_chipsel field in platform_data. Stop
using pdev->id in the aemif code.
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent fd065806
...@@ -189,7 +189,7 @@ int davinci_aemif_setup(struct platform_device *pdev) ...@@ -189,7 +189,7 @@ int davinci_aemif_setup(struct platform_device *pdev)
* Setup Async configuration register in case we did not boot * Setup Async configuration register in case we did not boot
* from NAND and so bootloader did not bother to set it up. * from NAND and so bootloader did not bother to set it up.
*/ */
val = davinci_aemif_readl(base, A1CR_OFFSET + pdev->id * 4); val = davinci_aemif_readl(base, A1CR_OFFSET + pdata->core_chipsel * 4);
/* /*
* Extended Wait is not valid and Select Strobe mode is not * Extended Wait is not valid and Select Strobe mode is not
* used * used
...@@ -198,13 +198,13 @@ int davinci_aemif_setup(struct platform_device *pdev) ...@@ -198,13 +198,13 @@ int davinci_aemif_setup(struct platform_device *pdev)
if (pdata->options & NAND_BUSWIDTH_16) if (pdata->options & NAND_BUSWIDTH_16)
val |= 0x1; val |= 0x1;
davinci_aemif_writel(base, A1CR_OFFSET + pdev->id * 4, val); davinci_aemif_writel(base, A1CR_OFFSET + pdata->core_chipsel * 4, val);
clkrate = clk_get_rate(clk); clkrate = clk_get_rate(clk);
if (pdata->timing) if (pdata->timing)
ret = davinci_aemif_setup_timing(pdata->timing, base, pdev->id, ret = davinci_aemif_setup_timing(pdata->timing, base,
clkrate); pdata->core_chipsel, clkrate);
if (ret < 0) if (ret < 0)
dev_dbg(&pdev->dev, "NAND timing values setup fail\n"); dev_dbg(&pdev->dev, "NAND timing values setup fail\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment