Skip to content

Commit 4f7f751

Browse files
Windrow14xiaoxiang781216
authored andcommitted
drivers/mmcsd/mmcsd_sdio.c: fix unable to switch eMMC device to 4-bit bus width mode
All eMMC devices support 4-bit bus width, so we should mark the device as supporting 4-bit bus width after detecting that the device type is eMMC. Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com> Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Reviewed-by: Jacky Cao <Jacky.Cao@sony.com> Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
1 parent ce0599f commit 4f7f751

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mmcsd/mmcsd_sdio.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2548,7 +2548,7 @@ static int mmcsd_widebus(FAR struct mmcsd_state_s *priv)
25482548

25492549
/* Configure the SDIO peripheral */
25502550

2551-
if ((IS_MMC(priv->type) && ((priv->caps & SDIO_CAPS_1BIT_ONLY) == 0)) ||
2551+
if ((IS_MMC(priv->type) && ((priv->caps & SDIO_CAPS_1BIT_ONLY) == 0)) &&
25522552
((priv->buswidth & MMCSD_SCR_BUSWIDTH_4BIT) != 0))
25532553
{
25542554
/* JEDEC specs: A.8.3 Changing the data bus width: 'Bus testing
@@ -3500,6 +3500,7 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
35003500

35013501
finfo("MMC card detected\n");
35023502
priv->type = MMCSD_CARDTYPE_MMC;
3503+
priv->buswidth |= MMCSD_SCR_BUSWIDTH_4BIT;
35033504

35043505
/* Now, check if this is a MMC card/chip that supports block
35053506
* addressing

0 commit comments

Comments
 (0)