STM32F7 SD/MMC driver depends on CONFIG_SDIO_DMA which is only defined in stm32/Kconfig. Changed to CONFIG_STM32F7_SDMMC_DMA and defined in stm32f7/Kconfig.

This commit is contained in:
Gregory Nutt 2016-11-07 09:16:34 -06:00
parent ac6581acec
commit dd04d73afe
3 changed files with 116 additions and 43 deletions

View File

@ -992,6 +992,10 @@ config STM32F7_SAI
bool bool
default n default n
config STM32F7_SDMMC
bool
default n
config STM32F7_SPI config STM32F7_SPI
bool bool
default n default n
@ -1006,7 +1010,6 @@ config STM32F7_USART
# These are the peripheral selections proper # These are the peripheral selections proper
config STM32F7_ADC1 config STM32F7_ADC1
bool "ADC1" bool "ADC1"
default n default n
@ -1218,6 +1221,7 @@ config STM32F7_SAI2
config STM32F7_SDMMC1 config STM32F7_SDMMC1
bool "SDMMC1" bool "SDMMC1"
default n default n
select STM32F7_SDMMC
select ARCH_HAVE_SDIO select ARCH_HAVE_SDIO
select ARCH_HAVE_SDIOWAIT_WRCOMPLETE select ARCH_HAVE_SDIOWAIT_WRCOMPLETE
select SDIO_PREFLIGHT select SDIO_PREFLIGHT
@ -1226,6 +1230,7 @@ config STM32F7_SDMMC2
bool "SDMMC2" bool "SDMMC2"
default n default n
depends on STM32F7_HAVE_SDMMC2 depends on STM32F7_HAVE_SDMMC2
select STM32F7_SDMMC
select ARCH_HAVE_SDIO select ARCH_HAVE_SDIO
select ARCH_HAVE_SDIOWAIT_WRCOMPLETE select ARCH_HAVE_SDIOWAIT_WRCOMPLETE
select SDIO_PREFLIGHT select SDIO_PREFLIGHT
@ -1718,9 +1723,12 @@ config STM32F7_I2C_DUTY16_9
endmenu # "I2C Configuration" endmenu # "I2C Configuration"
menu "SD/MMC Configuration"
depends on STM32F7_SDMMC
config STM32F7_SDMMC_XFRDEBUG config STM32F7_SDMMC_XFRDEBUG
bool "SDMMC transfer debug" bool "SDMMC transfer debug"
depends on DEBUG_FS_INFO && (STM32F7_SDMMC1 || STM32F7_SDMMC2) depends on DEBUG_FS_INFO
default n default n
---help--- ---help---
Enable special debug instrumentation analyze SDMMC data transfers. Enable special debug instrumentation analyze SDMMC data transfers.
@ -1730,6 +1738,13 @@ config STM32F7_SDMMC_XFRDEBUG
enabled, then DMA register will be collected as well. Requires also enabled, then DMA register will be collected as well. Requires also
DEBUG_FS and CONFIG_DEBUG_INFO. DEBUG_FS and CONFIG_DEBUG_INFO.
config STM32F7_SDMMC_DMA
bool "Support DMA data transfers"
default n
depends on STM32F7_DMA
---help---
Support DMA data transfers.
menu "SDMMC1 Configuration" menu "SDMMC1 Configuration"
depends on STM32F7_SDMMC1 depends on STM32F7_SDMMC1
@ -1797,6 +1812,7 @@ config SDMMC2_WIDTH_D1_ONLY
Select 1-bit transfer mode. Default: 4-bit transfer mode. Select 1-bit transfer mode. Default: 4-bit transfer mode.
endmenu # "SDMMC2 Configuration" endmenu # "SDMMC2 Configuration"
endmenu # "SD/MMC Configuration"
if STM32F7_BKPSRAM if STM32F7_BKPSRAM

View File

@ -87,7 +87,7 @@
* CONFIG_SDIO_MUXBUS - Setting this configuration enables some locking * CONFIG_SDIO_MUXBUS - Setting this configuration enables some locking
* APIs to manage concurrent accesses on the SDMMC bus. This is not * APIs to manage concurrent accesses on the SDMMC bus. This is not
* needed for the simple case of a single SD card, for example. * needed for the simple case of a single SD card, for example.
* CONFIG_SDIO_DMA - Enable SDMMC. This is a marginally optional. For * CONFIG_STM32F7_SDMMC_DMA - Enable SDMMC. This is a marginally optional. For
* most usages, SDMMC will cause data overruns if used without DMA. * most usages, SDMMC will cause data overruns if used without DMA.
* NOTE the above system DMA configuration options. * NOTE the above system DMA configuration options.
* CONFIG_SDMMC_WIDTH_D1_ONLY - This may be selected to force the driver * CONFIG_SDMMC_WIDTH_D1_ONLY - This may be selected to force the driver
@ -96,16 +96,16 @@
* CONFIG_SDMMC_PRI - SDMMC interrupt priority. This setting is not very * CONFIG_SDMMC_PRI - SDMMC interrupt priority. This setting is not very
* important since interrupt nesting is not currently supported. * important since interrupt nesting is not currently supported.
* CONFIG_SDMMMC_DMAPRIO - SDMMC DMA priority. This can be selecte if * CONFIG_SDMMMC_DMAPRIO - SDMMC DMA priority. This can be selecte if
* CONFIG_SDIO_DMA is enabled. * CONFIG_STM32F7_SDMMC_DMA is enabled.
* CONFIG_CONFIG_STM32F7_SDMMC_XFRDEBUG - Enables some very low-level debug output * CONFIG_CONFIG_STM32F7_SDMMC_XFRDEBUG - Enables some very low-level debug output
* This also requires CONFIG_DEBUG_FS and CONFIG_DEBUG_INFO * This also requires CONFIG_DEBUG_FS and CONFIG_DEBUG_INFO
*/ */
#if defined(CONFIG_SDIO_DMA) && !defined(CONFIG_STM32F7_DMA2) #if defined(CONFIG_STM32F7_SDMMC_DMA) && !defined(CONFIG_STM32F7_DMA2)
# warning "CONFIG_SDIO_DMA support requires CONFIG_STM32F7_DMA2" # warning "CONFIG_STM32F7_SDMMC_DMA support requires CONFIG_STM32F7_DMA2"
#endif #endif
#ifndef CONFIG_SDIO_DMA #ifndef CONFIG_STM32F7_SDMMC_DMA
# warning "Large Non-DMA transfer may result in RX overrun failures" # warning "Large Non-DMA transfer may result in RX overrun failures"
#endif #endif
@ -118,7 +118,7 @@
# define CONFIG_SDMMC1_PRI NVIC_SYSH_PRIORITY_DEFAULT # define CONFIG_SDMMC1_PRI NVIC_SYSH_PRIORITY_DEFAULT
# endif # endif
# ifdef CONFIG_SDIO_DMA # ifdef CONFIG_STM32F7_SDMMC_DMA
# ifndef CONFIG_SDMMC1_DMAPRIO # ifndef CONFIG_SDMMC1_DMAPRIO
# define CONFIG_SDMMC1_DMAPRIO DMA_SCR_PRIVERYHI # define CONFIG_SDMMC1_DMAPRIO DMA_SCR_PRIVERYHI
# endif # endif
@ -135,7 +135,7 @@
# define CONFIG_SDMMC2_PRI NVIC_SYSH_PRIORITY_DEFAULT # define CONFIG_SDMMC2_PRI NVIC_SYSH_PRIORITY_DEFAULT
# endif # endif
# ifdef CONFIG_SDIO_DMA # ifdef CONFIG_STM32F7_SDMMC_DMA
# ifndef CONFIG_SDMMC2_DMAPRIO # ifndef CONFIG_SDMMC2_DMAPRIO
# define CONFIG_SDMMC2_DMAPRIO DMA_SCR_PRIVERYHI # define CONFIG_SDMMC2_DMAPRIO DMA_SCR_PRIVERYHI
# endif # endif
@ -307,7 +307,7 @@
/* Register logging support */ /* Register logging support */
#ifdef CONFIG_STM32F7_SDMMC_XFRDEBUG #ifdef CONFIG_STM32F7_SDMMC_XFRDEBUG
# ifdef CONFIG_SDIO_DMA # ifdef CONFIG_STM32F7_SDMMC_DMA
# define SAMPLENDX_BEFORE_SETUP 0 # define SAMPLENDX_BEFORE_SETUP 0
# define SAMPLENDX_BEFORE_ENABLE 1 # define SAMPLENDX_BEFORE_ENABLE 1
# define SAMPLENDX_AFTER_SETUP 2 # define SAMPLENDX_AFTER_SETUP 2
@ -343,7 +343,7 @@ struct stm32_dev_s
uint32_t d0_gpio; uint32_t d0_gpio;
xcpt_t wrchandler; xcpt_t wrchandler;
#endif #endif
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
uint32_t dmapri; uint32_t dmapri;
#endif #endif
@ -372,7 +372,7 @@ struct stm32_dev_s
/* DMA data transfer support */ /* DMA data transfer support */
bool widebus; /* Required for DMA support */ bool widebus; /* Required for DMA support */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
volatile uint8_t xfrflags; /* Used to synchronize SDMMC and DMA completion events */ volatile uint8_t xfrflags; /* Used to synchronize SDMMC and DMA completion events */
bool dmamode; /* true: DMA mode transfer */ bool dmamode; /* true: DMA mode transfer */
DMA_HANDLE dma; /* Handle for DMA channel */ DMA_HANDLE dma; /* Handle for DMA channel */
@ -398,7 +398,7 @@ struct stm32_sdioregs_s
struct stm32_sampleregs_s struct stm32_sampleregs_s
{ {
struct stm32_sdioregs_s sdio; struct stm32_sdioregs_s sdio;
#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) #if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_STM32F7_SDMMC_DMA)
struct stm32_dmaregs_s dma; struct stm32_dmaregs_s dma;
#endif #endif
}; };
@ -439,7 +439,7 @@ static void stm32_dumpsamples(struct stm32_dev_s *priv);
# define stm32_dumpsamples(priv) # define stm32_dumpsamples(priv)
#endif #endif
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
static void stm32_dmacallback(DMA_HANDLE handle, uint8_t status, void *arg); static void stm32_dmacallback(DMA_HANDLE handle, uint8_t status, void *arg);
#endif #endif
@ -525,7 +525,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
/* DMA */ /* DMA */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
static bool stm32_dmasupported(FAR struct sdio_dev_s *dev); static bool stm32_dmasupported(FAR struct sdio_dev_s *dev);
#ifdef CONFIG_SDIO_PREFLIGHT #ifdef CONFIG_SDIO_PREFLIGHT
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
@ -577,7 +577,7 @@ struct stm32_dev_s g_sdmmcdev1 =
.eventwait = stm32_eventwait, .eventwait = stm32_eventwait,
.callbackenable = stm32_callbackenable, .callbackenable = stm32_callbackenable,
.registercallback = stm32_registercallback, .registercallback = stm32_registercallback,
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
.dmasupported = stm32_dmasupported, .dmasupported = stm32_dmasupported,
#ifdef CONFIG_SDIO_PREFLIGHT #ifdef CONFIG_SDIO_PREFLIGHT
.dmapreflight = stm32_dmapreflight, .dmapreflight = stm32_dmapreflight,
@ -633,7 +633,7 @@ struct stm32_dev_s g_sdmmcdev2 =
.eventwait = stm32_eventwait, .eventwait = stm32_eventwait,
.callbackenable = stm32_callbackenable, .callbackenable = stm32_callbackenable,
.registercallback = stm32_registercallback, .registercallback = stm32_registercallback,
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
.dmasupported = stm32_dmasupported, .dmasupported = stm32_dmasupported,
#ifdef CONFIG_SDIO_PREFLIGHT #ifdef CONFIG_SDIO_PREFLIGHT
.dmapreflight = stm32_dmapreflight, .dmapreflight = stm32_dmapreflight,
@ -840,7 +840,7 @@ static void stm32_configwaitints(struct stm32_dev_s *priv, uint32_t waitmask,
priv->waitevents = waitevents; priv->waitevents = waitevents;
priv->wkupevent = wkupevent; priv->wkupevent = wkupevent;
priv->waitmask = waitmask; priv->waitmask = waitmask;
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
priv->xfrflags = 0; priv->xfrflags = 0;
#endif #endif
sdmmc_putreg32(priv, priv->xfrmask | priv->waitmask, STM32_SDMMC_MASK_OFFSET); sdmmc_putreg32(priv, priv->xfrmask | priv->waitmask, STM32_SDMMC_MASK_OFFSET);
@ -975,7 +975,7 @@ static void stm32_sample(struct stm32_dev_s *priv, int index)
{ {
struct stm32_sampleregs_s *regs = &g_sampleregs[index]; struct stm32_sampleregs_s *regs = &g_sampleregs[index];
#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) #if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_STM32F7_SDMMC_DMA)
if (priv->dmamode) if (priv->dmamode)
{ {
stm32_dmasample(priv->dma, &regs->dma); stm32_dmasample(priv->dma, &regs->dma);
@ -1022,7 +1022,7 @@ static void stm32_sdiodump(struct stm32_sdioregs_s *regs, const char *msg)
static void stm32_dumpsample(struct stm32_dev_s *priv, static void stm32_dumpsample(struct stm32_dev_s *priv,
struct stm32_sampleregs_s *regs, const char *msg) struct stm32_sampleregs_s *regs, const char *msg)
{ {
#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) #if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_STM32F7_SDMMC_DMA)
if (priv->dmamode) if (priv->dmamode)
{ {
stm32_dmadump(priv->dma, &regs->dma, msg); stm32_dmadump(priv->dma, &regs->dma, msg);
@ -1046,7 +1046,7 @@ static void stm32_dumpsamples(struct stm32_dev_s *priv)
{ {
stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_SETUP], "Before setup"); stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_SETUP], "Before setup");
#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) #if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_STM32F7_SDMMC_DMA)
if (priv->dmamode) if (priv->dmamode)
{ {
stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_ENABLE], "Before DMA enable"); stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_BEFORE_ENABLE], "Before DMA enable");
@ -1056,7 +1056,7 @@ static void stm32_dumpsamples(struct stm32_dev_s *priv)
stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_AFTER_SETUP], "After setup"); stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_AFTER_SETUP], "After setup");
stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_END_TRANSFER], "End of transfer"); stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_END_TRANSFER], "End of transfer");
#if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_SDIO_DMA) #if defined(CONFIG_DEBUG_DMA_INFO) && defined(CONFIG_STM32F7_SDMMC_DMA)
if (priv->dmamode) if (priv->dmamode)
{ {
stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_DMA_CALLBACK], "DMA Callback"); stm32_dumpsample(priv, &g_sampleregs[SAMPLENDX_DMA_CALLBACK], "DMA Callback");
@ -1073,7 +1073,7 @@ static void stm32_dumpsamples(struct stm32_dev_s *priv)
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
static void stm32_dmacallback(DMA_HANDLE handle, uint8_t status, void *arg) static void stm32_dmacallback(DMA_HANDLE handle, uint8_t status, void *arg)
{ {
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)arg; FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)arg;
@ -1434,7 +1434,7 @@ static void stm32_endtransfer(struct stm32_dev_s *priv,
/* If this was a DMA transfer, make sure that DMA is stopped */ /* If this was a DMA transfer, make sure that DMA is stopped */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
if (priv->dmamode) if (priv->dmamode)
{ {
/* DMA debug instrumentation */ /* DMA debug instrumentation */
@ -1537,7 +1537,7 @@ static int stm32_sdmmc_interrupt(struct stm32_dev_s *priv)
pending = enabled & priv->xfrmask; pending = enabled & priv->xfrmask;
if (pending != 0) if (pending != 0)
{ {
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
if (!priv->dmamode) if (!priv->dmamode)
#endif #endif
{ {
@ -1576,7 +1576,7 @@ static int stm32_sdmmc_interrupt(struct stm32_dev_s *priv)
/* Was this transfer performed in DMA mode? */ /* Was this transfer performed in DMA mode? */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
if (priv->dmamode) if (priv->dmamode)
{ {
/* Yes.. Terminate the transfers only if the DMA has also /* Yes.. Terminate the transfers only if the DMA has also
@ -1812,7 +1812,7 @@ static void stm32_reset(FAR struct sdio_dev_s *dev)
priv->waitevents = 0; /* Set of events to be waited for */ priv->waitevents = 0; /* Set of events to be waited for */
priv->waitmask = 0; /* Interrupt enables for event waiting */ priv->waitmask = 0; /* Interrupt enables for event waiting */
priv->wkupevent = 0; /* The event that caused the wakeup */ priv->wkupevent = 0; /* The event that caused the wakeup */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
priv->xfrflags = 0; /* Used to synchronize SDIO and DMA priv->xfrflags = 0; /* Used to synchronize SDIO and DMA
* completion events */ * completion events */
#endif #endif
@ -1828,7 +1828,7 @@ static void stm32_reset(FAR struct sdio_dev_s *dev)
/* DMA data transfer support */ /* DMA data transfer support */
priv->widebus = false; /* Required for DMA support */ priv->widebus = false; /* Required for DMA support */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
priv->dmamode = false; /* true: DMA mode transfer */ priv->dmamode = false; /* true: DMA mode transfer */
#endif #endif
@ -2108,7 +2108,7 @@ static int stm32_recvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer,
priv->buffer = (uint32_t *)buffer; priv->buffer = (uint32_t *)buffer;
priv->remaining = nbytes; priv->remaining = nbytes;
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
priv->dmamode = false; priv->dmamode = false;
#endif #endif
@ -2163,7 +2163,7 @@ static int stm32_sendsetup(FAR struct sdio_dev_s *dev, FAR const
priv->buffer = (uint32_t *)buffer; priv->buffer = (uint32_t *)buffer;
priv->remaining = nbytes; priv->remaining = nbytes;
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
priv->dmamode = false; priv->dmamode = false;
#endif #endif
@ -2217,7 +2217,7 @@ static int stm32_cancel(FAR struct sdio_dev_s *dev)
/* If this was a DMA transfer, make sure that DMA is stopped */ /* If this was a DMA transfer, make sure that DMA is stopped */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
if (priv->dmamode) if (priv->dmamode)
{ {
/* Make sure that the DMA is stopped (it will be stopped automatically /* Make sure that the DMA is stopped (it will be stopped automatically
@ -2712,7 +2712,7 @@ static sdio_eventset_t stm32_eventwait(FAR struct sdio_dev_s *dev,
/* Disable event-related interrupts */ /* Disable event-related interrupts */
stm32_configwaitints(priv, 0, 0, 0); stm32_configwaitints(priv, 0, 0, 0);
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
priv->xfrflags = 0; priv->xfrflags = 0;
#endif #endif
@ -2808,7 +2808,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
static bool stm32_dmasupported(FAR struct sdio_dev_s *dev) static bool stm32_dmasupported(FAR struct sdio_dev_s *dev)
{ {
return true; return true;
@ -2831,7 +2831,7 @@ static bool stm32_dmasupported(FAR struct sdio_dev_s *dev)
* OK on success; a negated errno on failure * OK on success; a negated errno on failure
****************************************************************************/ ****************************************************************************/
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT) #if defined(CONFIG_STM32F7_SDMMC_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev, static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
FAR const uint8_t *buffer, size_t buflen) FAR const uint8_t *buffer, size_t buflen)
{ {
@ -2877,7 +2877,7 @@ static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer, static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer,
size_t buflen) size_t buflen)
{ {
@ -2962,7 +2962,7 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer,
* *
****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev, static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
FAR const uint8_t *buffer, size_t buflen) FAR const uint8_t *buffer, size_t buflen)
{ {
@ -3152,7 +3152,7 @@ static void stm32_default(struct stm32_dev_s *priv)
FAR struct sdio_dev_s *sdio_initialize(int slotno) FAR struct sdio_dev_s *sdio_initialize(int slotno)
{ {
struct stm32_dev_s *priv = NULL; struct stm32_dev_s *priv = NULL;
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
unsigned int dmachan; unsigned int dmachan;
#endif #endif
@ -3162,7 +3162,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno)
/* Select SDMMC 1 */ /* Select SDMMC 1 */
priv = &g_sdmmcdev1; priv = &g_sdmmcdev1;
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
dmachan = SDMMC1_DMACHAN; dmachan = SDMMC1_DMACHAN;
#endif #endif
@ -3192,7 +3192,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno)
/* Select SDMMC 2 */ /* Select SDMMC 2 */
priv = &g_sdmmcdev2; priv = &g_sdmmcdev2;
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
dmachan = SDMMC2_DMACHAN; dmachan = SDMMC2_DMACHAN;
#endif #endif
@ -3232,7 +3232,7 @@ FAR struct sdio_dev_s *sdio_initialize(int slotno)
/* Allocate a DMA channel */ /* Allocate a DMA channel */
#ifdef CONFIG_SDIO_DMA #ifdef CONFIG_STM32F7_SDMMC_DMA
priv->dma = stm32_dmachannel(dmachan); priv->dma = stm32_dmachannel(dmachan);
DEBUGASSERT(priv->dma); DEBUGASSERT(priv->dma);
#endif #endif

View File

@ -156,6 +156,8 @@ CONFIG_ARMV7M_HAVE_STACKCHECK=y
# CONFIG_ARMV7M_STACKCHECK is not set # CONFIG_ARMV7M_STACKCHECK is not set
# CONFIG_ARMV7M_ITMSYSLOG is not set # CONFIG_ARMV7M_ITMSYSLOG is not set
# CONFIG_SERIAL_TERMIOS is not set # CONFIG_SERIAL_TERMIOS is not set
# CONFIG_SDIO_DMA is not set
# CONFIG_SDIO_WIDTH_D1_ONLY is not set
# CONFIG_USART6_RS485 is not set # CONFIG_USART6_RS485 is not set
# CONFIG_USART6_RXDMA is not set # CONFIG_USART6_RXDMA is not set
# CONFIG_SERIAL_DISABLE_REORDERING is not set # CONFIG_SERIAL_DISABLE_REORDERING is not set
@ -460,6 +462,7 @@ CONFIG_ARCH_BOARD="stm32f746-ws"
# CONFIG_BOARD_CRASHDUMP is not set # CONFIG_BOARD_CRASHDUMP is not set
CONFIG_LIB_BOARDCTL=y CONFIG_LIB_BOARDCTL=y
# CONFIG_BOARDCTL_UNIQUEID is not set # CONFIG_BOARDCTL_UNIQUEID is not set
CONFIG_BOARDCTL_USBDEVCTRL=y
# CONFIG_BOARDCTL_TSCTEST is not set # CONFIG_BOARDCTL_TSCTEST is not set
# CONFIG_BOARDCTL_ADCTEST is not set # CONFIG_BOARDCTL_ADCTEST is not set
# CONFIG_BOARDCTL_PWMTEST is not set # CONFIG_BOARDCTL_PWMTEST is not set
@ -661,10 +664,20 @@ CONFIG_ADC_FIFOSIZE=8
# CONFIG_RGBLED is not set # CONFIG_RGBLED is not set
# CONFIG_PCA9635PW is not set # CONFIG_PCA9635PW is not set
# CONFIG_NCP5623C is not set # CONFIG_NCP5623C is not set
# CONFIG_MMCSD is not set CONFIG_MMCSD=y
CONFIG_MMCSD_NSLOTS=1
# CONFIG_MMCSD_READONLY is not set
CONFIG_MMCSD_MULTIBLOCK_DISABLE=y
# CONFIG_MMCSD_MMCSUPPORT is not set
CONFIG_MMCSD_HAVECARDDETECT=y
# CONFIG_MMCSD_SPI is not set
CONFIG_ARCH_HAVE_SDIO=y CONFIG_ARCH_HAVE_SDIO=y
CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE=y CONFIG_ARCH_HAVE_SDIOWAIT_WRCOMPLETE=y
CONFIG_MMCSD_SDIO=y
CONFIG_SDIO_PREFLIGHT=y CONFIG_SDIO_PREFLIGHT=y
# CONFIG_SDIO_MUXBUS is not set
# CONFIG_MMCSD_SDIOWAIT_WRCOMPLETE is not set
# CONFIG_SDIO_BLOCKSETUP is not set
# CONFIG_MODEM is not set # CONFIG_MODEM is not set
# CONFIG_MTD is not set # CONFIG_MTD is not set
# CONFIG_EEPROM is not set # CONFIG_EEPROM is not set
@ -678,7 +691,7 @@ CONFIG_DEV_FIFO_SIZE=1024
# CONFIG_SERCOMM_CONSOLE is not set # CONFIG_SERCOMM_CONSOLE is not set
CONFIG_SERIAL=y CONFIG_SERIAL=y
# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_DEV_LOWCONSOLE is not set
# CONFIG_SERIAL_REMOVABLE is not set CONFIG_SERIAL_REMOVABLE=y
CONFIG_SERIAL_CONSOLE=y CONFIG_SERIAL_CONSOLE=y
# CONFIG_16550_UART is not set # CONFIG_16550_UART is not set
# CONFIG_UART_SERIALDRIVER is not set # CONFIG_UART_SERIALDRIVER is not set
@ -727,7 +740,47 @@ CONFIG_USART6_2STOP=0
# CONFIG_USART6_OFLOWCONTROL is not set # CONFIG_USART6_OFLOWCONTROL is not set
# CONFIG_USART6_DMA is not set # CONFIG_USART6_DMA is not set
# CONFIG_PSEUDOTERM is not set # CONFIG_PSEUDOTERM is not set
# CONFIG_USBDEV is not set CONFIG_USBDEV=y
#
# USB Device Controller Driver Options
#
# CONFIG_USBDEV_ISOCHRONOUS is not set
# CONFIG_USBDEV_DUALSPEED is not set
CONFIG_USBDEV_SELFPOWERED=y
# CONFIG_USBDEV_BUSPOWERED is not set
CONFIG_USBDEV_MAXPOWER=100
# CONFIG_USBDEV_DMA is not set
# CONFIG_ARCH_USBDEV_STALLQUEUE is not set
# CONFIG_USBDEV_TRACE is not set
#
# USB Device Class Driver Options
#
# CONFIG_USBDEV_COMPOSITE is not set
# CONFIG_PL2303 is not set
CONFIG_CDCACM=y
# CONFIG_CDCACM_CONSOLE is not set
CONFIG_CDCACM_EP0MAXPACKET=64
CONFIG_CDCACM_EPINTIN=1
CONFIG_CDCACM_EPINTIN_FSSIZE=64
CONFIG_CDCACM_EPINTIN_HSSIZE=512
CONFIG_CDCACM_EPBULKOUT=3
CONFIG_CDCACM_EPBULKOUT_FSSIZE=64
CONFIG_CDCACM_EPBULKOUT_HSSIZE=512
CONFIG_CDCACM_EPBULKIN=2
CONFIG_CDCACM_EPBULKIN_FSSIZE=64
CONFIG_CDCACM_EPBULKIN_HSSIZE=512
CONFIG_CDCACM_NRDREQS=4
CONFIG_CDCACM_NWRREQS=4
CONFIG_CDCACM_BULKIN_REQLEN=96
CONFIG_CDCACM_RXBUFSIZE=257
CONFIG_CDCACM_TXBUFSIZE=193
CONFIG_CDCACM_VENDORID=0x0525
CONFIG_CDCACM_PRODUCTID=0xa4a7
CONFIG_CDCACM_VENDORSTR="NuttX"
CONFIG_CDCACM_PRODUCTSTR="CDC/ACM Serial"
# CONFIG_USBMSC is not set
# CONFIG_USBHOST is not set # CONFIG_USBHOST is not set
# CONFIG_HAVE_USBTRACE is not set # CONFIG_HAVE_USBTRACE is not set
# CONFIG_DRIVERS_WIRELESS is not set # CONFIG_DRIVERS_WIRELESS is not set
@ -1079,6 +1132,7 @@ CONFIG_NSH_DISABLE_PRINTF=y
# CONFIG_NSH_DISABLE_WGET is not set # CONFIG_NSH_DISABLE_WGET is not set
# CONFIG_NSH_DISABLE_XD is not set # CONFIG_NSH_DISABLE_XD is not set
CONFIG_NSH_MMCSDMINOR=0 CONFIG_NSH_MMCSDMINOR=0
CONFIG_NSH_MMCSDSLOTNO=0
# #
# Configure Command Options # Configure Command Options
@ -1100,6 +1154,7 @@ CONFIG_NSH_FILEIOSIZE=512
# Console Configuration # Console Configuration
# #
CONFIG_NSH_CONSOLE=y CONFIG_NSH_CONSOLE=y
# CONFIG_NSH_USBCONSOLE is not set
# CONFIG_NSH_ALTCONDEV is not set # CONFIG_NSH_ALTCONDEV is not set
CONFIG_NSH_ARCHINIT=y CONFIG_NSH_ARCHINIT=y
# CONFIG_NSH_LOGIN is not set # CONFIG_NSH_LOGIN is not set
@ -1117,6 +1172,8 @@ CONFIG_NSH_ARCHINIT=y
# #
# System Libraries and NSH Add-Ons # System Libraries and NSH Add-Ons
# #
CONFIG_SYSTEM_CDCACM=y
CONFIG_SYSTEM_CDCACM_DEVMINOR=0
# CONFIG_SYSTEM_CLE is not set # CONFIG_SYSTEM_CLE is not set
# CONFIG_SYSTEM_CUTERM is not set # CONFIG_SYSTEM_CUTERM is not set
# CONFIG_SYSTEM_FREE is not set # CONFIG_SYSTEM_FREE is not set