diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index c81220166d..a4329b1416 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c | |||
@@ -190,19 +190,19 @@ static int init_drive(int drive); | |||
190 | * refer to sd/mmc drive indexes. We keep two maps sd->sdmmc and mmc->sdmmc | 190 | * refer to sd/mmc drive indexes. We keep two maps sd->sdmmc and mmc->sdmmc |
191 | * to find the sdmmc index from the sd or mmc one */ | 191 | * to find the sdmmc index from the sd or mmc one */ |
192 | 192 | ||
193 | static inline int sdmmc_removable(int drive) | ||
194 | { | ||
195 | return SDMMC_FLAGS(drive) & REMOVABLE; | ||
196 | } | ||
197 | |||
193 | static int sdmmc_present(int drive) | 198 | static int sdmmc_present(int drive) |
194 | { | 199 | { |
195 | if(SDMMC_FLAGS(drive) & REMOVABLE) | 200 | if(sdmmc_removable(drive)) |
196 | return imx233_ssp_sdmmc_detect(SDMMC_SSP(drive)); | 201 | return imx233_ssp_sdmmc_detect(SDMMC_SSP(drive)); |
197 | else | 202 | else |
198 | return true; | 203 | return true; |
199 | } | 204 | } |
200 | 205 | ||
201 | static inline int sdmmc_removable(int drive) | ||
202 | { | ||
203 | return SDMMC_FLAGS(drive) & REMOVABLE; | ||
204 | } | ||
205 | |||
206 | static void sdmmc_detect_callback(int ssp) | 206 | static void sdmmc_detect_callback(int ssp) |
207 | { | 207 | { |
208 | /* This is called only if the state was stable for 300ms - check state | 208 | /* This is called only if the state was stable for 300ms - check state |
@@ -790,7 +790,7 @@ static int sdmmc_init(void) | |||
790 | 790 | ||
791 | for(unsigned drive = 0; drive < SDMMC_NUM_DRIVES; drive++) | 791 | for(unsigned drive = 0; drive < SDMMC_NUM_DRIVES; drive++) |
792 | { | 792 | { |
793 | if(SDMMC_FLAGS(drive) & REMOVABLE) | 793 | if(sdmmc_removable(drive)) |
794 | imx233_ssp_sdmmc_setup_detect(SDMMC_SSP(drive), true, sdmmc_detect_callback, | 794 | imx233_ssp_sdmmc_setup_detect(SDMMC_SSP(drive), true, sdmmc_detect_callback, |
795 | false, SDMMC_FLAGS(drive) & DETECT_INVERTED); | 795 | false, SDMMC_FLAGS(drive) & DETECT_INVERTED); |
796 | } | 796 | } |