dma_cap_set(DMA_MEMCPY, mask);//direction:memory to memorychan = dma_request_channel(mask,NULL,NULL);//request a dma channelprintk(KERN_INFO"dma channel id = %d\n",chan->chan_id); flags= DMA_CTRL_ACK |DMA_PREP_INTERRUPT; dev= chan->device;return0; }voiddmatest_exit(void) { unr...
enum dma_ctrl_flags - DMA flags to augment operation preparation,/ control completion, and communicate status. @DMA_PREP_INTERRUPT - trigger an interrupt (callback) upon completion of this transaction 传输完毕后产生一次中断 @DMA_CTRL_ACK - if clear, the descriptor cannot be reused until the cl...
例如 ack 中断,read HW FIFO to ram 等 (3)如果是共享中断,那么获取硬件中断状态以便判断是否是本中断发生 除此之外,其他的内容都是放到 bottom half 中处理。在把中断处理过程划分成 top half 和 bottom half 之后,关中断的 top half 被瘦身,可以非常快速的执行完毕,大大减少了系统关中断的时间,提高了系统的...
DMA_CTRL_开头的标记,包括: DMA_CTRL_REUSE,表明这个描述符可以被重复使用,直到它被清除或者释放; DMA_CTRL_ACK,如果该flag为0,表明暂时不能被重复使用。 */ enumdma_ctrl_flags flags;/* not a 'long' to pack with cookie */ //该描述符的物理地址 dma_addr_tphys; //对应的dma channel structdma_...
flags:DMA_CTRL_XXX,例如:DMA_CTRL_REUSE:表明这个描述符可以被重复使用;DMA_CTRL_ACK:表明暂时不能被重复使用 tx_submit:controller driver提供的回调函数,用于把该描述符提交到待传输列表 callback、callback_param:传输完成的回调函数(及参数) (3)操作API接口struct dma_chan *dma_request_channel(dma_cap_mask...
DMA_CTRL_ACK,如果该flag为0,表明暂时不能被重复使用。 phys,该描述符的物理地址??不太懂! chan,对应的dma channel。 tx_submit,controller driver提供的回调函数,用于把改描述符提交到待传输列表。通常由dma engine调用,client driver不会直接和该接口打交道。
DMA_CTRL_ACK 如果清除,提供程序不能在客户端确认接收之前重用描述符,即在客户端有机会建立任何依赖链之前。 可以通过调用async_tx_ack()来确认。 如果设置,不意味着描述符可以被重用。 DMA_CTRL_REUSE 如果设置,描述符在完成后可以被重用。如果设置了此标志,则提供程序不应释放它。
struct dma_async_tx_descriptor { dma_cookie_t cookie; /* DMA_CTRL_开头的标记,包括: DMA_CTRL_REUSE,表明这个描述符可以被重复使用,直到它被清除或者释放; DMA_CTRL_ACK,如果该flag为0,表明暂时不能被重复使用。 */ enum dma_ctrl_flags flags; /* not a 'long' to pack with cookie */ //该描...
flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT; dev = chan->device; } 释放DMA void dma_del(void) { //free memory and dma channel dma_free_coherent(NULL, MM_SIZE, dst, &dma_dst); dma_release_channel(chan); } 向DMA引擎发起一个传输请求 ...
DMA_CTRL_ACK,如果该flag为0,表明暂时不能被重复使用。 phys,该描述符的物理地址??不太懂! chan,对应的dma channel。 tx_submit,controller driver提供的回调函数,用于把改描述符提交到待传输列表。通常由dma engine调用,client driver不会直接和该接口打交道。