希望获得Linux下Cortex-A8 SPI dma的驱动实例,背景信息如下:
1.芯片:TI omap3715
2.第三方评估板:天漠公司Devkit8500
3.系统:Linux 2.6.32
4.刚接触Ti系列的芯片
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
希望获得Linux下Cortex-A8 SPI dma的驱动实例,背景信息如下:
1.芯片:TI omap3715
2.第三方评估板:天漠公司Devkit8500
3.系统:Linux 2.6.32
4.刚接触Ti系列的芯片
因为公司方案决定,3715涉及到几个产品。
目前在linux里面,通用的request_dma(xxx,xxx)是无法用的,难道DMA跟平台有关,只能使用arch/arm/plat-omap/dma.c下的API??
3715的SPI已经可以驱动任意的OLED屏,但为了提升效能,希望用到DMA,3715的资料比较少阿
自己来解决,使用linux的系统机制实现,无需考虑平台:
1.申请一块DMA缓冲区 buf = dma_alloc_coherent(struct device *dev,size_t,dma_addr_t *handle,gfp_t gfp)
2.将上述函数返回的总线地址赋值给spi_transfer x结构体:x.rx_buf = dma_addr_t
3.应用层往缓冲区写数据:copy_from_usr(buf, user_buf, count)
4.使用 spi_sync(spi, &m) 传输spi_message