ARM: OMAP2+: Fix broken gpmc support
Subsystems (5)
PATCH 1/1 ARM: OMAP2+: Fix broken gpmc support
Commit "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.
---
Tony, GPMC support is completely broken in linux-next without this fix and a few people now are reporting this problem. Can we get this fix merged?
Thanks
Jon
arch/arm/mach-omap2/gpmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/gpmc.c +3 -3
@@ -1125,9 +1125,6 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,/* TODO: remove, see function definition */ gpmc_convert_ps_to_ns (gpmc_t); -/* Now the GPMC is initialised, unreserve the chip-selects */ - gpmc_cs_map =0 ; -return 0 ; }
@@ -1388,6 +1385,9 @@ static int gpmc_probe(struct platform_device *pdev)if (IS_ERR_VALUE (gpmc_setup_irq ()))dev_warn (gpmc_dev,"gpmc_setup_irq failed\n" ); +/* Now the GPMC is initialised, unreserve the chip-selects */ + gpmc_cs_map =0 ; + rc =gpmc_probe_dt (pdev);if (rc <0 ) {clk_disable_unprepare (gpmc_l3_clk);
Signature · 1 line
1.7.10.4
Tony Lindgren
maintainerPATCH 1/1 ARM: OMAP2+: Fix broken gpmc support
Quoted 14 lines · Jon Hunter
Commit "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 <[email protected]>Tested-by Ezequiel Garcia <[email protected]>Tested-by Philip Avinash <[email protected]>Tested-by Grazvydas Ignotas <[email protected]>
Quoted 5 lines
---
Tony, GPMC support is completely broken in linux-next without this fix and a few people now are reporting this problem. Can we get this fix merged?
Thanks applying now into omap-for-v3.9-rc1/fixes. Sorry for the delay, looks like I should have applied this earlier.
Regards,
Tony
Quoted 30 lines
arch/arm/mach-omap2/gpmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-omap2/gpmc.c +3
-3@@ -1125,9 +1125,6 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,/* TODO: remove, see function definition */ gpmc_convert_ps_to_ns (gpmc_t); -/* Now the GPMC is initialised, unreserve the chip-selects */ - gpmc_cs_map =0 ; -return 0 ; }@@ -1388,6 +1385,9 @@ static int gpmc_probe(struct platform_device *pdev)if (IS_ERR_VALUE (gpmc_setup_irq ()))dev_warn (gpmc_dev,"gpmc_setup_irq failed\n" ); +/* Now the GPMC is initialised, unreserve the chip-selects */ + gpmc_cs_map =0 ; + rc =gpmc_probe_dt (pdev);if (rc <0 ) {clk_disable_unprepare (gpmc_l3_clk);Signature · 1 line
1.7.10.4