linux/arch/arm/plat-omap
Paul Walmsley dc6d1cda04 OMAP2+: hwmod: upgrade per-hwmod mutex to a spinlock
Change the per-hwmod mutex to a spinlock.  (The per-hwmod lock
serializes most post-initialization hwmod operations such as enable,
idle, and shutdown.)  Spinlocks are needed, because in some cases,
hwmods must be enabled from timer interrupt disabled-context, such as
an ISR.  The current use-case that is driving this is the OMAP GPIO
block ISR: it can trigger interrupts even with its clocks disabled,
but these clocks are needed for register accesses in the ISR to succeed.

This patch also effectively reverts commit
848240223c - this patch makes
_omap_hwmod_enable() and _omap_hwmod_init() static, renames them back
to _enable() and _idle(), and changes their callers to call the
spinlocking versions.  Previously, since omap_hwmod_{enable,init}()
attempted to take mutexes, these functions could not be called while
the timer interrupt was disabled; but now that the functions use
spinlocks and save and restore the IRQ state, it is appropriate to
call them directly.

Kevin Hilman <khilman@deeprootsystems.com> originally proposed this
patch - thanks Kevin.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Benoît Cousson <b-cousson@ti.com>
2010-12-21 19:55:12 -07:00
..
include/plat OMAP2+: hwmod: upgrade per-hwmod mutex to a spinlock 2010-12-21 19:55:12 -07:00
clock.c OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks 2010-10-08 11:40:20 -06:00
common.c Merge 'staging-next' to Linus's tree 2010-10-28 09:44:56 -07:00
counter_32k.c arm: plat-omap: counter_32k: use IS_ERR() instead of NULL check 2010-12-06 16:00:16 -08:00
cpu-omap.c OMAP: plat-omap: Fix static function warnings 2010-10-08 10:12:38 -07:00
debug-devices.c omap: use smc91x_platdata to setup smc91x 2009-12-11 16:16:33 -08:00
debug-leds.c Replacing LEDS_OMAP_DEBUG with OMAP_DEBUG_LEDS 2010-07-05 17:03:58 +03:00
devices.c omap: remove dead wdt code in plat-omap/devices.c 2010-12-17 17:45:03 -08:00
dma.c OMAP: DMA: Convert DMA library into platform driver 2010-12-20 18:38:31 -08:00
dmtimer.c omap4: Fix bootup crash observed with higher CPU clocks 2010-09-24 11:30:19 +05:30
fb.c Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux 2010-10-26 10:02:39 -07:00
fb.h OMAP: plat-omap: Fix static function warnings 2010-10-08 10:12:38 -07:00
gpio.c omap1: Fix gpio mpuio bank to work for multi-omap for 7xx/15xx/16xx 2010-12-07 16:26:58 -08:00
i2c.c I2C: i2c-omap: Change device name: i2c_omap -> omap_i2c 2010-12-20 17:53:04 -08:00
io.c omap: Split omap_read/write functions for omap1 and omap2+ 2010-12-10 09:46:24 -08:00
iommu-debug.c arm/omap: use generic_file_llseek in iommu_debug 2010-09-16 10:33:11 +02:00
iommu.c OMAP: iommu: create new api to set valid da range 2010-12-15 11:29:10 -06:00
iopgtable.h omap iommu: Rename iopte_[p,v]addr -> iopte_page_[p,v]addr 2010-06-29 07:55:05 +03:00
iovmm.c OMAP: iommu: create new api to set valid da range 2010-12-15 11:29:10 -06:00
Kconfig OMAP: iommu: make iva2 iommu selectable 2010-12-15 11:33:31 -06:00
mailbox.c OMAP: mailbox: add notification support for multiple readers 2010-12-02 05:43:16 -06:00
Makefile OMAP: split plat-omap/common.c 2010-10-08 11:40:19 -06:00
mcbsp.c omap: McBSP: Make the free variable update more readable 2010-12-07 16:25:41 -08:00
mux.c omap: mux: Remove old mux code 2010-07-05 16:31:40 +03:00
ocpi.c [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
omap_device.c Merge branch 'misc_2.6.37' of git://git.pwsan.com/linux-2.6 into omap-for-linus 2010-09-27 10:18:00 -07:00
omap-pm-noop.c OMAP3: remove OPP interfaces from OMAP PM layer 2010-12-21 14:30:40 -08:00
sram.c Merge branch 'pm-next' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus 2010-12-21 16:53:00 -08:00
sram.h OMAP: plat-omap: Fix static function warnings 2010-10-08 10:12:38 -07:00
usb.c omap: Move omap1 USB platform init code into mach-omap1/usb.c 2010-07-05 16:31:30 +03:00