Commit 7604baf3 authored by Roger Quadros's avatar Roger Quadros

ARM: OMAP2+: gpmc: Error out if timings fail in gpmc_probe_generic_child()

gpmc_cs_set_timings() returns non-zero if there was
an error while setting the GPMC timings. e.g. Timing was too
large to be accomodated with current GPMC clock frequency and available
timing range. Fail in this case, else we risk operating a NOR device
with non compliant timings.
Signed-off-by: default avatarRoger Quadros <rogerq@ti.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
parent 80323742
...@@ -1562,7 +1562,12 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, ...@@ -1562,7 +1562,12 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
goto err; goto err;
gpmc_read_timings_dt(child, &gpmc_t); gpmc_read_timings_dt(child, &gpmc_t);
gpmc_cs_set_timings(cs, &gpmc_t); ret = gpmc_cs_set_timings(cs, &gpmc_t);
if (ret) {
dev_err(&pdev->dev, "failed to set gpmc timings for: %s\n",
child->name);
goto err;
}
no_timings: no_timings:
if (of_platform_device_create(child, NULL, &pdev->dev)) if (of_platform_device_create(child, NULL, &pdev->dev))
......
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