diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-16 06:08:04 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-06-16 06:08:04 +0000 |
commit | 46e1231a446b6adb002808ee83ace9c9be95d5e2 (patch) | |
tree | 1a42f573811e5b46bd3c7652c9a94ed3811f5002 /firmware | |
parent | d258c58937a7389e8c9471cf61c68d2eadae9020 (diff) | |
download | rockbox-46e1231a446b6adb002808ee83ace9c9be95d5e2.tar.gz rockbox-46e1231a446b6adb002808ee83ace9c9be95d5e2.zip |
FS#11402 by me : sd_enable for Sansa AMSv2
Gets a bit more battery life
Adjust current usage, it was a bit too low for Clipv2/Clip+
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26866 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/export/config/sansaclipplus.h | 2 | ||||
-rw-r--r-- | firmware/export/config/sansaclipv2.h | 2 | ||||
-rw-r--r-- | firmware/export/config/sansafuzev2.h | 2 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sd-as3525v2.c | 16 |
4 files changed, 17 insertions, 5 deletions
diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index 883a71ea21..90636b152d 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h | |||
@@ -161,7 +161,7 @@ | |||
161 | /* #define HAVE_POWEROFF_WHILE_CHARGING */ | 161 | /* #define HAVE_POWEROFF_WHILE_CHARGING */ |
162 | 162 | ||
163 | /* define current usage levels (based on battery bench) */ | 163 | /* define current usage levels (based on battery bench) */ |
164 | #define CURRENT_NORMAL 15 | 164 | #define CURRENT_NORMAL 19 |
165 | #define CURRENT_BACKLIGHT 15 | 165 | #define CURRENT_BACKLIGHT 15 |
166 | #define CURRENT_RECORD CURRENT_NORMAL /* TODO */ | 166 | #define CURRENT_RECORD CURRENT_NORMAL /* TODO */ |
167 | 167 | ||
diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h index 3ae09b7003..85c1276367 100644 --- a/firmware/export/config/sansaclipv2.h +++ b/firmware/export/config/sansaclipv2.h | |||
@@ -157,7 +157,7 @@ | |||
157 | /* #define HAVE_POWEROFF_WHILE_CHARGING */ | 157 | /* #define HAVE_POWEROFF_WHILE_CHARGING */ |
158 | 158 | ||
159 | /* define current usage levels (based on battery bench) */ | 159 | /* define current usage levels (based on battery bench) */ |
160 | #define CURRENT_NORMAL 23 | 160 | #define CURRENT_NORMAL 24 |
161 | #define CURRENT_BACKLIGHT 15 | 161 | #define CURRENT_BACKLIGHT 15 |
162 | #define CURRENT_RECORD 11 | 162 | #define CURRENT_RECORD 11 |
163 | 163 | ||
diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h index f3d8e0860e..de980c6ab3 100644 --- a/firmware/export/config/sansafuzev2.h +++ b/firmware/export/config/sansafuzev2.h | |||
@@ -164,7 +164,7 @@ | |||
164 | #define CONFIG_I2C I2C_AS3525 | 164 | #define CONFIG_I2C I2C_AS3525 |
165 | 165 | ||
166 | /* define current usage levels (based on battery bench) */ | 166 | /* define current usage levels (based on battery bench) */ |
167 | #define CURRENT_NORMAL 30 | 167 | #define CURRENT_NORMAL 26 |
168 | #define CURRENT_BACKLIGHT 30 | 168 | #define CURRENT_BACKLIGHT 30 |
169 | #define CURRENT_RECORD CURRENT_NORMAL | 169 | #define CURRENT_RECORD CURRENT_NORMAL |
170 | 170 | ||
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index a668f65e0c..386b76e758 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c | |||
@@ -953,8 +953,20 @@ long sd_last_disk_activity(void) | |||
953 | 953 | ||
954 | void sd_enable(bool on) | 954 | void sd_enable(bool on) |
955 | { | 955 | { |
956 | /* TODO */ | 956 | if (on) |
957 | (void) on; | 957 | { |
958 | CGU_PERI |= CGU_MCI_CLOCK_ENABLE; | ||
959 | CGU_IDE |= (1<<7); /* AHB interface enable */ | ||
960 | CGU_MEMSTICK |= (1<<7); /* interface enable */ | ||
961 | CGU_SDSLOT |= (1<<7); /* interface enable */ | ||
962 | } | ||
963 | else | ||
964 | { | ||
965 | CGU_SDSLOT &= ~(1<<7); /* interface enable */ | ||
966 | CGU_MEMSTICK &= ~(1<<7); /* interface enable */ | ||
967 | CGU_IDE &= ~(1<<7); /* AHB interface enable */ | ||
968 | CGU_PERI &= ~CGU_MCI_CLOCK_ENABLE; | ||
969 | } | ||
958 | } | 970 | } |
959 | 971 | ||
960 | tCardInfo *card_get_info_target(int card_no) | 972 | tCardInfo *card_get_info_target(int card_no) |