diff options
| author | Jens Arnold <amiconn@rockbox.org> | 2007-08-03 22:54:33 +0000 |
|---|---|---|
| committer | Jens Arnold <amiconn@rockbox.org> | 2007-08-03 22:54:33 +0000 |
| commit | 7f85b5b907d8f9a5545e3bfec80c19c3083cd303 (patch) | |
| tree | b56e6fe060a570d2598f73d054f16aa554add042 | |
| parent | 5490f6c78afe7e8d472c0e2999c3586a83916b0e (diff) | |
| download | rockbox-7f85b5b907d8f9a5545e3bfec80c19c3083cd303.zip rockbox-7f85b5b907d8f9a5545e3bfec80c19c3083cd303.tar.gz rockbox-7f85b5b907d8f9a5545e3bfec80c19c3083cd303.tar.bz2 rockbox-7f85b5b907d8f9a5545e3bfec80c19c3083cd303.tar.xz | |
Disk poweroff for 3rd gen iPods.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14171 a1c6a512-1295-4272-9138-f99709370657
| -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 466fb19..b356fc5 100644 --- a/firmware/export/config-ipod3g.h +++ b/firmware/export/config-ipod3g.h @@ -73,6 +73,9 @@ /* Define this if you have a PortalPlayer PP5002 */ #define CONFIG_CPU PP5002 +/* We're able to shut off power to the HDD */ +#define HAVE_ATA_POWER_OFF + /* Define this if you want to use the PP5002 i2c interface */ #define CONFIG_I2C I2C_PP5002 diff --git a/firmware/target/arm/ipod/power-ipod.c b/firmware/target/arm/ipod/power-ipod.c index 1b5ea60..37ef418 100644 --- a/firmware/target/arm/ipod/power-ipod.c +++ b/firmware/target/arm/ipod/power-ipod.c @@ -30,11 +30,12 @@ void power_init(void) { -#ifdef IPOD_1G2G /* probably also 3rd gen */ +#if defined(IPOD_1G2G) || defined(IPOD_3G) GPIOC_ENABLE |= 0x40; /* GPIO C6 is HDD power (low active) */ GPIOC_OUTPUT_VAL &= ~0x40; /* on by default */ GPIOC_OUTPUT_EN |= 0x40; /* enable output */ -#else +#endif +#ifndef IPOD_1G2G pcf50605_init(); #endif } @@ -57,7 +58,7 @@ bool charging_state(void) { void ide_power_enable(bool on) { -#ifdef IPOD_1G2G /* probably also 3rd gen */ +#if defined(IPOD_1G2G) || defined(IPOD_3G) if (on) GPIOC_OUTPUT_VAL &= ~0x40; else @@ -70,7 +71,7 @@ void ide_power_enable(bool on) bool ide_powered(void) { -#ifdef IPOD_1G2G /* probably also 3rd gen */ +#if defined(IPOD_1G2G) || defined(IPOD_3G) return !(GPIOC_OUTPUT_VAL & 0x40); #else /* pretend we are always powered - we don't turn it off on the ipod */ |