mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
imx233: fix sd windowed drive
The SD driver doesn't initialised drives at the beginning but upon request to handle removable drives. Since means that the init should call init_drive() and not init_sd_card() otherwise the check for WINDOW flag is bypasses. This breaks the zenxfi3 bootloader and has been overlooked for some time. Change-Id: I7325f7164d16d7e7e54eeb4645e98517a08e0836
This commit is contained in:
parent
19ca914f27
commit
ba277d68f3
1 changed files with 3 additions and 1 deletions
|
|
@ -170,6 +170,8 @@ static unsigned _mmc_num_drives;
|
||||||
static int mmc_map[SDMMC_NUM_DRIVES]; /* mmc->sdmmc map */
|
static int mmc_map[SDMMC_NUM_DRIVES]; /* mmc->sdmmc map */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static int init_drive(int drive);
|
||||||
|
|
||||||
/* WARNING NOTE BUG FIXME
|
/* WARNING NOTE BUG FIXME
|
||||||
* There are three numbering schemes involved in the driver:
|
* There are three numbering schemes involved in the driver:
|
||||||
* - the sdmmc indexes into sdmmc_config[]
|
* - the sdmmc indexes into sdmmc_config[]
|
||||||
|
|
@ -519,7 +521,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf
|
||||||
#if CONFIG_STORAGE & STORAGE_SD
|
#if CONFIG_STORAGE & STORAGE_SD
|
||||||
if(SDMMC_MODE(drive) == SD_MODE && SDMMC_INFO(drive).initialized <= 0)
|
if(SDMMC_MODE(drive) == SD_MODE && SDMMC_INFO(drive).initialized <= 0)
|
||||||
{
|
{
|
||||||
ret = init_sd_card(drive);
|
ret = init_drive(drive);
|
||||||
if(SDMMC_INFO(drive).initialized <= 0)
|
if(SDMMC_INFO(drive).initialized <= 0)
|
||||||
goto Lend;
|
goto Lend;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue