diff options
author | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-02-03 23:10:01 +0000 |
---|---|---|
committer | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-02-03 23:10:01 +0000 |
commit | dd924a522d6e453d7ba7245f1c515088c22517ab (patch) | |
tree | d653992f614859126fb93698b83d326449e1cc08 /firmware/drivers | |
parent | 2580cdfe731f10f785261edf1632afd7d8ff1160 (diff) |
Gmini power management basis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5767 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/power.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/firmware/drivers/power.c b/firmware/drivers/power.c index 0d490242b5..7977b8c4fa 100644 --- a/firmware/drivers/power.c +++ b/firmware/drivers/power.c @@ -88,6 +88,8 @@ bool charger_inserted(void) { #ifdef IRIVER_H100 return (GPIO1_READ & 0x00400000)?true:false; +#elif defined(GMINI_ARCH) + return (P7 & 0x80) == 0; #else #ifdef HAVE_CHARGING #ifdef HAVE_CHARGE_CTRL @@ -137,6 +139,11 @@ void ide_power_enable(bool on) GPIO_OUT &= ~0x80000000; else GPIO_OUT |= 0x80000000; +#elif defined(GMINI_ARCH) + if (on) + P1 |= 0x04; + else + P2 &= ~0x04; #else bool touched = false; #ifdef NEEDS_ATA_POWER_ON @@ -183,6 +190,8 @@ bool ide_powered(void) { #ifdef IRIVER_H100 return (GPIO_OUT & 0x80000000)?false:true; +#elif defined(GMINI_ARCH) + return (P1 & 0x04?true:false); #else #if defined(NEEDS_ATA_POWER_ON) || defined(HAVE_ATA_POWER_OFF) #ifdef ATA_POWER_PLAYERSTYLE @@ -211,6 +220,9 @@ void power_off(void) set_irq_level(HIGHEST_IRQ_LEVEL); #ifdef IRIVER_H100 GPIO1_OUT &= ~0x00080000; +#elif defined(GMINI_ARCH) + P1 &= ~1; + P1CON &= ~1; #else #ifdef HAVE_POWEROFF_ON_PBDR and_b(~0x10, &PBDRL); |