summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-11-29 07:05:27 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-11-29 07:05:27 +0000
commitcf1368145af6e4b84421dd7331ad0f4c45d419a1 (patch)
tree6b2a8bbd4d6b69f17feb0df26d3109a35b26a4b1 /firmware
parent2b77b4fdd50f8ff150181f973767afa9dd4b7b22 (diff)
downloadrockbox-cf1368145af6e4b84421dd7331ad0f4c45d419a1.tar.gz
rockbox-cf1368145af6e4b84421dd7331ad0f4c45d419a1.zip
HAVE_ATA_POWER_OFF is now defined and used if the platform has support for
that control git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2889 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/config-recorder.h2
-rw-r--r--firmware/drivers/ata.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/firmware/config-recorder.h b/firmware/config-recorder.h
index 9bcfc7bc60..566758156c 100644
--- a/firmware/config-recorder.h
+++ b/firmware/config-recorder.h
@@ -16,3 +16,5 @@
16/* Define this if you have charging control */ 16/* Define this if you have charging control */
17#define HAVE_CHARGE_CTRL 17#define HAVE_CHARGE_CTRL
18 18
19/* Define this if you have ATA power-off control */
20#define HAVE_ATA_POWER_OFF
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 216bf180bf..173dab9be3 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -83,7 +83,7 @@ bool old_recorder = false;
83static bool sleeping = false; 83static bool sleeping = false;
84static int sleep_timeout = 5*HZ; 84static int sleep_timeout = 5*HZ;
85static bool poweroff = false; 85static bool poweroff = false;
86#ifdef ARCHOS_RECORDER 86#ifdef HAVE_ATA_POWER_OFF
87static int poweroff_timeout = 2*HZ; 87static int poweroff_timeout = 2*HZ;
88#endif 88#endif
89static char ata_stack[DEFAULT_STACK_SIZE]; 89static char ata_stack[DEFAULT_STACK_SIZE];
@@ -411,6 +411,7 @@ void ata_spindown(int seconds)
411 sleep_timeout = seconds * HZ; 411 sleep_timeout = seconds * HZ;
412} 412}
413 413
414#ifdef HAVE_ATA_POWER_OFF
414void ata_poweroff(bool enable) 415void ata_poweroff(bool enable)
415{ 416{
416 if (enable) 417 if (enable)
@@ -418,6 +419,7 @@ void ata_poweroff(bool enable)
418 else 419 else
419 poweroff_timeout = 0; 420 poweroff_timeout = 0;
420} 421}
422#endif
421 423
422bool ata_disk_is_active(void) 424bool ata_disk_is_active(void)
423{ 425{