mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
AMS Sansa: FS#10669 Reimplement Voltage scaling.
Reimplement voltage scaling on AMS Sansas at 1.10v during unboosted operation to improve runtimes. The voltage is now also boosted during disk access if a µSD is present. This prevents the µSD problems we saw on the last implementation. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23193 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2b94830112
commit
562e41bae5
2 changed files with 24 additions and 4 deletions
|
|
@ -812,6 +812,11 @@ void sd_enable(bool on)
|
|||
#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
|
||||
extern int buttonlight_is_on;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_HOTSWAP
|
||||
static bool cpu_boosted = false;
|
||||
#endif
|
||||
|
||||
if (sd_enabled == on)
|
||||
return; /* nothing to do */
|
||||
if(on)
|
||||
|
|
@ -830,6 +835,14 @@ void sd_enable(bool on)
|
|||
CGU_IDE |= (1<<7) /* AHB interface enable */ |
|
||||
(1<<6) /* interface enable */;
|
||||
sd_enabled = true;
|
||||
|
||||
#ifdef HAVE_HOTSWAP
|
||||
if(card_detect_target()) /* If SD card present Boost cpu for voltage */
|
||||
{
|
||||
cpu_boosted = true;
|
||||
cpu_boost(true);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -844,6 +857,14 @@ void sd_enable(bool on)
|
|||
#endif /* HAVE_MULTIDRIVE */
|
||||
CGU_IDE &= ~((1<<7)|(1<<6));
|
||||
sd_enabled = false;
|
||||
|
||||
#ifdef HAVE_HOTSWAP
|
||||
if(cpu_boosted)
|
||||
{
|
||||
cpu_boost(false);
|
||||
cpu_boosted = false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue