diff options
author | Jack Halpin <jack.halpin@gmail.com> | 2009-10-15 19:48:26 +0000 |
---|---|---|
committer | Jack Halpin <jack.halpin@gmail.com> | 2009-10-15 19:48:26 +0000 |
commit | 562e41bae5b76abd49eceebf8324a445a4b82450 (patch) | |
tree | d74f03cbb2108120db6a77ceda27f8650a3b00d4 /firmware/target/arm/as3525/ata_sd_as3525.c | |
parent | 2b9483011287215903c9766472195f325561a0e6 (diff) | |
download | rockbox-562e41bae5b76abd49eceebf8324a445a4b82450.tar.gz rockbox-562e41bae5b76abd49eceebf8324a445a4b82450.zip |
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
Diffstat (limited to 'firmware/target/arm/as3525/ata_sd_as3525.c')
-rw-r--r-- | firmware/target/arm/as3525/ata_sd_as3525.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/firmware/target/arm/as3525/ata_sd_as3525.c b/firmware/target/arm/as3525/ata_sd_as3525.c index 92dc0b746b..57dc307e7f 100644 --- a/firmware/target/arm/as3525/ata_sd_as3525.c +++ b/firmware/target/arm/as3525/ata_sd_as3525.c | |||
@@ -812,6 +812,11 @@ void sd_enable(bool on) | |||
812 | #if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE) | 812 | #if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE) |
813 | extern int buttonlight_is_on; | 813 | extern int buttonlight_is_on; |
814 | #endif | 814 | #endif |
815 | |||
816 | #ifdef HAVE_HOTSWAP | ||
817 | static bool cpu_boosted = false; | ||
818 | #endif | ||
819 | |||
815 | if (sd_enabled == on) | 820 | if (sd_enabled == on) |
816 | return; /* nothing to do */ | 821 | return; /* nothing to do */ |
817 | if(on) | 822 | if(on) |
@@ -830,6 +835,14 @@ void sd_enable(bool on) | |||
830 | CGU_IDE |= (1<<7) /* AHB interface enable */ | | 835 | CGU_IDE |= (1<<7) /* AHB interface enable */ | |
831 | (1<<6) /* interface enable */; | 836 | (1<<6) /* interface enable */; |
832 | sd_enabled = true; | 837 | sd_enabled = true; |
838 | |||
839 | #ifdef HAVE_HOTSWAP | ||
840 | if(card_detect_target()) /* If SD card present Boost cpu for voltage */ | ||
841 | { | ||
842 | cpu_boosted = true; | ||
843 | cpu_boost(true); | ||
844 | } | ||
845 | #endif | ||
833 | } | 846 | } |
834 | else | 847 | else |
835 | { | 848 | { |
@@ -844,6 +857,14 @@ void sd_enable(bool on) | |||
844 | #endif /* HAVE_MULTIDRIVE */ | 857 | #endif /* HAVE_MULTIDRIVE */ |
845 | CGU_IDE &= ~((1<<7)|(1<<6)); | 858 | CGU_IDE &= ~((1<<7)|(1<<6)); |
846 | sd_enabled = false; | 859 | sd_enabled = false; |
860 | |||
861 | #ifdef HAVE_HOTSWAP | ||
862 | if(cpu_boosted) | ||
863 | { | ||
864 | cpu_boost(false); | ||
865 | cpu_boosted = false; | ||
866 | } | ||
867 | #endif | ||
847 | } | 868 | } |
848 | } | 869 | } |
849 | 870 | ||