diff options
Diffstat (limited to 'drivers/ide/pci/siimage.c')
-rw-r--r-- | drivers/ide/pci/siimage.c | 57 |
1 files changed, 9 insertions, 48 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index f1ca154dd52c..20b392948f36 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * if neccessary | 27 | * if neccessary |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/types.h> | 30 | #include <linux/types.h> |
32 | #include <linux/module.h> | 31 | #include <linux/module.h> |
33 | #include <linux/pci.h> | 32 | #include <linux/pci.h> |
@@ -38,9 +37,6 @@ | |||
38 | 37 | ||
39 | #include <asm/io.h> | 38 | #include <asm/io.h> |
40 | 39 | ||
41 | #undef SIIMAGE_VIRTUAL_DMAPIO | ||
42 | #undef SIIMAGE_LARGE_DMA | ||
43 | |||
44 | /** | 40 | /** |
45 | * pdev_is_sata - check if device is SATA | 41 | * pdev_is_sata - check if device is SATA |
46 | * @pdev: PCI device to check | 42 | * @pdev: PCI device to check |
@@ -461,36 +457,6 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive) | |||
461 | return 0; | 457 | return 0; |
462 | } | 458 | } |
463 | 459 | ||
464 | #if 0 | ||
465 | /** | ||
466 | * siimage_mmio_ide_dma_count - DMA bytes done | ||
467 | * @drive | ||
468 | * | ||
469 | * If we are doing VDMA the CMD680 requires a little bit | ||
470 | * of more careful handling and we have to read the counts | ||
471 | * off ourselves. For non VDMA life is normal. | ||
472 | */ | ||
473 | |||
474 | static int siimage_mmio_ide_dma_count (ide_drive_t *drive) | ||
475 | { | ||
476 | #ifdef SIIMAGE_VIRTUAL_DMAPIO | ||
477 | struct request *rq = HWGROUP(drive)->rq; | ||
478 | ide_hwif_t *hwif = HWIF(drive); | ||
479 | u32 count = (rq->nr_sectors * SECTOR_SIZE); | ||
480 | u32 rcount = 0; | ||
481 | unsigned long addr = siimage_selreg(hwif, 0x1C); | ||
482 | |||
483 | hwif->OUTL(count, addr); | ||
484 | rcount = hwif->INL(addr); | ||
485 | |||
486 | printk("\n%s: count = %d, rcount = %d, nr_sectors = %lu\n", | ||
487 | drive->name, count, rcount, rq->nr_sectors); | ||
488 | |||
489 | #endif /* SIIMAGE_VIRTUAL_DMAPIO */ | ||
490 | return __ide_dma_count(drive); | ||
491 | } | ||
492 | #endif | ||
493 | |||
494 | /** | 460 | /** |
495 | * siimage_mmio_ide_dma_test_irq - check we caused an IRQ | 461 | * siimage_mmio_ide_dma_test_irq - check we caused an IRQ |
496 | * @drive: drive we are testing | 462 | * @drive: drive we are testing |
@@ -512,12 +478,10 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) | |||
512 | u32 sata_error = hwif->INL(SATA_ERROR_REG); | 478 | u32 sata_error = hwif->INL(SATA_ERROR_REG); |
513 | hwif->OUTL(sata_error, SATA_ERROR_REG); | 479 | hwif->OUTL(sata_error, SATA_ERROR_REG); |
514 | watchdog = (sata_error & 0x00680000) ? 1 : 0; | 480 | watchdog = (sata_error & 0x00680000) ? 1 : 0; |
515 | #if 1 | ||
516 | printk(KERN_WARNING "%s: sata_error = 0x%08x, " | 481 | printk(KERN_WARNING "%s: sata_error = 0x%08x, " |
517 | "watchdog = %d, %s\n", | 482 | "watchdog = %d, %s\n", |
518 | drive->name, sata_error, watchdog, | 483 | drive->name, sata_error, watchdog, |
519 | __FUNCTION__); | 484 | __FUNCTION__); |
520 | #endif | ||
521 | 485 | ||
522 | } else { | 486 | } else { |
523 | watchdog = (ext_stat & 0x8000) ? 1 : 0; | 487 | watchdog = (ext_stat & 0x8000) ? 1 : 0; |
@@ -863,7 +827,7 @@ static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const ch | |||
863 | * time. | 827 | * time. |
864 | * | 828 | * |
865 | * The hardware supports buffered taskfiles and also some rather nice | 829 | * The hardware supports buffered taskfiles and also some rather nice |
866 | * extended PRD tables. Unfortunately right now we don't. | 830 | * extended PRD tables. For better SI3112 support use the libata driver |
867 | */ | 831 | */ |
868 | 832 | ||
869 | static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | 833 | static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) |
@@ -900,9 +864,6 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
900 | * so we can't currently use it sanely since we want to | 864 | * so we can't currently use it sanely since we want to |
901 | * use LBA48 mode. | 865 | * use LBA48 mode. |
902 | */ | 866 | */ |
903 | // base += 0x10; | ||
904 | // hwif->no_lba48 = 1; | ||
905 | |||
906 | hw.io_ports[IDE_DATA_OFFSET] = base; | 867 | hw.io_ports[IDE_DATA_OFFSET] = base; |
907 | hw.io_ports[IDE_ERROR_OFFSET] = base + 1; | 868 | hw.io_ports[IDE_ERROR_OFFSET] = base + 1; |
908 | hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2; | 869 | hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2; |
@@ -936,15 +897,8 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
936 | 897 | ||
937 | base = (unsigned long) addr; | 898 | base = (unsigned long) addr; |
938 | 899 | ||
939 | #ifdef SIIMAGE_LARGE_DMA | ||
940 | /* Watch the brackets - even Ken and Dennis get some language design wrong */ | ||
941 | hwif->dma_base = base + (ch ? 0x18 : 0x10); | ||
942 | hwif->dma_base2 = base + (ch ? 0x08 : 0x00); | ||
943 | hwif->dma_prdtable = hwif->dma_base2 + 4; | ||
944 | #else /* ! SIIMAGE_LARGE_DMA */ | ||
945 | hwif->dma_base = base + (ch ? 0x08 : 0x00); | 900 | hwif->dma_base = base + (ch ? 0x08 : 0x00); |
946 | hwif->dma_base2 = base + (ch ? 0x18 : 0x10); | 901 | hwif->dma_base2 = base + (ch ? 0x18 : 0x10); |
947 | #endif /* SIIMAGE_LARGE_DMA */ | ||
948 | hwif->mmio = 2; | 902 | hwif->mmio = 2; |
949 | } | 903 | } |
950 | 904 | ||
@@ -1052,9 +1006,16 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) | |||
1052 | hwif->reset_poll = &siimage_reset_poll; | 1006 | hwif->reset_poll = &siimage_reset_poll; |
1053 | hwif->pre_reset = &siimage_pre_reset; | 1007 | hwif->pre_reset = &siimage_pre_reset; |
1054 | 1008 | ||
1055 | if(is_sata(hwif)) | 1009 | if(is_sata(hwif)) { |
1010 | static int first = 1; | ||
1011 | |||
1056 | hwif->busproc = &siimage_busproc; | 1012 | hwif->busproc = &siimage_busproc; |
1057 | 1013 | ||
1014 | if (first) { | ||
1015 | printk(KERN_INFO "siimage: For full SATA support you should use the libata sata_sil module.\n"); | ||
1016 | first = 0; | ||
1017 | } | ||
1018 | } | ||
1058 | if (!hwif->dma_base) { | 1019 | if (!hwif->dma_base) { |
1059 | hwif->drives[0].autotune = 1; | 1020 | hwif->drives[0].autotune = 1; |
1060 | hwif->drives[1].autotune = 1; | 1021 | hwif->drives[1].autotune = 1; |