diff options
Diffstat (limited to 'drivers/ide/pci/aec62xx.c')
-rw-r--r-- | drivers/ide/pci/aec62xx.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index 73bdf64dbbfc..abe0b1bb55ff 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -261,11 +261,13 @@ static unsigned int __devinit init_chipset_aec62xx(struct pci_dev *dev, const ch | |||
261 | 261 | ||
262 | static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | 262 | static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) |
263 | { | 263 | { |
264 | struct pci_dev *dev = hwif->pci_dev; | ||
265 | |||
264 | hwif->autodma = 0; | 266 | hwif->autodma = 0; |
265 | hwif->tuneproc = &aec62xx_tune_drive; | 267 | hwif->tuneproc = &aec62xx_tune_drive; |
266 | hwif->speedproc = &aec62xx_tune_chipset; | 268 | hwif->speedproc = &aec62xx_tune_chipset; |
267 | 269 | ||
268 | if (hwif->pci_dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) | 270 | if (dev->device == PCI_DEVICE_ID_ARTOP_ATP850UF) |
269 | hwif->serialized = hwif->channel; | 271 | hwif->serialized = hwif->channel; |
270 | 272 | ||
271 | if (hwif->mate) | 273 | if (hwif->mate) |
@@ -277,7 +279,15 @@ static void __devinit init_hwif_aec62xx(ide_hwif_t *hwif) | |||
277 | return; | 279 | return; |
278 | } | 280 | } |
279 | 281 | ||
280 | hwif->ultra_mask = 0x7f; | 282 | hwif->ultra_mask = hwif->cds->udma_mask; |
283 | |||
284 | /* atp865 and atp865r */ | ||
285 | if (hwif->ultra_mask == 0x3f) { | ||
286 | /* check bit 0x10 of DMA status register */ | ||
287 | if (inb(pci_resource_start(dev, 4) + 2) & 0x10) | ||
288 | hwif->ultra_mask = 0x7f; /* udma0-6 */ | ||
289 | } | ||
290 | |||
281 | hwif->mwdma_mask = 0x07; | 291 | hwif->mwdma_mask = 0x07; |
282 | 292 | ||
283 | hwif->ide_dma_check = &aec62xx_config_drive_xfer_rate; | 293 | hwif->ide_dma_check = &aec62xx_config_drive_xfer_rate; |
@@ -344,6 +354,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { | |||
344 | .autodma = AUTODMA, | 354 | .autodma = AUTODMA, |
345 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, | 355 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, |
346 | .bootable = OFF_BOARD, | 356 | .bootable = OFF_BOARD, |
357 | .udma_mask = 0x07, /* udma0-2 */ | ||
347 | },{ /* 1 */ | 358 | },{ /* 1 */ |
348 | .name = "AEC6260", | 359 | .name = "AEC6260", |
349 | .init_setup = init_setup_aec62xx, | 360 | .init_setup = init_setup_aec62xx, |
@@ -353,6 +364,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { | |||
353 | .channels = 2, | 364 | .channels = 2, |
354 | .autodma = NOAUTODMA, | 365 | .autodma = NOAUTODMA, |
355 | .bootable = OFF_BOARD, | 366 | .bootable = OFF_BOARD, |
367 | .udma_mask = 0x1f, /* udma0-4 */ | ||
356 | },{ /* 2 */ | 368 | },{ /* 2 */ |
357 | .name = "AEC6260R", | 369 | .name = "AEC6260R", |
358 | .init_setup = init_setup_aec62xx, | 370 | .init_setup = init_setup_aec62xx, |
@@ -363,6 +375,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { | |||
363 | .autodma = AUTODMA, | 375 | .autodma = AUTODMA, |
364 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, | 376 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, |
365 | .bootable = NEVER_BOARD, | 377 | .bootable = NEVER_BOARD, |
378 | .udma_mask = 0x1f, /* udma0-4 */ | ||
366 | },{ /* 3 */ | 379 | },{ /* 3 */ |
367 | .name = "AEC6X80", | 380 | .name = "AEC6X80", |
368 | .init_setup = init_setup_aec6x80, | 381 | .init_setup = init_setup_aec6x80, |
@@ -372,6 +385,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { | |||
372 | .channels = 2, | 385 | .channels = 2, |
373 | .autodma = AUTODMA, | 386 | .autodma = AUTODMA, |
374 | .bootable = OFF_BOARD, | 387 | .bootable = OFF_BOARD, |
388 | .udma_mask = 0x3f, /* udma0-5 */ | ||
375 | },{ /* 4 */ | 389 | },{ /* 4 */ |
376 | .name = "AEC6X80R", | 390 | .name = "AEC6X80R", |
377 | .init_setup = init_setup_aec6x80, | 391 | .init_setup = init_setup_aec6x80, |
@@ -382,6 +396,7 @@ static ide_pci_device_t aec62xx_chipsets[] __devinitdata = { | |||
382 | .autodma = AUTODMA, | 396 | .autodma = AUTODMA, |
383 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, | 397 | .enablebits = {{0x4a,0x02,0x02}, {0x4a,0x04,0x04}}, |
384 | .bootable = OFF_BOARD, | 398 | .bootable = OFF_BOARD, |
399 | .udma_mask = 0x3f, /* udma0-5 */ | ||
385 | } | 400 | } |
386 | }; | 401 | }; |
387 | 402 | ||