]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
OMAP: Fix McBSP spin_lock deadlock
authorStanley.Miao <stanley.miao@windriver.com>
Thu, 15 Jan 2009 09:11:52 +0000 (17:11 +0800)
committerTony Lindgren <tony@atomide.com>
Thu, 15 Jan 2009 15:37:19 +0000 (17:37 +0200)
commit596a3cf9b9fb60e5cc5d948bc88c6bf757d68b26
treefdbb7a011f8e25662d2c3724c749546d0b551bee
parent15f75b6226c2d3b82062bb721e7cb9a1d6f35efd
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>
arch/arm/mach-omap1/mcbsp.c
arch/arm/mach-omap2/mcbsp.c
arch/arm/plat-omap/include/mach/mcbsp.h
arch/arm/plat-omap/mcbsp.c