SDIO interface: Handle all possible DMA combinations in all SDIO drivers.

This commit is contained in:
Gregory Nutt 2017-02-07 07:15:29 -06:00
parent 764f503150
commit 54ce3817a5
5 changed files with 29 additions and 3 deletions

View File

@ -379,8 +379,13 @@ struct kinetis_dev_s g_sdhcdev =
.callbackenable = kinetis_callbackenable,
.registercallback = kinetis_registercallback,
#ifdef CONFIG_SDIO_DMA
#ifdef CONFIG_KINETIS_SDHC_DMA
.dmarecvsetup = kinetis_dmarecvsetup,
.dmasendsetup = kinetis_dmasendsetup,
#else
.dmarecvsetup = kinetis_recvsetup,
.dmasendsetup = kinetis_sendsetup,
#endif
#endif
},
};

View File

@ -444,8 +444,13 @@ struct lpc17_dev_s g_scard_dev =
.callbackenable = lpc17_callbackenable,
.registercallback = lpc17_registercallback,
#ifdef CONFIG_SDIO_DMA
#ifdef CONFIG_LPC17_SDCARD_DMA
.dmarecvsetup = lpc17_dmarecvsetup,
.dmasendsetup = lpc17_dmasendsetup,
#else
.dmarecvsetup = lpc17_recvsetup,
.dmasendsetup = lpc17_sendsetup,
#endif
#endif
},
};

View File

@ -78,14 +78,14 @@
/* Configuration ************************************************************/
#ifndef CONFIG_SAMA5_HSMCI_DMA
#ifndef CONFIG_SAMV7_HSMCI_DMA
# warning "Large Non-DMA transfer may result in RX overrun failures"
#else
# ifndef CONFIG_SAMV7_XDMAC
# error "CONFIG_SAMA5_HSMCI_DMA support requires CONFIG_SAMV7_XDMAC"
# error "CONFIG_SAMV7_HSMCI_DMA support requires CONFIG_SAMV7_XDMAC"
# endif
# ifndef CONFIG_SDIO_DMA
# error CONFIG_SDIO_DMA must be defined with CONFIG_SAMA5_HSMCI_DMA
# error CONFIG_SDIO_DMA must be defined with CONFIG_SAMV7_HSMCI_DMA
# endif
#endif

View File

@ -525,11 +525,19 @@ struct stm32_dev_s g_sdiodev =
.callbackenable = stm32_callbackenable,
.registercallback = stm32_registercallback,
#ifdef CONFIG_SDIO_DMA
#ifdef CONFIG_STM32_SDIO_DMA
#ifdef CONFIG_SDIO_PREFLIGHT
.dmapreflight = stm32_dmapreflight,
#endif
.dmarecvsetup = stm32_dmarecvsetup,
.dmasendsetup = stm32_dmasendsetup,
#else
#ifdef CONFIG_SDIO_PREFLIGHT
.dmapreflight = NULL,
#endif
.dmarecvsetup = stm32_recvsetup,
.dmasendsetup = stm32_sendsetup,
#endif
#endif
},
};

View File

@ -592,11 +592,19 @@ struct stm32_dev_s g_sdmmcdev1 =
.callbackenable = stm32_callbackenable,
.registercallback = stm32_registercallback,
#ifdef CONFIG_SDIO_DMA
#ifdef CONFIG_STM32F7_SDMMC_DMA
#ifdef CONFIG_SDIO_PREFLIGHT
.dmapreflight = stm32_dmapreflight,
#endif
.dmarecvsetup = stm32_dmarecvsetup,
.dmasendsetup = stm32_dmasendsetup,
#else
#ifdef CONFIG_SDIO_PREFLIGHT
.dmapreflight = NULL,
#endif
.dmarecvsetup = stm32_recvsetup,
.dmasendsetup = stm32_sendsetup,
#endif
#endif
},
.base = STM32_SDMMC1_BASE,