diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2016-05-29 16:08:42 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2016-05-29 16:08:42 +0100 |
commit | 633c8edf47dcfcdd258ab522452c8fcb84238a6a (patch) | |
tree | 590abd45c5c6872d0f70c849f9d1a007424ff231 /firmware/target/arm/imx233/sdmmc-imx233.c | |
parent | 85ad99ee3d5eaae6e98f958c5aed5d3d36ca460a (diff) |
imx233: two minor fixes for sd/mmc
Always enable support for SET_BLOCK_COUNT on mmc: it is mandatory. For some
reason (probably a mistake) it was disabled unconditionaly on mmc.
Also deselect sd card after init. Although it is unlikely to make a difference,
it is already done for mmc so stay consistent.
Change-Id: I276f0d95f5bb6a0bf431c2fff4589d3dfb15f8c7
Diffstat (limited to 'firmware/target/arm/imx233/sdmmc-imx233.c')
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index 13ef1b8375..28310fbfd1 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c @@ -476,7 +476,10 @@ static int init_sd_card(int drive) imx233_ssp_set_timings(ssp, 2, 0, 0xffff); else imx233_ssp_set_timings(ssp, 4, 0, 0xffff); - + /* deselect card */ + if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL)) + return -13; + /* successfully initialised */ SDMMC_INFO(drive).initialized = 1; return 0; @@ -566,7 +569,7 @@ static int init_mmc_drive(int drive) return -13; /* MMC always support CMD23 */ - SDMMC_STATUS(drive).has_sbc = false; + SDMMC_STATUS(drive).has_sbc = true; SDMMC_INFO(drive).initialized = 1; return 0; |