diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index e520fcc6e6..9aafb5820a 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c | |||
@@ -148,8 +148,7 @@ static uint8_t aligned_buffer[SDMMC_NUM_DRIVES][512] CACHEALIGN_ATTR; | |||
148 | static tCardInfo sdmmc_card_info[SDMMC_NUM_DRIVES]; | 148 | static tCardInfo sdmmc_card_info[SDMMC_NUM_DRIVES]; |
149 | static struct mutex mutex[SDMMC_NUM_DRIVES]; | 149 | static struct mutex mutex[SDMMC_NUM_DRIVES]; |
150 | static int disk_last_activity[SDMMC_NUM_DRIVES]; | 150 | static int disk_last_activity[SDMMC_NUM_DRIVES]; |
151 | #define MIN_YIELD_PERIOD 5 /* ticks */ | 151 | #define MIN_YIELD_PERIOD 5 |
152 | static int next_yield = 0; | ||
153 | 152 | ||
154 | #define SDMMC_INFO(drive) sdmmc_card_info[drive] | 153 | #define SDMMC_INFO(drive) sdmmc_card_info[drive] |
155 | #define SDMMC_RCA(drive) SDMMC_INFO(drive).rca | 154 | #define SDMMC_RCA(drive) SDMMC_INFO(drive).rca |
@@ -266,7 +265,8 @@ static int wait_for_state(int drive, unsigned state) | |||
266 | unsigned long response; | 265 | unsigned long response; |
267 | unsigned int timeout = current_tick + 5*HZ; | 266 | unsigned int timeout = current_tick + 5*HZ; |
268 | int cmd_retry = 10; | 267 | int cmd_retry = 10; |
269 | 268 | int next_yield = current_tick + MIN_YIELD_PERIOD; | |
269 | |||
270 | while (1) | 270 | while (1) |
271 | { | 271 | { |
272 | /* NOTE: rely on SD_SEND_STATUS=MMC_SEND_STATUS */ | 272 | /* NOTE: rely on SD_SEND_STATUS=MMC_SEND_STATUS */ |
@@ -750,8 +750,6 @@ static void sdmmc_thread(void) | |||
750 | } | 750 | } |
751 | else | 751 | else |
752 | { | 752 | { |
753 | next_yield = current_tick; | ||
754 | |||
755 | if(!idle_notified) | 753 | if(!idle_notified) |
756 | { | 754 | { |
757 | call_storage_idle_notifys(false); | 755 | call_storage_idle_notifys(false); |
@@ -759,7 +757,6 @@ static void sdmmc_thread(void) | |||
759 | } | 757 | } |
760 | } | 758 | } |
761 | break; | 759 | break; |
762 | break; | ||
763 | case SYS_USB_CONNECTED: | 760 | case SYS_USB_CONNECTED: |
764 | usb_acknowledge(SYS_USB_CONNECTED_ACK); | 761 | usb_acknowledge(SYS_USB_CONNECTED_ACK); |
765 | /* Wait until the USB cable is extracted again */ | 762 | /* Wait until the USB cable is extracted again */ |