diff options
author | Charulatha V <charu@ti.com> | 2010-08-16 19:11:01 +0530 |
---|---|---|
committer | Ricardo Perez Olivares <x0081762@ti.com> | 2010-08-17 10:00:27 -0500 |
commit | 73648374047e416930ec97daf4dbe486e4549c32 (patch) | |
tree | 6ad750604bb2d31b4663a52dbc55c487d711bf51 /drivers | |
parent | 11849e9a6e5ff2ed03630d23978fcfee6d9225a9 (diff) |
OMAP2: McSPI: Call RuntimePM APIs in non-spinlockIRQ context
This patch fixes the runtime PM APIs being called under
spinlock irq context in McSPI module during calls to omap2_mcspi_work()
This patch fixes the following warnings:
c02a0090>] (dump_stack+0x0/0x1c) from [<c005101c>] (__schedule_bug+0x60/0x70)
[<c0050fbc>] (__schedule_bug+0x0/0x70) from [<c02a06c4>] (schedule+0x84/0x4e0)
r5:c037df38 r4:c07cc8c0
[<c02a0640>] (schedule+0x0/0x4e0) from [<c02a1464>] (__mutex_lock_slowpath+0x174/0x1f4)
[<c02a12f0>] (__mutex_lock_slowpath+0x0/0x1f4) from [<c02a150c>] (mutex_lock+0x28/0x3c)
r8:00000001 r7:c037dd74 r6:dfd04400 r5:00000001 r4:c037df34
[<c02a14e4>] (mutex_lock+0x0/0x3c) from [<c003cf94>] (omap_hwmod_enable+0x20/0x40)
r5:00000001 r4:c038442c
[<c003cf74>] (omap_hwmod_enable+0x0/0x40) from [<c0043ef0>] (omap_device_enable_hwmods+0x24/0x44)
r5:00000001 r4:c038448c
[<c0043ecc>] (omap_device_enable_hwmods+0x0/0x44) from [<c0044118>] (_omap_device_activate+0x54/0x150)
r7:c037dd74 r6:dfd04400 r5:dfd04410 r4:dfd04400
[<c00440c4>] (_omap_device_activate+0x0/0x150) from [<c0044350>] (omap_device_enable+0x68/0x94)
r8:dfd044d0 r7:c039b128 r6:dfd04410 r5:dfd04410 r4:dfd04400
[<c00442e8>] (omap_device_enable+0x0/0x94) from [<c003e444>] (platform_pm_runtime_resume+0x2c/0x74)
r4:dfd04408
[<c003e418>] (platform_pm_runtime_resume+0x0/0x74) from [<c01d4110>] (__pm_runtime_resume+0x260/0x320)
r5:c039b1e8 r4:00000000
[<c01d3eb0>] (__pm_runtime_resume+0x0/0x320) from [<c01d4258>] (pm_runtime_resume+0x28/0x3c)
[<c01d4230>] (pm_runtime_resume+0x0/0x3c) from [<c01d429c>] (__pm_runtime_get+0x30/0x3c)
r5:dfd30348 r4:dfd3034c
[<c01d426c>] (__pm_runtime_get+0x0/0x3c) from [<c01db614>] (omap2_mcspi_work+0x30/0xd68)
[<c01db5e4>] (omap2_mcspi_work+0x0/0xd68) from [<c00692ac>] (worker_thread+0x154/0x1e8)
[<c0069158>] (worker_thread+0x0/0x1e8) from [<c006d048>] (kthread+0x88/0x90)
[<c006cfc0>] (kthread+0x0/0x90) from [<c005ada0>] (do_exit+0x0/0x5f0)
r7:00000000 r6:00000000 r5:00000000 r4:00000000
omap_device: omap2_mcspi.1: new worst case activate latency 0: 208190917
Signed-off-by: Charulatha V <charu@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/omap2_mcspi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c index ce64e5fce096..1f2b8512a1bb 100644 --- a/drivers/spi/omap2_mcspi.c +++ b/drivers/spi/omap2_mcspi.c @@ -1062,10 +1062,11 @@ static void omap2_mcspi_work(struct work_struct *work) struct omap2_mcspi *mcspi; mcspi = container_of(work, struct omap2_mcspi, work); - spin_lock_irq(&mcspi->lock); if (omap2_mcspi_enable_clocks(mcspi) < 0) - goto out; + return; + + spin_lock_irq(&mcspi->lock); /* We only enable one channel at a time -- the one whose message is * at the head of the queue -- although this controller would gladly @@ -1189,10 +1190,9 @@ static void omap2_mcspi_work(struct work_struct *work) spin_lock_irq(&mcspi->lock); } - omap2_mcspi_disable_clocks(mcspi); - -out: spin_unlock_irq(&mcspi->lock); + + omap2_mcspi_disable_clocks(mcspi); } static int omap2_mcspi_transfer(struct spi_device *spi, struct spi_message *m) |