summaryrefslogtreecommitdiffstats
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2010-07-27 21:27:51 +0000
committerMarcin Bukat <marcin.bukat@gmail.com>2010-07-27 21:27:51 +0000
commit1ee19676f22e9eed8de2b9dae4bd23b075961cf6 (patch)
treef7b537a5304162a241db378ec0f24e17d710ba94 /firmware/powermgmt.c
parente13d41076193660868dd8e26911fc5212deb08bb (diff)
downloadrockbox-1ee19676f22e9eed8de2b9dae4bd23b075961cf6.tar.gz
rockbox-1ee19676f22e9eed8de2b9dae4bd23b075961cf6.tar.bz2
rockbox-1ee19676f22e9eed8de2b9dae4bd23b075961cf6.zip
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
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index c5f981d1f6..6ae2ca6150 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;