Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport Upstream SDIO 1-bit and 16G Size Fixes #7281

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 21 additions & 21 deletions nuttx-patches/00027-BACKPORT-stm32-sdio-1-bit-and-16G-fix.patch
@@ -1,3 +1,24 @@
diff --git NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c
index 9d93a43..737f42f 100644
--- NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c
+++ NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c
@@ -2573,6 +2573,7 @@ static bool stm32_dmasupported(FAR struct sdio_dev_s *dev)
static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
FAR const uint8_t *buffer, size_t buflen)
{
+#if !defined(CONFIG_STM32_STM32F40XX)
struct stm32_dev_s *priv = (struct stm32_dev_s *)dev;

DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);
@@ -2583,7 +2584,7 @@ static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,
{
return -EINVAL;
}
-
+#endif
/* DMA must be possible to the buffer */

if (!stm32_dmacapable((uintptr_t)buffer, (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG))
diff --git NuttX/nuttx/drivers/mmcsd/mmcsd_sdio.c NuttX/nuttx/drivers/mmcsd/mmcsd_sdio.c
index dbdf4e9..9c93cef 100644
--- NuttX/nuttx/drivers/mmcsd/mmcsd_sdio.c
Expand Down Expand Up @@ -33,24 +54,3 @@ index dbdf4e9..9c93cef 100644

priv->mediachanged = false;
ret = OK;
diff --git NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c
index 9d93a43..9fb9001 100644
--- NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c
+++ NuttX/nuttx/arch/arm/src/stm32/stm32_sdio.c
@@ -2577,13 +2577,15 @@ static int stm32_dmapreflight(FAR struct sdio_dev_s *dev,

DEBUGASSERT(priv != NULL && buffer != NULL && buflen > 0);

+#if !defined(CONFIG_STM32_STM32F40XX)
+
/* Wide bus operation is required for DMA */

if (!priv->widebus)
{
return -EINVAL;
}
-
+#endif
/* DMA must be possible to the buffer */

if (!stm32_dmacapable((uintptr_t)buffer, (buflen + 3) >> 2, SDIO_RXDMA32_CONFIG))
1 change: 1 addition & 0 deletions nuttx-patches/CMakeLists.txt
Expand Up @@ -58,6 +58,7 @@ set(nuttx_patches
00024-BACKPORT-stm32f7-serial-dma-hotfix.patch
00025-BACKPORT-add-set-ex-to-nsh.patch
00026-BACKPORT-stm32fX-serial-fix-freezing.patch
00027-BACKPORT-stm32-sdio-1-bit-and-16G-fix.patch
90000-PENDING-wip-inflight-to-upstream.patch
)

Expand Down