android_kernel_motorola_sm6225/arch/arm/plat-omap
Jon Hunter 54f32a35f4 ARM: OMAP2+: Fix dmtimer set source clock failure
Calling the dmtimer function omap_dm_timer_set_source() fails if following a
call to pm_runtime_put() to disable the timer. For example the following
sequence would fail to set the parent clock ...

	omap_dm_timer_stop(gptimer);
	omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ);

The following error message would be seen ...

omap_dm_timer_set_source: failed to set timer_32k_ck as parent

The problem is that, by design, pm_runtime_put() simply decrements the usage
count and returns before the timer has actually been disabled. Therefore,
setting the parent clock failed because the timer was still active when the
trying to set the parent clock. Setting a parent clock will fail if the clock
you are setting the parent of has a non-zero usage count. To ensure that this
does not fail use pm_runtime_put_sync() when disabling the timer.

Note that this will not be seen on OMAP1 devices, because these devices do
not use the clock framework for dmtimers.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Kevin Hilman <khilman@ti.com>
Cc: stable@vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-07 23:45:54 -07:00
..
include/plat OMAP: remove unused parameter arch_id from uncompress.h 2012-08-07 03:57:59 -07:00
clock.c ARM: OMAP: PM: Lock clocks list while generating summary 2012-06-17 11:57:50 -06:00
common.c ARM: OMAP2+: Move stubbed secure_sram_reserve function to a common.c and call it __weak 2012-07-09 19:14:38 +05:30
counter_32k.c ARM: OMAP: counter-32k: Select the CR register offset using the IP scheme 2012-07-09 19:14:39 +05:30
debug-devices.c ARM: gpio: convert includes of mach/gpio.h and asm/gpio.h to linux/gpio.h 2011-08-08 14:27:41 +01:00
debug-leds.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
devices.c ARM: OMAP: Move omap_mmc_add() to mach-omap1 2012-05-09 16:35:12 -07:00
dma.c ARM: OMAP: dma: Clear status registers on enable/disable irq 2012-06-03 22:50:42 -07:00
dmtimer.c ARM: OMAP2+: Fix dmtimer set source clock failure 2012-08-07 23:45:54 -07:00
fb.c ARM: OMAP2+: Fix compile error when FB_OMAP2 is not set 2012-03-09 09:53:21 +02:00
i2c.c ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success 2011-11-04 17:41:07 -07:00
Kconfig arm-soc: power management changes 2012-07-23 17:43:53 -07:00
mailbox.c ARM: OMAP: enable mailbox irq per instance 2012-05-13 16:09:39 +03:00
Makefile ARM: OMAP2+: All OMAP2PLUS uses omap-device.o target so add one entry 2012-07-05 08:05:14 -07:00
mux.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
omap-pm-noop.c ARM: OMAP: omap_device: remove omap_device_parent 2012-03-05 15:38:02 -08:00
omap_device.c ARM: OMAP2+: clean up some cppcheck warnings 2012-04-17 15:50:47 -06:00
sram.c ARM: OMAP5: Add minimal support for OMAP5430 SOC 2012-07-09 19:14:39 +05:30
sram.h OMAP: plat-omap: Fix static function warnings 2010-10-08 10:12:38 -07:00