summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-04-07 01:05:51 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-04-07 01:05:51 +0000
commit2f9f34e0ea793f6d2134c749358655fcfc9062f6 (patch)
treee949e6bc0a4395d53829c41fadda1e9734af72bf
parent1d4d41d16e339b98fff6662b77d5a182da183459 (diff)
downloadrockbox-2f9f34e0ea793f6d2134c749358655fcfc9062f6.tar.gz
rockbox-2f9f34e0ea793f6d2134c749358655fcfc9062f6.zip
Better sansa shutdown sequence in power_off.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17009 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/sandisk/power-c200_e200.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/firmware/target/arm/sandisk/power-c200_e200.c b/firmware/target/arm/sandisk/power-c200_e200.c
index d23754a478..6b3f295e07 100644
--- a/firmware/target/arm/sandisk/power-c200_e200.c
+++ b/firmware/target/arm/sandisk/power-c200_e200.c
@@ -32,23 +32,21 @@ void power_off(void)
{
char byte;
- /* Disable interrupts on this core */
- disable_interrupt(IRQ_FIQ_STATUS);
-
- /* Mask them on both cores */
- CPU_INT_CLR = -1;
- COP_INT_CLR = -1;
-
/* Send shutdown command to PMU */
byte = i2c_readbyte(AS3514_I2C_ADDR, SYSTEM);
byte &= ~0x1;
pp_i2c_send(AS3514_I2C_ADDR, SYSTEM, byte);
+ /* Stop interrupts on both cores */
+ disable_irq(IRQ_FIQ_STATUS);
+ COP_INT_CLR = -1;
+ CPU_INT_CLR = -1;
+
/* Halt everything and wait for device to power off */
while (1)
{
- CPU_CTL = PROC_SLEEP;
- COP_CTL = PROC_SLEEP;
+ COP_CTL = 0x40000000;
+ CPU_CTL = 0x40000000;
}
}