summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/sdmmc-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2014-02-11 19:09:28 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2014-02-11 19:09:51 +0100
commit5172d663997e1ba33679cc7559e4900c5d4163be (patch)
tree49e2eb08a86278ab42d7a2df9ac2a61f7627d44d /firmware/target/arm/imx233/sdmmc-imx233.c
parent2b02cbe1ccbf2fcdcc164c6a4139f6666aed23c9 (diff)
downloadrockbox-5172d663997e1ba33679cc7559e4900c5d4163be.tar.gz
rockbox-5172d663997e1ba33679cc7559e4900c5d4163be.tar.bz2
rockbox-5172d663997e1ba33679cc7559e4900c5d4163be.zip
imx233: cleanup in sdmmc
Change-Id: I82eac65b1bf9f2e963c4ebfb7c22da678ae63642
Diffstat (limited to 'firmware/target/arm/imx233/sdmmc-imx233.c')
-rw-r--r--firmware/target/arm/imx233/sdmmc-imx233.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c
index 7df0e412e5..dbca78be79 100644
--- a/firmware/target/arm/imx233/sdmmc-imx233.c
+++ b/firmware/target/arm/imx233/sdmmc-imx233.c
@@ -427,17 +427,15 @@ static int init_sd_card(int drive)
/* Try to switch V2 cards to HS timings, non HS seem to ignore this */
if(sd_v2)
{
+ /* only transfer 64 bytes */
+ imx233_ssp_set_block_size(ssp, /*log2(64)*/6);
/* CMD6 switch to HS */
- {
- /* only transfer 64 bytes */
- imx233_ssp_set_block_size(ssp, /*log2(64)*/6);
- if(imx233_ssp_sd_mmc_transfer(ssp, SD_SWITCH_FUNC, 0x80fffff1,
- SSP_SHORT_RESP, aligned_buffer[drive], 1, true, true, NULL))
- return -12;
- imx233_ssp_set_block_size(ssp, /*log2(512)*/9);
- if((aligned_buffer[drive][16] & 0xf) == 1)
- sd_hs = true;
- }
+ if(imx233_ssp_sd_mmc_transfer(ssp, SD_SWITCH_FUNC, 0x80fffff1,
+ SSP_SHORT_RESP, aligned_buffer[drive], 1, true, true, NULL))
+ return -12;
+ imx233_ssp_set_block_size(ssp, /*log2(512)*/9);
+ if((aligned_buffer[drive][16] & 0xf) == 1)
+ sd_hs = true;
}
/* probe for CMD23 support */
@@ -954,7 +952,7 @@ int mmc_init(void)
if(SDMMC_FLAGS(drive) & PROBE)
continue;
else
- panicf("init_drive(%d) failed: %d (mmc)", ret);
+ panicf("init_drive(%d) failed: %d (mmc)", drive, ret);
}
mmc_map[_mmc_num_drives++] = drive;
}