summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/sandisk/power-c200_e200.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/sandisk/power-c200_e200.c')
-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;
}
}