summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio/m3/power-m3.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-03-17 23:47:38 +0000
committerJens Arnold <amiconn@rockbox.org>2008-03-17 23:47:38 +0000
commited3ff1b0b5122e898f7310a9b5ed112a22e2828c (patch)
tree10838a643bc95d0792e4bda21ad14a343b374751 /firmware/target/coldfire/iaudio/m3/power-m3.c
parent4071826c813f8e06e93e22049aee07ffc95c3460 (diff)
downloadrockbox-ed3ff1b0b5122e898f7310a9b5ed112a22e2828c.tar.gz
rockbox-ed3ff1b0b5122e898f7310a9b5ed112a22e2828c.zip
Various coldfire fixes: (1) iAudio Bootloader: Check the status of main & remote power button vs. the respective hold switch, and shut down when on hold. On X5/M5 this check is not strictly necessary for the main unit, but left there to keep things uniform. (2) M3: Stop reading the ADC properly before leaving the bootloader, on RoLo, and on reboot, to make it work reliably after those transitions. (3) Disable all interrupt sources on system init to avoid premature ISR calls after enabling interrupts in general. (4) iAudios: Proper implementation of ide_powered(), avoiding nasty HDD clicks in the bootloader when powering down, e.g. because of Hold. (5) Slight optimisations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16689 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iaudio/m3/power-m3.c')
-rw-r--r--firmware/target/coldfire/iaudio/m3/power-m3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/coldfire/iaudio/m3/power-m3.c b/firmware/target/coldfire/iaudio/m3/power-m3.c
index 52a5de3460..a7f3fc46be 100644
--- a/firmware/target/coldfire/iaudio/m3/power-m3.c
+++ b/firmware/target/coldfire/iaudio/m3/power-m3.c
@@ -36,7 +36,7 @@ void power_init(void)
36 /* Charger detect */ 36 /* Charger detect */
37 and_l(~0x00000020, &GPIO1_ENABLE); 37 and_l(~0x00000020, &GPIO1_ENABLE);
38 or_l(0x00000020, &GPIO1_FUNCTION); 38 or_l(0x00000020, &GPIO1_FUNCTION);
39 39
40 /* FIXME: Just disable the multi-colour LED for now. */ 40 /* FIXME: Just disable the multi-colour LED for now. */
41 and_l(~0x00000210, &GPIO1_OUT); 41 and_l(~0x00000210, &GPIO1_OUT);
42 and_l(~0x00008000, &GPIO_OUT); 42 and_l(~0x00008000, &GPIO_OUT);
@@ -61,7 +61,7 @@ void ide_power_enable(bool on)
61 61
62bool ide_powered(void) 62bool ide_powered(void)
63{ 63{
64 return false; 64 return (GPIO_OUT & 0x00800000) != 0;
65} 65}
66 66
67void power_off(void) 67void power_off(void)