diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2013-01-15 19:05:29 +0000 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2013-01-15 19:10:55 +0000 |
commit | ba277d68f3c48f2b6d84654c8d3afa24c5f9beee (patch) | |
tree | 3a1a31f88f0dc95faad0ce7ef4961041d16ca15b /firmware | |
parent | 19ca914f27c33f8f178d9931afa0a020717598bb (diff) | |
download | rockbox-ba277d68f3c48f2b6d84654c8d3afa24c5f9beee.tar.gz rockbox-ba277d68f3c48f2b6d84654c8d3afa24c5f9beee.zip |
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
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index 17b37821b2..3bdc302ada 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c | |||
@@ -170,6 +170,8 @@ static unsigned _mmc_num_drives; | |||
170 | static int mmc_map[SDMMC_NUM_DRIVES]; /* mmc->sdmmc map */ | 170 | static int mmc_map[SDMMC_NUM_DRIVES]; /* mmc->sdmmc map */ |
171 | #endif | 171 | #endif |
172 | 172 | ||
173 | static int init_drive(int drive); | ||
174 | |||
173 | /* WARNING NOTE BUG FIXME | 175 | /* WARNING NOTE BUG FIXME |
174 | * There are three numbering schemes involved in the driver: | 176 | * There are three numbering schemes involved in the driver: |
175 | * - the sdmmc indexes into sdmmc_config[] | 177 | * - the sdmmc indexes into sdmmc_config[] |
@@ -519,7 +521,7 @@ static int transfer_sectors(int drive, unsigned long start, int count, void *buf | |||
519 | #if CONFIG_STORAGE & STORAGE_SD | 521 | #if CONFIG_STORAGE & STORAGE_SD |
520 | if(SDMMC_MODE(drive) == SD_MODE && SDMMC_INFO(drive).initialized <= 0) | 522 | if(SDMMC_MODE(drive) == SD_MODE && SDMMC_INFO(drive).initialized <= 0) |
521 | { | 523 | { |
522 | ret = init_sd_card(drive); | 524 | ret = init_drive(drive); |
523 | if(SDMMC_INFO(drive).initialized <= 0) | 525 | if(SDMMC_INFO(drive).initialized <= 0) |
524 | goto Lend; | 526 | goto Lend; |
525 | } | 527 | } |