diff options
Diffstat (limited to 'firmware/drivers/ata.c')
-rw-r--r-- | firmware/drivers/ata.c | 8 |
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 | ||
242 | bool old_recorder = false; | 242 | bool old_recorder = false; |
243 | int ata_spinup_time = 0; | 243 | int ata_spinup_time = 0; |
244 | #ifdef CONFIG_LED | ||
244 | static bool ata_led_enabled = true; | 245 | static bool ata_led_enabled = true; |
245 | static bool ata_led_on = false; | 246 | static bool ata_led_on = false; |
247 | #endif | ||
246 | static bool spinup = false; | 248 | static bool spinup = false; |
247 | static bool sleeping = true; | 249 | static bool sleeping = true; |
248 | static long sleep_timeout = 5*HZ; | 250 | static 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 | ||
478 | static void ata_led(bool on) { | 481 | static 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 | ||
485 | int ata_read_sectors(IF_MV2(int drive,) | 491 | int 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 | ||
1471 | void ata_set_led_enabled(bool enabled) { | 1478 | void 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 | ||