diff options
author | Stanley.Miao <stanley.miao@windriver.com> | 2009-01-29 11:57:12 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-01-29 11:57:12 -0500 |
commit | 06151158f2da4764479b4ec01688dc4bade6ce9d (patch) | |
tree | b78b3f2ccde6e3d49e9f35bad3352fbfd9a3eca2 /arch/arm/plat-omap/include | |
parent | 18e352e4a73465349711a9324767e1b2453383e2 (diff) |
ARM: OMAP: Fix McBSP spin_lock deadlock
A spin_lock deadlock will occur when omap_mcbsp_request() is invoked.
omap_mcbsp_request()
\- clk_enable(mcbsp->clk) [takes and holds clockfw_lock]
\- omap2_clk_enable()
\- _omap2_clk_enable()
\- omap_mcbsp_clk_enable()
\- clk_enable(child clock) [tries for clockfw_lock again]
mcbsp_clk is a virtual clock and it comprises several child clocks. when
enable mcbsp_clk in omap_mcbsp_request(), the enable function of mcbsp_clk
will enable its child clocks, then the deadlock occurs.
The solution is to remove the virtual clock and enable these child clocks in
omap_mcbsp_request() directly.
Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include')
-rw-r--r-- | arch/arm/plat-omap/include/mach/mcbsp.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index eef873db3d48..113c2466c86a 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h | |||
@@ -344,7 +344,8 @@ struct omap_mcbsp_platform_data { | |||
344 | u8 dma_rx_sync, dma_tx_sync; | 344 | u8 dma_rx_sync, dma_tx_sync; |
345 | u16 rx_irq, tx_irq; | 345 | u16 rx_irq, tx_irq; |
346 | struct omap_mcbsp_ops *ops; | 346 | struct omap_mcbsp_ops *ops; |
347 | char const *clk_name; | 347 | char const **clk_names; |
348 | int num_clks; | ||
348 | }; | 349 | }; |
349 | 350 | ||
350 | struct omap_mcbsp { | 351 | struct omap_mcbsp { |
@@ -376,7 +377,8 @@ struct omap_mcbsp { | |||
376 | /* Protect the field .free, while checking if the mcbsp is in use */ | 377 | /* Protect the field .free, while checking if the mcbsp is in use */ |
377 | spinlock_t lock; | 378 | spinlock_t lock; |
378 | struct omap_mcbsp_platform_data *pdata; | 379 | struct omap_mcbsp_platform_data *pdata; |
379 | struct clk *clk; | 380 | struct clk **clks; |
381 | int num_clks; | ||
380 | }; | 382 | }; |
381 | extern struct omap_mcbsp **mcbsp_ptr; | 383 | extern struct omap_mcbsp **mcbsp_ptr; |
382 | extern int omap_mcbsp_count; | 384 | extern int omap_mcbsp_count; |