From 3be567d451ea9b1373cdd72415e717aaebdbc923 Mon Sep 17 00:00:00 2001 From: wodz Date: Tue, 27 Jul 2010 21:27:51 +0000 Subject: [PATCH] Add optional CURRENT_ATA in runcurrent(). On MPIO HD200 powering ata takes ~100mA which is sagnificant contribution to the total power consumption. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27589 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/config/mpiohd200.h | 1 + firmware/powermgmt.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/firmware/export/config/mpiohd200.h b/firmware/export/config/mpiohd200.h index 072b45908..52db452ca 100644 --- a/firmware/export/config/mpiohd200.h +++ b/firmware/export/config/mpiohd200.h @@ -124,6 +124,7 @@ #define CURRENT_NORMAL 68 /* measured during playback unboosted */ #define CURRENT_BACKLIGHT 24 /* measured */ #define CURRENT_RECORD 40 /* additional current while recording */ +#define CURRENT_ATA 100 /* additional current when ata system is ON */ /* #define CURRENT_REMOTE 0 additional current when remote connected */ #define CONFIG_CHARGING CHARGING_MONITOR diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index c5f981d1f..6ae2ca615 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -414,6 +414,12 @@ static int runcurrent(void) if (remote_detect()) current += CURRENT_REMOTE; #endif + +#if defined(HAVE_ATA_POWER_OFF) && defined(CURRENT_ATA) + if (ide_powered()) + current += CURRENT_ATA; +#endif + #endif /* BOOTLOADER */ return current; -- 2.11.4.GIT