[PATCH 1/2] ARM: shmobile: sdhi: pass DMA filter from platform code
From: arnd@arndb.de (Arnd Bergmann)
Date: 2013-06-07 12:52:28
Also in:
linux-sh
From: arnd@arndb.de (Arnd Bergmann)
Date: 2013-06-07 12:52:28
Also in:
linux-sh
On Friday 07 June 2013 12:25:11 Guennadi Liakhovetski wrote:
quoted
/* SDHI0 */ static struct sh_mobile_sdhi_info sdhi0_info = { +#ifdef CONFIG_SH_DMAE_BASERight, that's the problem, I think. Don't think we want these #ifdefs in all shdma users - under arch/arm and arch/sh. That's why I think we need my fix in the first place to fix the compile breakage. After that we can think about improving DMA slave driver decoupling from specific DMAC drivers - if at all needed.quoted
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, + .dma_filter = shdma_chan_filter, +#endif
Well, the problem is that you check the value of dma_slave_rx/tx in order to find out whether you should do DMA in the driver. If the filter function is NULL but the values are positive, I think the driver won't actually fall back to PIO mode but just fail. Arnd