/*
* Slave transactions callback to the slave device to allow
* synchronization of slave DMA signals with the DMAC enable
*/
static void pl08x_issue_pending(struct dma_chan *chan)
{
struct pl08x_dma_chan *local_chan
= container_of(chan, struct pl08x_dma_chan, chan);
int pl08x_chan_num = local_chan->chan_id;
if (local_chan->at) {
if (!local_chan->at->active) {
pl08x_set_cregs(local_chan->at, local_chan->chan_id);
if (local_chan->slave) {
/*
* Allow slaves to activate signals
* concurrent to the DMAC enable
*/
if (local_chan->at->tx.callback) {
((struct pl08x_callback_param *)
local_chan->at->tx.callback_param)->act =
PL08X_SIGNAL_START;
local_chan->at->tx.callback(
local_chan->at->tx.callback_param);
}
}
pl08x_enable_dmac_chan(local_chan->chan_id);
local_chan->at->active = 1;
}
/*
* else skip active transfer
* Calls with active txd occur for NET_DMA
* - there can be queued descriptors
*/
}
/*
* else - calls with no active descriptor occur for NET_DMA
*/
}
|
真正的提交DMA请求,进行DMA传输的函数 |
|
如果当前没人在用此channel,那么就可以真正去使用了,先去设置寄存器的值,然后通知client DMA开始了,最后真正的设置物理上的寄存器,开始DMA传输 |