• Stanley.Miao's avatar
    OMAP: Fix McBSP spin_lock deadlock · f70d6bfc
    Stanley.Miao authored
    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: default avatarStanley.Miao <stanley.miao@windriver.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    f70d6bfc
mcbsp.c 5.86 KB