From 1af82ba979c7fbd7c3f18190849fe2b1dc3ebe64 Mon Sep 17 00:00:00 2001 From: zhangshoukui Date: Thu, 24 Oct 2024 11:33:28 +0800 Subject: [PATCH] mmcsd: SDIO_CAPS_4BIT_ONLY set buswidth MMCSD_SCR_BUSWIDTH_4BIT uint8_t buswidth:4; /* Bus widths supported (SD only) */ Signed-off-by: zhangshoukui --- 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 2683ebdaa01c2..29350380c9dfa 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