diff options
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); |