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>
This commit is contained in:
committed by
Tony Lindgren
parent
18e352e4a7
commit
06151158f2
@@ -344,7 +344,8 @@ struct omap_mcbsp_platform_data {
|
||||
u8 dma_rx_sync, dma_tx_sync;
|
||||
u16 rx_irq, tx_irq;
|
||||
struct omap_mcbsp_ops *ops;
|
||||
char const *clk_name;
|
||||
char const **clk_names;
|
||||
int num_clks;
|
||||
};
|
||||
|
||||
struct omap_mcbsp {
|
||||
@@ -376,7 +377,8 @@ struct omap_mcbsp {
|
||||
/* Protect the field .free, while checking if the mcbsp is in use */
|
||||
spinlock_t lock;
|
||||
struct omap_mcbsp_platform_data *pdata;
|
||||
struct clk *clk;
|
||||
struct clk **clks;
|
||||
int num_clks;
|
||||
};
|
||||
extern struct omap_mcbsp **mcbsp_ptr;
|
||||
extern int omap_mcbsp_count;
|
||||
|
Reference in New Issue
Block a user