diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:06 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-18 18:30:06 -0400 |
commit | 1c3dd326ad790934fd88ec086e75a9d61ddaef8a (patch) | |
tree | 2d8304a4b2cc244ae24d3c24c0c25a5025c8f2f1 /drivers/ide | |
parent | af4c90f4c2338247d0ae94d4d77cb20cb5b593c7 (diff) |
ide: add DECLARE_GENERIC_PCI_DEV() macro to generic IDE PCI host driver
* Add DECLARE_GENERIC_PCI_DEV() macro to generic IDE PCI host driver
and use it to cleanup generic_chipsets[].
* Remove dead/obsolete code while at it.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/pci/generic.c | 113 |
1 files changed, 29 insertions, 84 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c index cce6311b02df..d543abc26c71 100644 --- a/drivers/ide/pci/generic.c +++ b/drivers/ide/pci/generic.c | |||
@@ -75,104 +75,49 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif) | |||
75 | hwif->swdma_mask = 0x07; | 75 | hwif->swdma_mask = 0x07; |
76 | } | 76 | } |
77 | 77 | ||
78 | #if 0 | 78 | #define DECLARE_GENERIC_PCI_DEV(name_str, dma_setting) \ |
79 | /* Logic to add back later on */ | 79 | { \ |
80 | 80 | .name = name_str, \ | |
81 | if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE) { | 81 | .init_hwif = init_hwif_generic, \ |
82 | ide_pci_device_t *unknown = unknown_chipset; | 82 | .autodma = dma_setting, \ |
83 | init_setup_unknown(dev, unknown); | 83 | .bootable = ON_BOARD, \ |
84 | return 1; | 84 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, \ |
85 | } | 85 | } |
86 | return 0; | ||
87 | #endif | ||
88 | 86 | ||
89 | static ide_pci_device_t generic_chipsets[] __devinitdata = { | 87 | static ide_pci_device_t generic_chipsets[] __devinitdata = { |
90 | { /* 0 */ | 88 | /* 0 */ DECLARE_GENERIC_PCI_DEV("Unknown", AUTODMA), |
91 | .name = "Unknown", | 89 | |
92 | .init_hwif = init_hwif_generic, | 90 | { /* 1 */ |
93 | .autodma = AUTODMA, | ||
94 | .bootable = ON_BOARD, | ||
95 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
96 | },{ /* 1 */ | ||
97 | .name = "NS87410", | 91 | .name = "NS87410", |
98 | .init_hwif = init_hwif_generic, | 92 | .init_hwif = init_hwif_generic, |
99 | .autodma = AUTODMA, | 93 | .autodma = AUTODMA, |
100 | .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, | 94 | .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, |
101 | .bootable = ON_BOARD, | 95 | .bootable = ON_BOARD, |
102 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 96 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, |
103 | },{ /* 2 */ | 97 | }, |
104 | .name = "SAMURAI", | 98 | |
105 | .init_hwif = init_hwif_generic, | 99 | /* 2 */ DECLARE_GENERIC_PCI_DEV("SAMURAI", AUTODMA), |
106 | .autodma = AUTODMA, | 100 | /* 3 */ DECLARE_GENERIC_PCI_DEV("HT6565", AUTODMA), |
107 | .bootable = ON_BOARD, | 101 | /* 4 */ DECLARE_GENERIC_PCI_DEV("UM8673F", NODMA), |
108 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 102 | /* 5 */ DECLARE_GENERIC_PCI_DEV("UM8886A", NODMA), |
109 | },{ /* 3 */ | 103 | /* 6 */ DECLARE_GENERIC_PCI_DEV("UM8886BF", NODMA), |
110 | .name = "HT6565", | 104 | /* 7 */ DECLARE_GENERIC_PCI_DEV("HINT_IDE", AUTODMA), |
111 | .init_hwif = init_hwif_generic, | 105 | /* 8 */ DECLARE_GENERIC_PCI_DEV("VIA_IDE", NOAUTODMA), |
112 | .autodma = AUTODMA, | 106 | /* 9 */ DECLARE_GENERIC_PCI_DEV("OPTI621V", NOAUTODMA), |
113 | .bootable = ON_BOARD, | 107 | |
114 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 108 | { /* 10 */ |
115 | },{ /* 4 */ | ||
116 | .name = "UM8673F", | ||
117 | .init_hwif = init_hwif_generic, | ||
118 | .autodma = NODMA, | ||
119 | .bootable = ON_BOARD, | ||
120 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
121 | },{ /* 5 */ | ||
122 | .name = "UM8886A", | ||
123 | .init_hwif = init_hwif_generic, | ||
124 | .autodma = NODMA, | ||
125 | .bootable = ON_BOARD, | ||
126 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
127 | },{ /* 6 */ | ||
128 | .name = "UM8886BF", | ||
129 | .init_hwif = init_hwif_generic, | ||
130 | .autodma = NODMA, | ||
131 | .bootable = ON_BOARD, | ||
132 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
133 | },{ /* 7 */ | ||
134 | .name = "HINT_IDE", | ||
135 | .init_hwif = init_hwif_generic, | ||
136 | .autodma = AUTODMA, | ||
137 | .bootable = ON_BOARD, | ||
138 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
139 | },{ /* 8 */ | ||
140 | .name = "VIA_IDE", | ||
141 | .init_hwif = init_hwif_generic, | ||
142 | .autodma = NOAUTODMA, | ||
143 | .bootable = ON_BOARD, | ||
144 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
145 | },{ /* 9 */ | ||
146 | .name = "OPTI621V", | ||
147 | .init_hwif = init_hwif_generic, | ||
148 | .autodma = NOAUTODMA, | ||
149 | .bootable = ON_BOARD, | ||
150 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
151 | },{ /* 10 */ | ||
152 | .name = "VIA8237SATA", | 109 | .name = "VIA8237SATA", |
153 | .init_hwif = init_hwif_generic, | 110 | .init_hwif = init_hwif_generic, |
154 | .autodma = AUTODMA, | 111 | .autodma = AUTODMA, |
155 | .bootable = OFF_BOARD, | 112 | .bootable = OFF_BOARD, |
156 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 113 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, |
157 | },{ /* 11 */ | 114 | }, |
158 | .name = "Piccolo0102", | 115 | |
159 | .init_hwif = init_hwif_generic, | 116 | /* 11 */ DECLARE_GENERIC_PCI_DEV("Piccolo0102", NOAUTODMA), |
160 | .autodma = NOAUTODMA, | 117 | /* 12 */ DECLARE_GENERIC_PCI_DEV("Piccolo0103", NOAUTODMA), |
161 | .bootable = ON_BOARD, | 118 | /* 13 */ DECLARE_GENERIC_PCI_DEV("Piccolo0105", NOAUTODMA), |
162 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | 119 | |
163 | },{ /* 12 */ | 120 | { /* 14 */ |
164 | .name = "Piccolo0103", | ||
165 | .init_hwif = init_hwif_generic, | ||
166 | .autodma = NOAUTODMA, | ||
167 | .bootable = ON_BOARD, | ||
168 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
169 | },{ /* 13 */ | ||
170 | .name = "Piccolo0105", | ||
171 | .init_hwif = init_hwif_generic, | ||
172 | .autodma = NOAUTODMA, | ||
173 | .bootable = ON_BOARD, | ||
174 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA, | ||
175 | },{ /* 14 */ | ||
176 | .name = "Revolution", | 121 | .name = "Revolution", |
177 | .init_hwif = init_hwif_generic, | 122 | .init_hwif = init_hwif_generic, |
178 | .autodma = AUTODMA, | 123 | .autodma = AUTODMA, |