mmcsd: SDIO_CAPS_4BIT_ONLY set buswidth MMCSD_SCR_BUSWIDTH_4BIT

uint8_t buswidth:4;              /* Bus widths supported (SD only) */

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
This commit is contained in:
zhangshoukui 2024-10-24 11:33:28 +08:00 committed by Xiang Xiao
parent d8ed88c8a6
commit 1af82ba979

View file

@ -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