sd: enable 4 bit bus width for high speed cards
Enable 4 bit bus width for high speed cards, so that host and card combinations that cannot use UHS mode will still benefit from the speed increase of using 4 data lines. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
8cbd1bb186
commit
11e3344909
1 changed files with 8 additions and 0 deletions
|
@ -950,6 +950,14 @@ static int sdmmc_init_hs(struct sd_card *card)
|
|||
LOG_ERR("Failed to switch card to HS mode");
|
||||
return ret;
|
||||
}
|
||||
if (card->flags & SD_4BITS_WIDTH) {
|
||||
/* Raise bus width to 4 bits */
|
||||
ret = sdmmc_set_bus_width(card, SDHC_BUS_WIDTH4BIT);
|
||||
if (ret) {
|
||||
LOG_ERR("Failed to change card bus width to 4 bits");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue