Commit fd065806 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Sekhar Nori

mtd: rawnand: davinci: stop using pdev->id as chipselect

All platform now use the core_chipsel field in platform data. Stop
using pdev->id in the driver.
Acked-by: default avatarBoris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent 36bd4c4e
...@@ -547,7 +547,7 @@ static struct davinci_nand_pdata ...@@ -547,7 +547,7 @@ static struct davinci_nand_pdata
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
if (!of_property_read_u32(pdev->dev.of_node, if (!of_property_read_u32(pdev->dev.of_node,
"ti,davinci-chipselect", &prop)) "ti,davinci-chipselect", &prop))
pdev->id = prop; pdata->core_chipsel = prop;
else else
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
...@@ -629,7 +629,7 @@ static int nand_davinci_probe(struct platform_device *pdev) ...@@ -629,7 +629,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
return -ENODEV; return -ENODEV;
/* which external chipselect will we be managing? */ /* which external chipselect will we be managing? */
if (pdev->id < 0 || pdev->id > 3) if (pdata->core_chipsel < 0 || pdata->core_chipsel > 3)
return -ENODEV; return -ENODEV;
info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
...@@ -685,7 +685,7 @@ static int nand_davinci_probe(struct platform_device *pdev) ...@@ -685,7 +685,7 @@ static int nand_davinci_probe(struct platform_device *pdev)
info->ioaddr = (uint32_t __force) vaddr; info->ioaddr = (uint32_t __force) vaddr;
info->current_cs = info->ioaddr; info->current_cs = info->ioaddr;
info->core_chipsel = pdev->id; info->core_chipsel = pdata->core_chipsel;
info->mask_chipsel = pdata->mask_chipsel; info->mask_chipsel = pdata->mask_chipsel;
/* use nandboot-capable ALE/CLE masks by default */ /* use nandboot-capable ALE/CLE masks by default */
......
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