diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2005-05-16 15:21:09 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2005-05-16 15:21:09 +0000 |
| commit | fe1ce9d8426899d4c254a161955762a33e6fcf25 (patch) | |
| tree | ea37ca25bd2fce8dc67766dfe4bba1cebe3f629a | |
| parent | 15d7077c3ad2b7e3bcacf61a04428784b11e418c (diff) | |
| download | rockbox-fe1ce9d8426899d4c254a161955762a33e6fcf25.zip rockbox-fe1ce9d8426899d4c254a161955762a33e6fcf25.tar.gz rockbox-fe1ce9d8426899d4c254a161955762a33e6fcf25.tar.bz2 rockbox-fe1ce9d8426899d4c254a161955762a33e6fcf25.tar.xz | |
Hotswap: Better placement for switching the MMC monitor off/on.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6480 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | apps/main.c | 3 | ||||
| -rw-r--r-- | firmware/common/disk.c | 7 | ||||
| -rw-r--r-- | firmware/drivers/ata_mmc.c | 2 | ||||
| -rw-r--r-- | firmware/usb.c | 6 |
4 files changed, 8 insertions, 10 deletions
diff --git a/apps/main.c b/apps/main.c index edcff92..25bc929 100644 --- a/apps/main.c +++ b/apps/main.c @@ -233,9 +233,6 @@ void init(void) usb_screen(); system_reboot(); } -#if defined(HAVE_MMC) && defined(HAVE_HOTSWAP) - mmc_enable_monitoring(true); -#endif settings_calc_config_sector(); settings_load(SETTINGS_ALL); diff --git a/firmware/common/disk.c b/firmware/common/disk.c index f4d153c..2f1d789 100644 --- a/firmware/common/disk.c +++ b/firmware/common/disk.c @@ -100,6 +100,10 @@ int disk_mount_all(void) { int mounted; int i; + +#if defined(HAVE_MMC) && defined(HAVE_HOTSWAP) + mmc_enable_monitoring(false); +#endif fat_init(); /* reset all mounted partitions */ for (i=0; i<NUM_VOLUMES; i++) @@ -111,6 +115,9 @@ int disk_mount_all(void) { mounted += disk_mount(1); /* try 2nd "drive", too */ } +#ifdef HAVE_HOTSWAP + mmc_enable_monitoring(true); +#endif #endif return mounted; diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c index aa333db..9c2e581 100644 --- a/firmware/drivers/ata_mmc.c +++ b/firmware/drivers/ata_mmc.c @@ -94,7 +94,7 @@ static struct mutex mmc_mutex; static long mmc_stack[(DEFAULT_STACK_SIZE + 0x800)/sizeof(long)]; static const char mmc_thread_name[] = "mmc"; static struct event_queue mmc_queue; -static bool mmc_monitor_enabled = false; +static bool mmc_monitor_enabled = true; #endif static bool initialized = false; static bool new_mmc_circuit; diff --git a/firmware/usb.c b/firmware/usb.c index 4b76fe6..6095bcd 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -194,13 +194,7 @@ static void usb_slave_mode(bool on) panicf("ata: %d",rc); } -#if defined(HAVE_MMC) && defined(HAVE_HOTSWAP) - mmc_enable_monitoring(false); rc = disk_mount_all(); - mmc_enable_monitoring(true); -#else - rc = disk_mount_all(); -#endif if (rc <= 0) /* no partition */ panicf("mount: %d",rc); |