summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320
diff options
context:
space:
mode:
authorTomasz Moń <desowin@gmail.com>2011-12-20 06:21:58 +0000
committerTomasz Moń <desowin@gmail.com>2011-12-20 06:21:58 +0000
commitc24a36dd9d54f4f77fb40b63fba1c76bac764aa6 (patch)
tree036579fb3253a3d33e4883bac2937d27c693ae6e /firmware/target/arm/tms320dm320
parent74516e06e79cd7c789395d790b79f8dc6e847f50 (diff)
Sansa Connect: Disable EMIF clock after booting main binary. Raise the threshold values for battery dangerous and shutoff levels.
On this player EMIF is needed for accessing NOR flash. Disabling it improves battery runtime by about 25 minutes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31373 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320')
-rw-r--r--firmware/target/arm/tms320dm320/sansa-connect/powermgmt-sansaconnect.c4
-rw-r--r--firmware/target/arm/tms320dm320/system-dm320.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/firmware/target/arm/tms320dm320/sansa-connect/powermgmt-sansaconnect.c b/firmware/target/arm/tms320dm320/sansa-connect/powermgmt-sansaconnect.c
index 4b22b85c09..c42f56b0b3 100644
--- a/firmware/target/arm/tms320dm320/sansa-connect/powermgmt-sansaconnect.c
+++ b/firmware/target/arm/tms320dm320/sansa-connect/powermgmt-sansaconnect.c
@@ -31,13 +31,13 @@ static unsigned int current_battery_level = 100;
/* This specifies the battery level that writes are still safe */
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
{
- 1
+ 5
};
/* Below this the player cannot be considered to operate reliably */
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
{
- 0
+ 4
};
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
diff --git a/firmware/target/arm/tms320dm320/system-dm320.c b/firmware/target/arm/tms320dm320/system-dm320.c
index abdca21627..267fbd46af 100644
--- a/firmware/target/arm/tms320dm320/system-dm320.c
+++ b/firmware/target/arm/tms320dm320/system-dm320.c
@@ -374,6 +374,11 @@ void system_init(void)
i2c_init();
avr_hid_init();
+
+#ifndef BOOTLOADER
+ /* Disable External Memory interface (used for accessing NOR flash) */
+ bitclr16(&IO_CLK_MOD0, CLK_MOD0_EMIF);
+#endif
#endif
}