From 975d99c3f61dfc7a8781f6132edd8f5bb622d094 Mon Sep 17 00:00:00 2001 From: Jani Paalijarvi Date: Thu, 2 May 2024 15:54:48 +0300 Subject: [PATCH] drivers/mmcsd/mmcsd_sdio.c: Fix SD card 4-bit support Fix a bug which causes that 1-bit mode is always selected. This happens even if the driver sets SDIO_CAPS_4BIT capability in case of the card and the host support 1- and 4-bit wide bus. Signed-off-by: Jani Paalijarvi --- drivers/mmcsd/mmcsd_sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c index 68ee8ff5d26..a4073fa263d 100644 --- a/drivers/mmcsd/mmcsd_sdio.c +++ b/drivers/mmcsd/mmcsd_sdio.c @@ -3395,7 +3395,7 @@ static int mmcsd_sdinitialize(FAR struct mmcsd_state_s *priv) mmcsd_decode_scr(priv, scr); - if ((priv->caps & SDIO_CAPS_4BIT_ONLY) != 0) + if ((priv->caps & SDIO_CAPS_4BIT) != 0) { /* Select width (4-bit) bus operation (if the card supports it) */