diff options
author | Jon Hunter <jon-hunter@ti.com> | 2013-02-18 08:57:39 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2013-03-04 14:12:16 -0500 |
commit | 31d9adca82ce65e5c99d045b5fd917c702b6fce3 (patch) | |
tree | ebd4b2cd9340df614447a079bdfb3a54f81b4add /arch/arm/mach-omap2/gpmc.c | |
parent | 0adcbaf78f6267baf4eecc201107d8f8ff3b200c (diff) |
ARM: OMAP2+: Fix broken gpmc support
Commit 6797b4fe (ARM: OMAP2+: Prevent potential crash if GPMC probe fails)
added code to ensure that GPMC chip-selects could not be requested until the
device probe was successful. The chip-selects should have been
unreserved at the end of the probe function, but the code to unreserve
them appears to have ended up in the gpmc_calc_timings() function and
hence, this is causing problems requesting chip-selects. Fix this merge
error by unreserving the chip-selects at the end of the probe, but
before we call the gpmc child probe functions (for device-tree) which
request a chip-select.
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Philip Avinash <avinashphilip@ti.com>
Tested-by: Grazvydas Ignotas <notasas@gmail.com>
[tony@atomide.com: updated description to add breaking commit id]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index e4b16c8efe8b..410e1bac7815 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -1122,9 +1122,6 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t, | |||
1122 | /* TODO: remove, see function definition */ | 1122 | /* TODO: remove, see function definition */ |
1123 | gpmc_convert_ps_to_ns(gpmc_t); | 1123 | gpmc_convert_ps_to_ns(gpmc_t); |
1124 | 1124 | ||
1125 | /* Now the GPMC is initialised, unreserve the chip-selects */ | ||
1126 | gpmc_cs_map = 0; | ||
1127 | |||
1128 | return 0; | 1125 | return 0; |
1129 | } | 1126 | } |
1130 | 1127 | ||
@@ -1383,6 +1380,9 @@ static int gpmc_probe(struct platform_device *pdev) | |||
1383 | if (IS_ERR_VALUE(gpmc_setup_irq())) | 1380 | if (IS_ERR_VALUE(gpmc_setup_irq())) |
1384 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); | 1381 | dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); |
1385 | 1382 | ||
1383 | /* Now the GPMC is initialised, unreserve the chip-selects */ | ||
1384 | gpmc_cs_map = 0; | ||
1385 | |||
1386 | rc = gpmc_probe_dt(pdev); | 1386 | rc = gpmc_probe_dt(pdev); |
1387 | if (rc < 0) { | 1387 | if (rc < 0) { |
1388 | clk_disable_unprepare(gpmc_l3_clk); | 1388 | clk_disable_unprepare(gpmc_l3_clk); |