/* Try to allocate a physical channel. When successful, assign it to this virtual channel, and initiate the next descriptor. The virtual channel lock must be held at this point.  */
static void pl08x_phy_alloc_and_start(struct pl08x_dma_chan *plchan)
/* Try to allocate a physical channel. When successful, assign it to this virtual channel, and initiate the next descriptor. The virtual channel lock must be held at this point.  */
static void pl08x_phy_alloc_and_start(struct pl08x_dma_chan *plchan)
{
	struct pl08x_driver_data *pl08x = plchan->host;
	struct pl08x_phy_chan *ch;
	ch = pl08x_get_phy_channel(pl08x, plchan);
	if (!ch) {
		dev_dbg(&pl08x->adev->dev, "no physical channel available for xfer on %s\n", plchan->name);
		plchan->state = PL08X_CHAN_WAITING;
		return;
	}
	dev_dbg(&pl08x->adev->dev, "allocated physical channel %d for xfer on %s\n",
		ch->id, plchan->name);
	plchan->phychan = ch;
	plchan->state = PL08X_CHAN_RUNNING;
	pl08x_start_next_txd(plchan);
}