diff options
Diffstat (limited to 'firmware/target/arm/imx233/sdmmc-imx233.c')
-rw-r--r-- | firmware/target/arm/imx233/sdmmc-imx233.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/target/arm/imx233/sdmmc-imx233.c b/firmware/target/arm/imx233/sdmmc-imx233.c index a41a549e02..e0966f784b 100644 --- a/firmware/target/arm/imx233/sdmmc-imx233.c +++ b/firmware/target/arm/imx233/sdmmc-imx233.c | |||
@@ -647,6 +647,7 @@ static void sdmmc_thread(void) | |||
647 | { | 647 | { |
648 | struct queue_event ev; | 648 | struct queue_event ev; |
649 | bool idle_notified = false; | 649 | bool idle_notified = false; |
650 | int timeout = 0; | ||
650 | 651 | ||
651 | while (1) | 652 | while (1) |
652 | { | 653 | { |
@@ -706,8 +707,13 @@ static void sdmmc_thread(void) | |||
706 | } | 707 | } |
707 | #endif | 708 | #endif |
708 | case SYS_TIMEOUT: | 709 | case SYS_TIMEOUT: |
709 | if(TIME_BEFORE(current_tick, sd_last_disk_activity()+(3*HZ)) || | 710 | #if CONFIG_STORAGE & STORAGE_SD |
710 | TIME_BEFORE(current_tick, mmc_last_disk_activity()+(3*HZ))) | 711 | timeout = MAX(timeout, sd_last_disk_activity()+(3*HZ)); |
712 | #endif | ||
713 | #if CONFIG_STORAGE & STORAGE_MMC | ||
714 | timeout = MAX(timeout, mmc_last_disk_activity()+(3*HZ)); | ||
715 | #endif | ||
716 | if(TIME_BEFORE(current_tick, timeout)) | ||
711 | { | 717 | { |
712 | idle_notified = false; | 718 | idle_notified = false; |
713 | } | 719 | } |