免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2983 | 回复: 0
打印 上一主题 下一主题

[硬件及驱动] 关于DMA驱动的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-05-16 10:33 |只看该作者 |倒序浏览
我在写一个DMA驱动,请教一下下面的DMA操作类型到底各是什么意思呢?
特别是DMA_SLAVE,DMA_CYCLIC,DMA_INTERRUPT,DMA_PRIVATE。
也不明白device_prep_dma_sg()跟device_prep_slave_sg()的区别。

/**
* enum dma_transaction_type - DMA transaction types/indexes
*
* Note: The DMA_ASYNC_TX capability is not to be set by drivers.  It is
* automatically set as dma devices are registered.
*/
enum dma_transaction_type {
        DMA_MEMCPY,
        DMA_XOR,
        DMA_PQ,
        DMA_XOR_VAL,
        DMA_PQ_VAL,
        DMA_INTERRUPT,
        DMA_SG,
        DMA_PRIVATE,
        DMA_ASYNC_TX,
        DMA_SLAVE,
        DMA_CYCLIC,
        DMA_INTERLEAVE,
/* last transaction type for creation of the capabilities mask */
        DMA_TX_TYPE_END,
};

        struct dma_async_tx_descriptor *(*device_prep_dma_sg)(
                struct dma_chan *chan,
                struct scatterlist *dst_sg, unsigned int dst_nents,
                struct scatterlist *src_sg, unsigned int src_nents,
                unsigned long flags);

        struct dma_async_tx_descriptor *(*device_prep_slave_sg)(
                struct dma_chan *chan, struct scatterlist *sgl,
                unsigned int sg_len, enum dma_transfer_direction direction,
                unsigned long flags, void *context);
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP