STM32 dmapreflight method must be conditioned on CONFIG_SDIO_PREFLIGHT. From Pelle Windestam

This commit is contained in:
Gregory Nutt 2014-04-25 07:22:14 -06:00
parent 31ede44671
commit bdf4a991aa
2 changed files with 12 additions and 1 deletions

View File

@ -7243,4 +7243,7 @@
driver and lower half interface definition from Bob Doiron
(2014-40-22).
* arch/z16/src/z16f/z16f_espi.c: Add ZNEO ESPI driver (2014-4-24).
* arch/arm/src/stm32/stm32_sdio.c: The dmaflight method must
be conditioned on CONFIG_SDIO_PREFLIGHT. Noted by Pelle
Windestam (2014-4-25)

View File

@ -453,8 +453,10 @@ static int stm32_registercallback(FAR struct sdio_dev_s *dev,
#ifdef CONFIG_SDIO_DMA
static bool stm32_dmasupported(FAR struct sdio_dev_s *dev);
#ifdef CONFIG_SDIO_PREFLIGHT
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
FAR const uint8_t *buffer, size_t buflen);
#endif
static int stm32_dmarecvsetup(FAR struct sdio_dev_s *dev,
FAR uint8_t *buffer, size_t buflen);
static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
@ -503,7 +505,9 @@ struct stm32_dev_s g_sdiodev =
.registercallback = stm32_registercallback,
#ifdef CONFIG_SDIO_DMA
.dmasupported = stm32_dmasupported,
#ifdef CONFIG_SDIO_PREFLIGHT
.dmapreflight = stm32_dmapreflight,
#endif
.dmarecvsetup = stm32_dmarecvsetup,
.dmasendsetup = stm32_dmasendsetup,
#endif
@ -2468,7 +2472,7 @@ static bool stm32_dmasupported(FAR struct sdio_dev_s *dev)
* OK on success; a negated errno on failure
****************************************************************************/
#ifdef CONFIG_SDIO_DMA
#if defined(CONFIG_SDIO_DMA) && defined(CONFIG_SDIO_PREFLIGHT)
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
FAR const uint8_t *buffer, size_t buflen)
{
@ -2521,7 +2525,9 @@ 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
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
#endif
/* Reset the DPSM configuration */
@ -2588,7 +2594,9 @@ static int stm32_dmasendsetup(FAR struct sdio_dev_s *dev,
uint32_t dblocksize;
DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
#ifdef CONFIG_SDIO_PREFLIGHT
DEBUGASSERT(stm32_dmapreflight(dev, buffer, buflen) == 0);
#endif
/* Reset the DPSM configuration */