aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/pdc202xx_old.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r--drivers/ide/pci/pdc202xx_old.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 7ce5bf783688..22d17548ecdb 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -370,7 +370,6 @@ chipset_is_set:
370 if (!(speed)) { 370 if (!(speed)) {
371 /* restore original pci-config space */ 371 /* restore original pci-config space */
372 pci_write_config_dword(dev, drive_pci, drive_conf); 372 pci_write_config_dword(dev, drive_pci, drive_conf);
373 hwif->tuneproc(drive, 5);
374 return 0; 373 return 0;
375 } 374 }
376 375
@@ -415,8 +414,6 @@ static void pdc202xx_old_ide_dma_start(ide_drive_t *drive)
415 if (drive->addressing == 1) { 414 if (drive->addressing == 1) {
416 struct request *rq = HWGROUP(drive)->rq; 415 struct request *rq = HWGROUP(drive)->rq;
417 ide_hwif_t *hwif = HWIF(drive); 416 ide_hwif_t *hwif = HWIF(drive);
418// struct pci_dev *dev = hwif->pci_dev;
419// unsgned long high_16 = pci_resource_start(dev, 4);
420 unsigned long high_16 = hwif->dma_master; 417 unsigned long high_16 = hwif->dma_master;
421 unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); 418 unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20);
422 u32 word_count = 0; 419 u32 word_count = 0;
@@ -436,7 +433,6 @@ static int pdc202xx_old_ide_dma_end(ide_drive_t *drive)
436{ 433{
437 if (drive->addressing == 1) { 434 if (drive->addressing == 1) {
438 ide_hwif_t *hwif = HWIF(drive); 435 ide_hwif_t *hwif = HWIF(drive);
439// unsigned long high_16 = pci_resource_start(hwif->pci_dev, 4);
440 unsigned long high_16 = hwif->dma_master; 436 unsigned long high_16 = hwif->dma_master;
441 unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20); 437 unsigned long atapi_reg = high_16 + (hwif->channel ? 0x24 : 0x20);
442 u8 clock = 0; 438 u8 clock = 0;
@@ -453,8 +449,6 @@ static int pdc202xx_old_ide_dma_end(ide_drive_t *drive)
453static int pdc202xx_old_ide_dma_test_irq(ide_drive_t *drive) 449static int pdc202xx_old_ide_dma_test_irq(ide_drive_t *drive)
454{ 450{
455 ide_hwif_t *hwif = HWIF(drive); 451 ide_hwif_t *hwif = HWIF(drive);
456// struct pci_dev *dev = hwif->pci_dev;
457// unsigned long high_16 = pci_resource_start(dev, 4);
458 unsigned long high_16 = hwif->dma_master; 452 unsigned long high_16 = hwif->dma_master;
459 u8 dma_stat = hwif->INB(hwif->dma_status); 453 u8 dma_stat = hwif->INB(hwif->dma_status);
460 u8 sc1d = hwif->INB((high_16 + 0x001d)); 454 u8 sc1d = hwif->INB((high_16 + 0x001d));
@@ -492,12 +486,7 @@ static int pdc202xx_ide_dma_timeout(ide_drive_t *drive)
492 486
493static void pdc202xx_reset_host (ide_hwif_t *hwif) 487static void pdc202xx_reset_host (ide_hwif_t *hwif)
494{ 488{
495#ifdef CONFIG_BLK_DEV_IDEDMA
496// unsigned long high_16 = hwif->dma_base - (8*(hwif->channel));
497 unsigned long high_16 = hwif->dma_master; 489 unsigned long high_16 = hwif->dma_master;
498#else /* !CONFIG_BLK_DEV_IDEDMA */
499 unsigned long high_16 = pci_resource_start(hwif->pci_dev, 4);
500#endif /* CONFIG_BLK_DEV_IDEDMA */
501 u8 udma_speed_flag = hwif->INB(high_16|0x001f); 490 u8 udma_speed_flag = hwif->INB(high_16|0x001f);
502 491
503 hwif->OUTB((udma_speed_flag | 0x10), (high_16|0x001f)); 492 hwif->OUTB((udma_speed_flag | 0x10), (high_16|0x001f));
@@ -550,31 +539,6 @@ static void pdc202xx_reset (ide_drive_t *drive)
550#endif 539#endif
551} 540}
552 541
553/*
554 * Since SUN Cobalt is attempting to do this operation, I should disclose
555 * this has been a long time ago Thu Jul 27 16:40:57 2000 was the patch date
556 * HOTSWAP ATA Infrastructure.
557 */
558static int pdc202xx_tristate (ide_drive_t * drive, int state)
559{
560 ide_hwif_t *hwif = HWIF(drive);
561// unsigned long high_16 = hwif->dma_base - (8*(hwif->channel));
562 unsigned long high_16 = hwif->dma_master;
563 u8 sc1f = hwif->INB(high_16|0x001f);
564
565 if (!hwif)
566 return -EINVAL;
567
568// hwif->bus_state = state;
569
570 if (state) {
571 hwif->OUTB(sc1f | 0x08, (high_16|0x001f));
572 } else {
573 hwif->OUTB(sc1f & ~0x08, (high_16|0x001f));
574 }
575 return 0;
576}
577
578static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, const char *name) 542static unsigned int __devinit init_chipset_pdc202xx(struct pci_dev *dev, const char *name)
579{ 543{
580 if (dev->resource[PCI_ROM_RESOURCE].start) { 544 if (dev->resource[PCI_ROM_RESOURCE].start) {
@@ -624,10 +588,8 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif)
624 hwif->tuneproc = &config_chipset_for_pio; 588 hwif->tuneproc = &config_chipset_for_pio;
625 hwif->quirkproc = &pdc202xx_quirkproc; 589 hwif->quirkproc = &pdc202xx_quirkproc;
626 590
627 if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246) { 591 if (hwif->pci_dev->device != PCI_DEVICE_ID_PROMISE_20246)
628 hwif->busproc = &pdc202xx_tristate;
629 hwif->resetproc = &pdc202xx_reset; 592 hwif->resetproc = &pdc202xx_reset;
630 }
631 593
632 hwif->speedproc = &pdc202xx_tune_chipset; 594 hwif->speedproc = &pdc202xx_tune_chipset;
633 595