Commit caa8bfbc456907fbab92a1c4f5890efcc8fb083e
Committed by
Tom Rini
1 parent
f1823d3aaa
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
block: ide: Drop CONFIG_IDE_LED
This is actually not used. Drop it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Showing 6 changed files with 0 additions and 63 deletions Side-by-side Diff
drivers/block/ide.c
... | ... | @@ -44,12 +44,6 @@ |
44 | 44 | #define CONFIG_SYS_ATA_PORT_ADDR(port) (port) |
45 | 45 | #endif |
46 | 46 | |
47 | -#ifndef CONFIG_IDE_LED /* define LED macros, they are not used anyways */ | |
48 | -# define DEVICE_LED(x) 0 | |
49 | -# define LED_IDE1 1 | |
50 | -# define LED_IDE2 2 | |
51 | -#endif | |
52 | - | |
53 | 47 | #ifdef CONFIG_IDE_RESET |
54 | 48 | extern void ide_set_reset(int idereset); |
55 | 49 | |
... | ... | @@ -217,8 +211,6 @@ |
217 | 211 | unsigned char c, err, mask, res; |
218 | 212 | int n; |
219 | 213 | |
220 | - ide_led(DEVICE_LED(device), 1); /* LED on */ | |
221 | - | |
222 | 214 | /* Select device |
223 | 215 | */ |
224 | 216 | mask = ATA_STAT_BUSY | ATA_STAT_DRQ; |
... | ... | @@ -326,7 +318,6 @@ |
326 | 318 | err = 0; |
327 | 319 | } |
328 | 320 | AI_OUT: |
329 | - ide_led(DEVICE_LED(device), 0); /* LED off */ | |
330 | 321 | return err; |
331 | 322 | } |
332 | 323 | |
... | ... | @@ -560,7 +551,6 @@ |
560 | 551 | device = dev_desc->devnum; |
561 | 552 | printf(" Device %d: ", device); |
562 | 553 | |
563 | - ide_led(DEVICE_LED(device), 1); /* LED on */ | |
564 | 554 | /* Select device |
565 | 555 | */ |
566 | 556 | ide_outb(device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device)); |
... | ... | @@ -600,7 +590,6 @@ |
600 | 590 | */ |
601 | 591 | c = ide_wait(device, IDE_TIME_OUT); |
602 | 592 | } |
603 | - ide_led(DEVICE_LED(device), 0); /* LED off */ | |
604 | 593 | |
605 | 594 | if (((c & ATA_STAT_DRQ) == 0) || |
606 | 595 | ((c & (ATA_STAT_FAULT | ATA_STAT_ERR)) != 0)) { |
... | ... | @@ -716,22 +705,6 @@ |
716 | 705 | #endif |
717 | 706 | } |
718 | 707 | |
719 | -__weak void ide_led(uchar led, uchar status) | |
720 | -{ | |
721 | -#if defined(CONFIG_IDE_LED) && defined(PER8_BASE) /* required by LED_PORT */ | |
722 | - static uchar led_buffer; /* Buffer for current LED status */ | |
723 | - | |
724 | - uchar *led_port = LED_PORT; | |
725 | - | |
726 | - if (status) /* switch LED on */ | |
727 | - led_buffer |= led; | |
728 | - else /* switch LED off */ | |
729 | - led_buffer &= ~led; | |
730 | - | |
731 | - *led_port = led_buffer; | |
732 | -#endif | |
733 | -} | |
734 | - | |
735 | 708 | __weak void ide_outb(int dev, int port, unsigned char val) |
736 | 709 | { |
737 | 710 | debug("ide_outb (dev= %d, port= 0x%x, val= 0x%02x) : @ 0x%08lx\n", |
... | ... | @@ -783,12 +756,6 @@ |
783 | 756 | |
784 | 757 | WATCHDOG_RESET(); |
785 | 758 | |
786 | - /* | |
787 | - * Reset the IDE just to be sure. | |
788 | - * Light LED's to show | |
789 | - */ | |
790 | - ide_led((LED_IDE1 | LED_IDE2), 1); /* LED's on */ | |
791 | - | |
792 | 759 | /* ATAPI Drives seems to need a proper IDE Reset */ |
793 | 760 | ide_reset(); |
794 | 761 | |
... | ... | @@ -818,8 +785,6 @@ |
818 | 785 | i++; |
819 | 786 | if (i > (ATA_RESET_TIME * 100)) { |
820 | 787 | puts("** Timeout **\n"); |
821 | - /* LED's off */ | |
822 | - ide_led((LED_IDE1 | LED_IDE2), 0); | |
823 | 788 | return; |
824 | 789 | } |
825 | 790 | if ((i >= 100) && ((i % 100) == 0)) |
826 | 791 | |
... | ... | @@ -844,10 +809,7 @@ |
844 | 809 | |
845 | 810 | putc('\n'); |
846 | 811 | |
847 | - ide_led((LED_IDE1 | LED_IDE2), 0); /* LED's off */ | |
848 | - | |
849 | 812 | for (i = 0; i < CONFIG_SYS_IDE_MAXDEVICE; ++i) { |
850 | - int led = (IDE_BUS(i) == 0) ? LED_IDE1 : LED_IDE2; | |
851 | 813 | ide_dev_desc[i].type = DEV_TYPE_UNKNOWN; |
852 | 814 | ide_dev_desc[i].if_type = IF_TYPE_IDE; |
853 | 815 | ide_dev_desc[i].devnum = i; |
854 | 816 | |
... | ... | @@ -862,9 +824,7 @@ |
862 | 824 | #endif |
863 | 825 | if (!ide_bus_ok[IDE_BUS(i)]) |
864 | 826 | continue; |
865 | - ide_led(led, 1); /* LED on */ | |
866 | 827 | ide_ident(&ide_dev_desc[i]); |
867 | - ide_led(led, 0); /* LED off */ | |
868 | 828 | dev_print(&ide_dev_desc[i]); |
869 | 829 | |
870 | 830 | if ((ide_dev_desc[i].lba > 0) && (ide_dev_desc[i].blksz > 0)) { |
... | ... | @@ -987,8 +947,6 @@ |
987 | 947 | debug("ide_read dev %d start " LBAF ", blocks " LBAF " buffer at %lX\n", |
988 | 948 | device, blknr, blkcnt, (ulong) buffer); |
989 | 949 | |
990 | - ide_led(DEVICE_LED(device), 1); /* LED on */ | |
991 | - | |
992 | 950 | /* Select device |
993 | 951 | */ |
994 | 952 | ide_outb(device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device)); |
... | ... | @@ -1086,7 +1044,6 @@ |
1086 | 1044 | buffer += ATA_BLOCKSIZE; |
1087 | 1045 | } |
1088 | 1046 | IDE_READ_E: |
1089 | - ide_led(DEVICE_LED(device), 0); /* LED off */ | |
1090 | 1047 | return n; |
1091 | 1048 | } |
1092 | 1049 | |
... | ... | @@ -1114,8 +1071,6 @@ |
1114 | 1071 | } |
1115 | 1072 | #endif |
1116 | 1073 | |
1117 | - ide_led(DEVICE_LED(device), 1); /* LED on */ | |
1118 | - | |
1119 | 1074 | /* Select device |
1120 | 1075 | */ |
1121 | 1076 | ide_outb(device, ATA_DEV_HD, ATA_LBA | ATA_DEVICE(device)); |
... | ... | @@ -1179,7 +1134,6 @@ |
1179 | 1134 | buffer += ATA_BLOCKSIZE; |
1180 | 1135 | } |
1181 | 1136 | WR_OUT: |
1182 | - ide_led(DEVICE_LED(device), 0); /* LED off */ | |
1183 | 1137 | return n; |
1184 | 1138 | } |
1185 | 1139 |
include/configs/dbau1x00.h
... | ... | @@ -159,7 +159,6 @@ |
159 | 159 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ |
160 | 160 | #define CONFIG_SYS_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */ |
161 | 161 | |
162 | -#undef CONFIG_IDE_LED /* LED for ide not supported */ | |
163 | 162 | #undef CONFIG_IDE_RESET /* reset for ide not supported */ |
164 | 163 | |
165 | 164 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
include/configs/lsxl.h
include/configs/pb1x00.h
... | ... | @@ -112,7 +112,6 @@ |
112 | 112 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE bus */ |
113 | 113 | #define CONFIG_SYS_IDE_MAXDEVICE 1 /* max. 1 drive per IDE bus */ |
114 | 114 | |
115 | -#undef CONFIG_IDE_LED /* LED for ide not supported */ | |
116 | 115 | #undef CONFIG_IDE_RESET /* reset for ide not supported */ |
117 | 116 | |
118 | 117 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
include/ide.h
... | ... | @@ -15,19 +15,6 @@ |
15 | 15 | #define ATA_CURR_BASE(dev) (CONFIG_SYS_ATA_BASE_ADDR+ide_bus_offset[IDE_BUS(dev)]) |
16 | 16 | extern ulong ide_bus_offset[]; |
17 | 17 | |
18 | -#ifdef CONFIG_IDE_LED | |
19 | - | |
20 | -/* | |
21 | - * LED Port | |
22 | - */ | |
23 | -#define LED_PORT ((uchar *)(PER8_BASE + 0x3000)) | |
24 | -#define LED_IDE1 0x01 | |
25 | -#define LED_IDE2 0x02 | |
26 | -#define DEVICE_LED(d) ((d & 2) | ((d & 2) == 0)) /* depends on bit positions! */ | |
27 | - | |
28 | -void ide_led(uchar led, uchar status); | |
29 | -#endif /* CONFIG_IDE_LED */ | |
30 | - | |
31 | 18 | /* |
32 | 19 | * Function Prototypes |
33 | 20 | */ |