diff options
-rw-r--r-- | firmware/export/config-ipod3g.h | 3 | ||||
-rw-r--r-- | firmware/target/arm/ipod/power-ipod.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/firmware/export/config-ipod3g.h b/firmware/export/config-ipod3g.h index 466fb19601..b356fc5ac0 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h | |||
@@ -73,6 +73,9 @@ | |||
73 | /* Define this if you have a PortalPlayer PP5002 */ | 73 | /* Define this if you have a PortalPlayer PP5002 */ |
74 | #define CONFIG_CPU PP5002 | 74 | #define CONFIG_CPU PP5002 |
75 | 75 | ||
76 | /* We're able to shut off power to the HDD */ | ||
77 | #define HAVE_ATA_POWER_OFF | ||
78 | |||
76 | /* Define this if you want to use the PP5002 i2c interface */ | 79 | /* Define this if you want to use the PP5002 i2c interface */ |
77 | #define CONFIG_I2C I2C_PP5002 | 80 | #define CONFIG_I2C I2C_PP5002 |
78 | 81 | ||
diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c index 1b5ea60d87..37ef418026 100644 --- a/firmware/target/arm/ipod/power-ipod.c +++ b/firmware/target/arm/ipod/power-ipod.c | |||
@@ -30,11 +30,12 @@ | |||
30 | 30 | ||
31 | void power_init(void) | 31 | void power_init(void) |
32 | { | 32 | { |
33 | #ifdef IPOD_1G2G /* probably also 3rd gen */ | 33 | #if defined(IPOD_1G2G) || defined(IPOD_3G) |
34 | GPIOC_ENABLE |= 0x40; /* GPIO C6 is HDD power (low active) */ | 34 | GPIOC_ENABLE |= 0x40; /* GPIO C6 is HDD power (low active) */ |
35 | GPIOC_OUTPUT_VAL &= ~0x40; /* on by default */ | 35 | GPIOC_OUTPUT_VAL &= ~0x40; /* on by default */ |
36 | GPIOC_OUTPUT_EN |= 0x40; /* enable output */ | 36 | GPIOC_OUTPUT_EN |= 0x40; /* enable output */ |
37 | #else | 37 | #endif |
38 | #ifndef IPOD_1G2G | ||
38 | pcf50605_init(); | 39 | pcf50605_init(); |
39 | #endif | 40 | #endif |
40 | } | 41 | } |
@@ -57,7 +58,7 @@ bool charging_state(void) { | |||
57 | 58 | ||
58 | void ide_power_enable(bool on) | 59 | void ide_power_enable(bool on) |
59 | { | 60 | { |
60 | #ifdef IPOD_1G2G /* probably also 3rd gen */ | 61 | #if defined(IPOD_1G2G) || defined(IPOD_3G) |
61 | if (on) | 62 | if (on) |
62 | GPIOC_OUTPUT_VAL &= ~0x40; | 63 | GPIOC_OUTPUT_VAL &= ~0x40; |
63 | else | 64 | else |
@@ -70,7 +71,7 @@ void ide_power_enable(bool on) | |||
70 | 71 | ||
71 | bool ide_powered(void) | 72 | bool ide_powered(void) |
72 | { | 73 | { |
73 | #ifdef IPOD_1G2G /* probably also 3rd gen */ | 74 | #if defined(IPOD_1G2G) || defined(IPOD_3G) |
74 | return !(GPIOC_OUTPUT_VAL & 0x40); | 75 | return !(GPIOC_OUTPUT_VAL & 0x40); |
75 | #else | 76 | #else |
76 | /* pretend we are always powered - we don't turn it off on the ipod */ | 77 | /* pretend we are always powered - we don't turn it off on the ipod */ |