diff options
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c index d920b005f6..544869ab6c 100644 --- a/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c +++ b/firmware/target/arm/s3c2440/gigabeat-fx/power-meg-fx.c | |||
@@ -64,12 +64,23 @@ bool ide_powered(void) | |||
64 | 64 | ||
65 | void power_off(void) | 65 | void power_off(void) |
66 | { | 66 | { |
67 | int(*reboot_point)(void); | ||
68 | reboot_point=(void*)(unsigned char*) 0x00000000; | ||
67 | /* turn off backlight and wait for 1 second */ | 69 | /* turn off backlight and wait for 1 second */ |
68 | _backlight_off(); | 70 | _backlight_off(); |
69 | _buttonlight_off(); | 71 | _buttonlight_off(); |
70 | sleep(HZ); | 72 | sleep(HZ); |
71 | /* set SLEEP bit to on in CLKCON to turn off */ | 73 | |
74 | /* Rockbox never properly shutdown the player. When the sleep bit is set | ||
75 | * the player actually wakes up in some type of "zombie" state | ||
76 | * because the shutdown routine is not set up properly. So far the | ||
77 | * shutdown routines tried leave the player consuming excess power | ||
78 | * so we rely on the OF to shut everything down instead. (mmu apears to be | ||
79 | * reset when the sleep bit is set) | ||
80 | */ | ||
72 | CLKCON |=(1<<3); | 81 | CLKCON |=(1<<3); |
82 | |||
83 | reboot_point(); | ||
73 | } | 84 | } |
74 | 85 | ||
75 | #else /* SIMULATOR */ | 86 | #else /* SIMULATOR */ |