Skip to content

Commit e88be20

Browse files
maass-hamburgcfriedt
authored andcommitted
sd: sdmmc: only with to 4 bit, if supported by host
only switch to 4 bit mode, if it is supported by the host. for MMC it is already checked, but not for the sd card. Signed-off-by: Fin Maaß <[email protected]>
1 parent cd2a38c commit e88be20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/sd/sdmmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ static int sdmmc_init_hs(struct sd_card *card)
591591
LOG_ERR("Failed to switch card to HS mode");
592592
return ret;
593593
}
594-
if (card->flags & SD_4BITS_WIDTH) {
594+
if (card->host_props.host_caps.bus_4_bit_support && (card->flags & SD_4BITS_WIDTH)) {
595595
/* Raise bus width to 4 bits */
596596
ret = sdmmc_set_bus_width(card, SDHC_BUS_WIDTH4BIT);
597597
if (ret) {

0 commit comments

Comments
 (0)