summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r--firmware/drivers/ata.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index c8ad3b3151..9bf1815e36 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -241,8 +241,10 @@ static volatile unsigned char* ata_control;
241 241
242bool old_recorder = false; 242bool old_recorder = false;
243int ata_spinup_time = 0; 243int ata_spinup_time = 0;
244#ifdef CONFIG_LED
244static bool ata_led_enabled = true; 245static bool ata_led_enabled = true;
245static bool ata_led_on = false; 246static bool ata_led_on = false;
247#endif
246static bool spinup = false; 248static bool spinup = false;
247static bool sleeping = true; 249static bool sleeping = true;
248static long sleep_timeout = 5*HZ; 250static long sleep_timeout = 5*HZ;
@@ -475,12 +477,16 @@ static void copy_read_sectors(unsigned char* buf, int wordcount)
475#endif 477#endif
476} 478}
477 479
480#ifdef CONFIG_LED
478static void ata_led(bool on) { 481static void ata_led(bool on) {
479 ata_led_on = on; 482 ata_led_on = on;
480 if (ata_led_enabled) { 483 if (ata_led_enabled) {
481 led(ata_led_on); 484 led(ata_led_on);
482 } 485 }
483} 486}
487#else
488#define ata_led(on)
489#endif
484 490
485int ata_read_sectors(IF_MV2(int drive,) 491int ata_read_sectors(IF_MV2(int drive,)
486 unsigned long start, 492 unsigned long start,
@@ -1468,6 +1474,7 @@ int ata_init(void)
1468 return 0; 1474 return 0;
1469} 1475}
1470 1476
1477#if CONFIG_LED == LED_REAL
1471void ata_set_led_enabled(bool enabled) { 1478void ata_set_led_enabled(bool enabled) {
1472 ata_led_enabled = enabled; 1479 ata_led_enabled = enabled;
1473 if (ata_led_enabled) { 1480 if (ata_led_enabled) {
@@ -1476,3 +1483,4 @@ void ata_set_led_enabled(bool enabled) {
1476 led(false); 1483 led(false);
1477 } 1484 }
1478} 1485}
1486#endif