/* This function enables the given DMA channel to interrupt the CPU.  */
static int mxs_dma_enable_irq(int channel, int enable)
/* This function enables the given DMA channel to interrupt the CPU.  */
static int mxs_dma_enable_irq(int channel, int enable)
{
	struct mxs_apbh_regs *apbh_regs =
		(struct mxs_apbh_regs *)MXS_APBH_BASE;
	int ret;
	ret = mxs_dma_validate_chan(channel);
	if (ret)
		return ret;
	if (enable)
		writel(1 << (channel + APBH_CTRL1_CH_CMDCMPLT_IRQ_EN_OFFSET),
			&apbh_regs->hw_apbh_ctrl1_set);
	else
		writel(1 << (channel + APBH_CTRL1_CH_CMDCMPLT_IRQ_EN_OFFSET),
			&apbh_regs->hw_apbh_ctrl1_clr);
	return 0;
}