forked from len0rd/rockbox
imx233: cleanup in sdmmc
Change-Id: I82eac65b1bf9f2e963c4ebfb7c22da678ae63642
This commit is contained in:
parent
2b02cbe1cc
commit
5172d66399
1 changed files with 9 additions and 11 deletions
|
|
@ -426,11 +426,10 @@ static int init_sd_card(int drive)
|
||||||
|
|
||||||
/* Try to switch V2 cards to HS timings, non HS seem to ignore this */
|
/* Try to switch V2 cards to HS timings, non HS seem to ignore this */
|
||||||
if(sd_v2)
|
if(sd_v2)
|
||||||
{
|
|
||||||
/* CMD6 switch to HS */
|
|
||||||
{
|
{
|
||||||
/* only transfer 64 bytes */
|
/* only transfer 64 bytes */
|
||||||
imx233_ssp_set_block_size(ssp, /*log2(64)*/6);
|
imx233_ssp_set_block_size(ssp, /*log2(64)*/6);
|
||||||
|
/* CMD6 switch to HS */
|
||||||
if(imx233_ssp_sd_mmc_transfer(ssp, SD_SWITCH_FUNC, 0x80fffff1,
|
if(imx233_ssp_sd_mmc_transfer(ssp, SD_SWITCH_FUNC, 0x80fffff1,
|
||||||
SSP_SHORT_RESP, aligned_buffer[drive], 1, true, true, NULL))
|
SSP_SHORT_RESP, aligned_buffer[drive], 1, true, true, NULL))
|
||||||
return -12;
|
return -12;
|
||||||
|
|
@ -438,7 +437,6 @@ static int init_sd_card(int drive)
|
||||||
if((aligned_buffer[drive][16] & 0xf) == 1)
|
if((aligned_buffer[drive][16] & 0xf) == 1)
|
||||||
sd_hs = true;
|
sd_hs = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* probe for CMD23 support */
|
/* probe for CMD23 support */
|
||||||
support_set_block_count[drive] = false;
|
support_set_block_count[drive] = false;
|
||||||
|
|
@ -954,7 +952,7 @@ int mmc_init(void)
|
||||||
if(SDMMC_FLAGS(drive) & PROBE)
|
if(SDMMC_FLAGS(drive) & PROBE)
|
||||||
continue;
|
continue;
|
||||||
else
|
else
|
||||||
panicf("init_drive(%d) failed: %d (mmc)", ret);
|
panicf("init_drive(%d) failed: %d (mmc)", drive, ret);
|
||||||
}
|
}
|
||||||
mmc_map[_mmc_num_drives++] = drive;
|
mmc_map[_mmc_num_drives++] = drive;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue