In multi audio play/stop case,sdma_alloc_chan_resources/
sdma_free_chan_resources will be called quickly, especially,dma done
interrupt comes after sdma_free_chan_resources, thus, system will be
hang in interrupt since it'll check sdma register but clocks have
already been disabled in sdma_free_chan_resources. To avoid it, enable
clock in isr.
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit
09b55a84522fbf404d6cd82b4640a93672c2aa27)
struct sdma_engine *sdma = dev_id;
unsigned long stat;
+ clk_enable(sdma->clk_ipg);
+ clk_enable(sdma->clk_ahb);
+
stat = readl_relaxed(sdma->regs + SDMA_H_INTR);
writel_relaxed(stat, sdma->regs + SDMA_H_INTR);
/* channel 0 is special and not handled here, see run_channel0() */
spin_unlock(&sdmac->vc.lock);
}
+ clk_disable(sdma->clk_ipg);
+ clk_disable(sdma->clk_ahb);
+
return IRQ_HANDLED;
}