This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 1af82ba979 mmcsd: SDIO_CAPS_4BIT_ONLY set buswidth 
MMCSD_SCR_BUSWIDTH_4BIT
1af82ba979 is described below

commit 1af82ba979c7fbd7c3f18190849fe2b1dc3ebe64
Author: zhangshoukui <[email protected]>
AuthorDate: Thu Oct 24 11:33:28 2024 +0800

    mmcsd: SDIO_CAPS_4BIT_ONLY set buswidth MMCSD_SCR_BUSWIDTH_4BIT
    
    uint8_t buswidth:4;              /* Bus widths supported (SD only) */
    
    Signed-off-by: zhangshoukui <[email protected]>
---
 drivers/mmcsd/mmcsd_sdio.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c
index 2683ebdaa0..29350380c9 100644
--- a/drivers/mmcsd/mmcsd_sdio.c
+++ b/drivers/mmcsd/mmcsd_sdio.c
@@ -3933,7 +3933,10 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s 
*priv)
 
       finfo("MMC card detected\n");
       priv->type = MMCSD_CARDTYPE_MMC;
-      priv->buswidth |= MMCSD_SCR_BUSWIDTH_4BIT;
+      if ((priv->caps & SDIO_CAPS_4BIT_ONLY) != 0)
+        {
+          priv->buswidth |= MMCSD_SCR_BUSWIDTH_4BIT;
+        }
 
       /* Now, check if this is a MMC card/chip that supports block
        * addressing

Reply via email to