summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-08-30 17:25:25 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-08-30 17:28:13 +0200
commit7ff78c4ccb4d4715778a2f7cea0fd9555f0d6eab (patch)
tree303bc6e331c0441b27ad3984abed1345dc55f9b2 /firmware/target/arm/imx233
parent722e24a76ac7a2c550f8428c5762f40dd9313d91 (diff)
downloadrockbox-7ff78c4ccb4d4715778a2f7cea0fd9555f0d6eab.tar.gz
rockbox-7ff78c4ccb4d4715778a2f7cea0fd9555f0d6eab.tar.bz2
rockbox-7ff78c4ccb4d4715778a2f7cea0fd9555f0d6eab.zip
imx233: fix compilation of sdmmc for non-mmc targets
Change-Id: I0f61d0ca8e385fbfeaba53b81c3320b24aa61ab9
Diffstat (limited to 'firmware/target/arm/imx233')
-rw-r--r--firmware/target/arm/imx233/sdmmc-imx233.c10
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)
{
struct queue_event ev;
bool idle_notified = false;
+ int timeout = 0;
while (1)
{
@@ -706,8 +707,13 @@ static void sdmmc_thread(void)
}
#endif
case SYS_TIMEOUT:
- if(TIME_BEFORE(current_tick, sd_last_disk_activity()+(3*HZ)) ||
- TIME_BEFORE(current_tick, mmc_last_disk_activity()+(3*HZ)))
+#if CONFIG_STORAGE & STORAGE_SD
+ timeout = MAX(timeout, sd_last_disk_activity()+(3*HZ));
+#endif
+#if CONFIG_STORAGE & STORAGE_MMC
+ timeout = MAX(timeout, mmc_last_disk_activity()+(3*HZ));
+#endif
+ if(TIME_BEFORE(current_tick, timeout))
{
idle_notified = false;
}