forked from len0rd/rockbox
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
This commit is contained in:
parent
15d7077c3a
commit
fe1ce9d842
4 changed files with 8 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue