drivers/mmcsd/Kconfig: three configuration settings were within ifdef/endif and led to warning: xxx selects xxxx which has unmet direct dependencies. Fix by moving settings to drivers/Kconfig and outside of the ifdef-endif. Also renamed CONFIG_SDIO_PREFLIGHT to CONFIG_ARCH_HAVE_SDIO_PREFLIGHT to follow naming of similar hidden architecture capability configurations.
This commit is contained in:
parent
c6adc4ba8e
commit
4e5cf1229c
@ -2520,7 +2520,7 @@ config STM32_SDIO
|
||||
depends on !STM32_CONNECTIVITYLINE && !STM32_VALUELINE
|
||||
select ARCH_HAVE_SDIO
|
||||
select ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
||||
select SDIO_PREFLIGHT
|
||||
select ARCH_HAVE_SDIO_PREFLIGHT
|
||||
|
||||
config STM32_SPI1
|
||||
bool "SPI1"
|
||||
|
@ -499,7 +499,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
|
||||
/* DMA */
|
||||
|
||||
#ifdef CONFIG_STM32_SDIO_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
|
||||
FAR const uint8_t *buffer, size_t buflen);
|
||||
#endif
|
||||
@ -552,13 +552,13 @@ struct stm32_dev_s g_sdiodev =
|
||||
.registercallback = stm32_registercallback,
|
||||
#ifdef CONFIG_SDIO_DMA
|
||||
#ifdef CONFIG_STM32_SDIO_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = stm32_dmapreflight,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_dmarecvsetup,
|
||||
.dmasendsetup = stm32_dmasendsetup,
|
||||
#else
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = NULL,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_recvsetup,
|
||||
@ -2700,7 +2700,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
|
||||
* OK on success; a negated errno on failure
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_STM32_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_STM32_SDIO_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
|
||||
FAR const uint8_t *buffer, size_t buflen)
|
||||
{
|
||||
@ -2755,7 +2755,7 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer,
|
||||
uint32_t dblocksize;
|
||||
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
|
||||
#endif
|
||||
|
||||
@ -2834,7 +2834,7 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
|
||||
uint32_t dblocksize;
|
||||
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
|
||||
#endif
|
||||
|
||||
|
@ -979,7 +979,7 @@ config STM32F0_SDIO
|
||||
depends on !STM32F0_CONNECTIVITYLINE && !STM32F0_VALUELINE
|
||||
select ARCH_HAVE_SDIO
|
||||
select ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
||||
select SDIO_PREFLIGHT
|
||||
select ARCH_HAVE_SDIO_PREFLIGHT
|
||||
|
||||
config STM32F0_SPI1
|
||||
bool "SPI1"
|
||||
|
@ -1448,7 +1448,7 @@ config STM32F7_SDMMC1
|
||||
select STM32F7_SDMMC
|
||||
select ARCH_HAVE_SDIO
|
||||
select ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
||||
select SDIO_PREFLIGHT
|
||||
select ARCH_HAVE_SDIO_PREFLIGHT
|
||||
select SDIO_BLOCKSETUP
|
||||
|
||||
config STM32F7_SDMMC2
|
||||
@ -1458,7 +1458,7 @@ config STM32F7_SDMMC2
|
||||
select STM32F7_SDMMC
|
||||
select ARCH_HAVE_SDIO
|
||||
select ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
||||
select SDIO_PREFLIGHT
|
||||
select ARCH_HAVE_SDIO_PREFLIGHT
|
||||
select SDIO_BLOCKSETUP
|
||||
|
||||
config STM32F7_SPDIFRX
|
||||
|
@ -555,7 +555,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
|
||||
/* DMA */
|
||||
|
||||
#ifdef CONFIG_STM32F7_SDMMC_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
|
||||
FAR const uint8_t *buffer, size_t buflen);
|
||||
#endif
|
||||
@ -607,13 +607,13 @@ struct stm32_dev_s g_sdmmcdev1 =
|
||||
.registercallback = stm32_registercallback,
|
||||
#ifdef CONFIG_SDIO_DMA
|
||||
#ifdef CONFIG_STM32F7_SDMMC_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = stm32_dmapreflight,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_dmarecvsetup,
|
||||
.dmasendsetup = stm32_dmasendsetup,
|
||||
#else
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = NULL,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_recvsetup,
|
||||
@ -682,7 +682,7 @@ struct stm32_dev_s g_sdmmcdev2 =
|
||||
.callbackenable = stm32_callbackenable,
|
||||
.registercallback = stm32_registercallback,
|
||||
#ifdef CONFIG_SDIO_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = stm32_dmapreflight,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_dmarecvsetup,
|
||||
@ -2957,7 +2957,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
|
||||
* OK on success; a negated errno on failure
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_STM32F7_SDMMC_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_STM32F7_SDMMC_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
|
||||
FAR const uint8_t *buffer, size_t buflen)
|
||||
{
|
||||
@ -3004,7 +3004,7 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer,
|
||||
uint32_t dblocksize;
|
||||
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
|
||||
#else
|
||||
# if defined(CONFIG_ARMV7M_DCACHE) && !defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH)
|
||||
@ -3094,7 +3094,7 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
|
||||
uint32_t dblocksize;
|
||||
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
|
||||
#else
|
||||
# if defined(CONFIG_ARMV7M_DCACHE) && !defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH)
|
||||
|
@ -1294,7 +1294,7 @@ config STM32L4_SDMMC1
|
||||
select STM32L4_SAI1PLL
|
||||
select STM32L4_SDMMC
|
||||
select ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
||||
select SDIO_PREFLIGHT
|
||||
select ARCH_HAVE_SDIO_PREFLIGHT
|
||||
depends on STM32L4_HAVE_SDMMC1
|
||||
|
||||
config STM32L4_TIM1
|
||||
|
@ -522,7 +522,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
|
||||
/* DMA */
|
||||
|
||||
#ifdef CONFIG_STM32L4_SDMMC_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
|
||||
FAR const uint8_t *buffer, size_t buflen);
|
||||
#endif
|
||||
@ -578,13 +578,13 @@ struct stm32_dev_s g_sdmmcdev1 =
|
||||
#endif
|
||||
#ifdef CONFIG_SDIO_DMA
|
||||
#ifdef CONFIG_STM32L4_SDMMC_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = stm32_dmapreflight,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_dmarecvsetup,
|
||||
.dmasendsetup = stm32_dmasendsetup,
|
||||
#else
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = NULL,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_recvsetup,
|
||||
@ -641,7 +641,7 @@ struct stm32_dev_s g_sdmmcdev2 =
|
||||
.registercallback = stm32_registercallback,
|
||||
#endif
|
||||
#ifdef CONFIG_SDIO_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
.dmapreflight = stm32_dmapreflight,
|
||||
#endif
|
||||
.dmarecvsetup = stm32_dmarecvsetup,
|
||||
@ -2787,7 +2787,7 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
|
||||
* OK on success; a negated errno on failure
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_STM32L4_SDMMC_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_STM32L4_SDMMC_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
|
||||
FAR const uint8_t *buffer, size_t buflen)
|
||||
{
|
||||
@ -2834,7 +2834,7 @@ static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev, FAR uint8_t *buffer,
|
||||
uint32_t dblocksize;
|
||||
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
|
||||
#else
|
||||
# if defined(CONFIG_ARMV7M_DCACHE) && !defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH)
|
||||
@ -2924,7 +2924,7 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
|
||||
uint32_t dblocksize;
|
||||
|
||||
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
|
||||
#else
|
||||
# if defined(CONFIG_ARMV7M_DCACHE) && !defined(CONFIG_ARMV7M_DCACHE_WRITETHROUGH)
|
||||
|
@ -323,6 +323,20 @@ source drivers/ioexpander/Kconfig
|
||||
source drivers/lcd/Kconfig
|
||||
source drivers/leds/Kconfig
|
||||
|
||||
# MMC/SD-related platform capabilities
|
||||
|
||||
config ARCH_HAVE_SDIO
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_HAVE_SDIO_PREFLIGHT
|
||||
bool
|
||||
default n
|
||||
|
||||
menuconfig MMCSD
|
||||
bool "MMC/SD Driver Support"
|
||||
default n
|
||||
|
@ -66,18 +66,10 @@ config MMCSD_SPIMODE
|
||||
|
||||
endif
|
||||
|
||||
config ARCH_HAVE_SDIO
|
||||
bool
|
||||
default n
|
||||
|
||||
config SDIO_DMA
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_HAVE_SDIOWAIT_WRCOMPLETE
|
||||
bool
|
||||
default n
|
||||
|
||||
config MMCSD_SDIO
|
||||
bool "MMC/SD SDIO transfer support"
|
||||
default n
|
||||
@ -85,10 +77,6 @@ config MMCSD_SDIO
|
||||
|
||||
if MMCSD_SDIO
|
||||
|
||||
config SDIO_PREFLIGHT
|
||||
bool
|
||||
default n
|
||||
|
||||
config SDIO_MUXBUS
|
||||
bool "SDIO bus share support"
|
||||
default n
|
||||
|
@ -1310,7 +1310,7 @@ static ssize_t mmcsd_readsingle(FAR struct mmcsd_state_s *priv,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
/* If we think we are going to perform a DMA transfer, make sure that we
|
||||
* will be able to before we commit the card to the operation.
|
||||
*/
|
||||
@ -1444,7 +1444,7 @@ static ssize_t mmcsd_readmultiple(FAR struct mmcsd_state_s *priv,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
/* If we think we are going to perform a DMA transfer, make sure that we
|
||||
* will be able to before we commit the card to the operation.
|
||||
*/
|
||||
@ -1650,7 +1650,7 @@ static ssize_t mmcsd_writesingle(FAR struct mmcsd_state_s *priv,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
/* If we think we are going to perform a DMA transfer, make sure that we
|
||||
* will be able to before we commit the card to the operation.
|
||||
*/
|
||||
@ -1817,7 +1817,7 @@ static ssize_t mmcsd_writemultiple(FAR struct mmcsd_state_s *priv,
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
/* If we think we are going to perform a DMA transfer, make sure that we
|
||||
* will be able to before we commit the card to the operation.
|
||||
*/
|
||||
|
@ -782,7 +782,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
|
||||
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_ARCH_HAVE_SDIO_PREFLIGHT)
|
||||
# define SDIO_DMAPREFLIGHT(dev,buffer,len) \
|
||||
((dev)->dmapreflight?(dev)->dmapreflight(dev,buffer,len):OK)
|
||||
#else
|
||||
@ -941,7 +941,7 @@ struct sdio_dev_s
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SDIO_DMA
|
||||
#ifdef CONFIG_SDIO_PREFLIGHT
|
||||
#ifdef CONFIG_ARCH_HAVE_SDIO_PREFLIGHT
|
||||
int (*dmapreflight)(FAR struct sdio_dev_s *dev,
|
||||
FAR const uint8_t *buffer, size_t buflen);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user