aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/generic.c')
-rw-r--r--drivers/ide/pci/generic.c57
1 files changed, 35 insertions, 22 deletions
diff --git a/drivers/ide/pci/generic.c b/drivers/ide/pci/generic.c
index 48caa468b762..cce6311b02df 100644
--- a/drivers/ide/pci/generic.c
+++ b/drivers/ide/pci/generic.c
@@ -73,11 +73,6 @@ static void __devinit init_hwif_generic (ide_hwif_t *hwif)
73 hwif->ultra_mask = 0x7f; 73 hwif->ultra_mask = 0x7f;
74 hwif->mwdma_mask = 0x07; 74 hwif->mwdma_mask = 0x07;
75 hwif->swdma_mask = 0x07; 75 hwif->swdma_mask = 0x07;
76
77 if (!noautodma)
78 hwif->autodma = 1;
79 hwif->drives[0].autodma = hwif->autodma;
80 hwif->drives[1].autodma = hwif->autodma;
81} 76}
82 77
83#if 0 78#if 0
@@ -97,77 +92,92 @@ static ide_pci_device_t generic_chipsets[] __devinitdata = {
97 .init_hwif = init_hwif_generic, 92 .init_hwif = init_hwif_generic,
98 .autodma = AUTODMA, 93 .autodma = AUTODMA,
99 .bootable = ON_BOARD, 94 .bootable = ON_BOARD,
95 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
100 },{ /* 1 */ 96 },{ /* 1 */
101 .name = "NS87410", 97 .name = "NS87410",
102 .init_hwif = init_hwif_generic, 98 .init_hwif = init_hwif_generic,
103 .autodma = AUTODMA, 99 .autodma = AUTODMA,
104 .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}}, 100 .enablebits = {{0x43,0x08,0x08}, {0x47,0x08,0x08}},
105 .bootable = ON_BOARD, 101 .bootable = ON_BOARD,
102 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
106 },{ /* 2 */ 103 },{ /* 2 */
107 .name = "SAMURAI", 104 .name = "SAMURAI",
108 .init_hwif = init_hwif_generic, 105 .init_hwif = init_hwif_generic,
109 .autodma = AUTODMA, 106 .autodma = AUTODMA,
110 .bootable = ON_BOARD, 107 .bootable = ON_BOARD,
108 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
111 },{ /* 3 */ 109 },{ /* 3 */
112 .name = "HT6565", 110 .name = "HT6565",
113 .init_hwif = init_hwif_generic, 111 .init_hwif = init_hwif_generic,
114 .autodma = AUTODMA, 112 .autodma = AUTODMA,
115 .bootable = ON_BOARD, 113 .bootable = ON_BOARD,
114 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
116 },{ /* 4 */ 115 },{ /* 4 */
117 .name = "UM8673F", 116 .name = "UM8673F",
118 .init_hwif = init_hwif_generic, 117 .init_hwif = init_hwif_generic,
119 .autodma = NODMA, 118 .autodma = NODMA,
120 .bootable = ON_BOARD, 119 .bootable = ON_BOARD,
120 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
121 },{ /* 5 */ 121 },{ /* 5 */
122 .name = "UM8886A", 122 .name = "UM8886A",
123 .init_hwif = init_hwif_generic, 123 .init_hwif = init_hwif_generic,
124 .autodma = NODMA, 124 .autodma = NODMA,
125 .bootable = ON_BOARD, 125 .bootable = ON_BOARD,
126 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
126 },{ /* 6 */ 127 },{ /* 6 */
127 .name = "UM8886BF", 128 .name = "UM8886BF",
128 .init_hwif = init_hwif_generic, 129 .init_hwif = init_hwif_generic,
129 .autodma = NODMA, 130 .autodma = NODMA,
130 .bootable = ON_BOARD, 131 .bootable = ON_BOARD,
132 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
131 },{ /* 7 */ 133 },{ /* 7 */
132 .name = "HINT_IDE", 134 .name = "HINT_IDE",
133 .init_hwif = init_hwif_generic, 135 .init_hwif = init_hwif_generic,
134 .autodma = AUTODMA, 136 .autodma = AUTODMA,
135 .bootable = ON_BOARD, 137 .bootable = ON_BOARD,
138 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
136 },{ /* 8 */ 139 },{ /* 8 */
137 .name = "VIA_IDE", 140 .name = "VIA_IDE",
138 .init_hwif = init_hwif_generic, 141 .init_hwif = init_hwif_generic,
139 .autodma = NOAUTODMA, 142 .autodma = NOAUTODMA,
140 .bootable = ON_BOARD, 143 .bootable = ON_BOARD,
144 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
141 },{ /* 9 */ 145 },{ /* 9 */
142 .name = "OPTI621V", 146 .name = "OPTI621V",
143 .init_hwif = init_hwif_generic, 147 .init_hwif = init_hwif_generic,
144 .autodma = NOAUTODMA, 148 .autodma = NOAUTODMA,
145 .bootable = ON_BOARD, 149 .bootable = ON_BOARD,
150 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
146 },{ /* 10 */ 151 },{ /* 10 */
147 .name = "VIA8237SATA", 152 .name = "VIA8237SATA",
148 .init_hwif = init_hwif_generic, 153 .init_hwif = init_hwif_generic,
149 .autodma = AUTODMA, 154 .autodma = AUTODMA,
150 .bootable = OFF_BOARD, 155 .bootable = OFF_BOARD,
156 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
151 },{ /* 11 */ 157 },{ /* 11 */
152 .name = "Piccolo0102", 158 .name = "Piccolo0102",
153 .init_hwif = init_hwif_generic, 159 .init_hwif = init_hwif_generic,
154 .autodma = NOAUTODMA, 160 .autodma = NOAUTODMA,
155 .bootable = ON_BOARD, 161 .bootable = ON_BOARD,
162 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
156 },{ /* 12 */ 163 },{ /* 12 */
157 .name = "Piccolo0103", 164 .name = "Piccolo0103",
158 .init_hwif = init_hwif_generic, 165 .init_hwif = init_hwif_generic,
159 .autodma = NOAUTODMA, 166 .autodma = NOAUTODMA,
160 .bootable = ON_BOARD, 167 .bootable = ON_BOARD,
168 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
161 },{ /* 13 */ 169 },{ /* 13 */
162 .name = "Piccolo0105", 170 .name = "Piccolo0105",
163 .init_hwif = init_hwif_generic, 171 .init_hwif = init_hwif_generic,
164 .autodma = NOAUTODMA, 172 .autodma = NOAUTODMA,
165 .bootable = ON_BOARD, 173 .bootable = ON_BOARD,
174 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
166 },{ /* 14 */ 175 },{ /* 14 */
167 .name = "Revolution", 176 .name = "Revolution",
168 .init_hwif = init_hwif_generic, 177 .init_hwif = init_hwif_generic,
169 .autodma = AUTODMA, 178 .autodma = AUTODMA,
170 .bootable = OFF_BOARD, 179 .bootable = OFF_BOARD,
180 .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA,
171 } 181 }
172}; 182};
173 183
@@ -226,25 +236,28 @@ out:
226 return ret; 236 return ret;
227} 237}
228 238
229static struct pci_device_id generic_pci_tbl[] = { 239static const struct pci_device_id generic_pci_tbl[] = {
230 { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, 240 { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_87410), 1 },
231 { PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, 241 { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_SAMURAI_IDE), 2 },
232 { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_6565, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3}, 242 { PCI_VDEVICE(HOLTEK, PCI_DEVICE_ID_HOLTEK_6565), 3 },
233 { PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8673F, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, 243 { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8673F), 4 },
234 { PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886A, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, 244 { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886A), 5 },
235 { PCI_VENDOR_ID_UMC, PCI_DEVICE_ID_UMC_UM8886BF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6}, 245 { PCI_VDEVICE(UMC, PCI_DEVICE_ID_UMC_UM8886BF), 6 },
236 { PCI_VENDOR_ID_HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7}, 246 { PCI_VDEVICE(HINT, PCI_DEVICE_ID_HINT_VXPROII_IDE), 7 },
237 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C561, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8}, 247 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C561), 8 },
238 { PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C558, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9}, 248 { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C558), 9 },
239#ifdef CONFIG_BLK_DEV_IDE_SATA 249#ifdef CONFIG_BLK_DEV_IDE_SATA
240 { PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237_SATA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10}, 250 { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_8237_SATA), 10 },
241#endif 251#endif
242 { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11}, 252 { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO), 11 },
243 { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12}, 253 { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_1), 12 },
244 { PCI_VENDOR_ID_TOSHIBA,PCI_DEVICE_ID_TOSHIBA_PICCOLO_2, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13}, 254 { PCI_VDEVICE(TOSHIBA, PCI_DEVICE_ID_TOSHIBA_PICCOLO_2), 13 },
245 { PCI_VENDOR_ID_NETCELL,PCI_DEVICE_ID_REVOLUTION, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14}, 255 { PCI_VDEVICE(NETCELL, PCI_DEVICE_ID_REVOLUTION), 14 },
246 /* Must come last. If you add entries adjust this table appropriately and the init_one code */ 256 /*
247 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0}, 257 * Must come last. If you add entries adjust
258 * this table and generic_chipsets[] appropriately.
259 */
260 { PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_IDE << 8, 0xFFFFFF00UL, 0 },
248 { 0, }, 261 { 0, },
249}; 262};
250MODULE_DEVICE_TABLE(pci, generic_pci_tbl); 263MODULE_DEVICE_TABLE(pci, generic_pci_tbl);