/* pl08x_terminate_phy_chan() stops the channel, clears the FIFO and clears any pending interrupt status. This should not be used for an on-going transfer, but as a method of shutting down a channel (eg, when it's no longer used) or terminating a transfer.  */
static void pl08x_terminate_phy_chan(struct pl08x_driver_data *pl08x, struct pl08x_phy_chan *ch)
/* pl08x_terminate_phy_chan() stops the channel, clears the FIFO and clears any pending interrupt status. This should not be used for an on-going transfer, but as a method of shutting down a channel (eg, when it's no longer used) or terminating a transfer.  */
static void pl08x_terminate_phy_chan(struct pl08x_driver_data *pl08x, struct pl08x_phy_chan *ch)
{
	u32 val = readl(ch->base + PL080_CH_CONFIG);
	val &= ~(PL080_CONFIG_ENABLE | PL080_CONFIG_ERR_IRQ_MASK |
	         PL080_CONFIG_TC_IRQ_MASK);
	writel(val, ch->base + PL080_CH_CONFIG);
	writel(1 << ch->id, pl08x->base + PL080_ERR_CLEAR);
	writel(1 << ch->id, pl08x->base + PL080_TC_CLEAR);
}