Skip to content

sd: fix incorrect error logging #90839

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions subsys/sd/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static int sd_common_init(struct sd_card *card)
LOG_INF("Card does not support CMD8, assuming legacy card");
return sd_idle(card);
} else if (ret) {
LOG_ERR("Card error on CMD 8");
LOG_ERR("Card error on CMD8");
return ret;
}
if (card->host_props.is_spi &&
Expand All @@ -135,13 +135,13 @@ static int sd_init_io(struct sd_card *card)
bus_io->timing = SDHC_TIMING_LEGACY;

if (host_props->host_caps.vol_330_support) {
LOG_DBG("Host controller support 3.3V max");
LOG_DBG("Host controller support %sV max", "3.3");
voltage = SD_VOL_3_3_V;
} else if (host_props->host_caps.vol_300_support) {
LOG_DBG("Host controller support 3.0V max");
LOG_DBG("Host controller support %sV max", "3.0");
voltage = SD_VOL_3_0_V;
} else {
LOG_DBG("Host controller support 1.8V max");
LOG_DBG("Host controller support %sV max", "1.8");
voltage = SD_VOL_1_8_V;
}

Expand All @@ -153,14 +153,14 @@ static int sd_init_io(struct sd_card *card)
bus_io->power_mode = SDHC_POWER_OFF;
ret = sdhc_set_io(card->sdhc, bus_io);
if (ret) {
LOG_ERR("Could not disable card power via SDHC");
LOG_ERR("Could not %s card power via SDHC", "disable");
return ret;
}
sd_delay(card->host_props.power_delay);
bus_io->power_mode = SDHC_POWER_ON;
ret = sdhc_set_io(card->sdhc, bus_io);
if (ret) {
LOG_ERR("Could not disable card power via SDHC");
LOG_ERR("Could not %s card power via SDHC", "enable");
return ret;
}
/* After reset or init, card voltage should be max HC support */
Expand Down