diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-06-28 07:26:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 17:59:06 -0400 |
commit | 19c1ef5f671b5793622a7a3d03940ef3f20a3ba0 (patch) | |
tree | 0eb446fc43390cb680ed5b2cc428d3b7f7724898 /drivers | |
parent | 1a1276e7b6cba549553285f74e87f702bfff6fac (diff) |
[PATCH] ide: clean up siimage
Remove all the ifdef preparation for enhanced features that never occcurred
and is only in libata. For the SATA chips (but not yet PATA ones) politely
suggest to the user that libata may offer more features.
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Sergei Shtylylov <sshtylyov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/siimage.c | 62 |
1 files changed, 12 insertions, 50 deletions
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index f1ca154dd52c..72dade14c725 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -38,9 +38,6 @@ | |||
38 | 38 | ||
39 | #include <asm/io.h> | 39 | #include <asm/io.h> |
40 | 40 | ||
41 | #undef SIIMAGE_VIRTUAL_DMAPIO | ||
42 | #undef SIIMAGE_LARGE_DMA | ||
43 | |||
44 | /** | 41 | /** |
45 | * pdev_is_sata - check if device is SATA | 42 | * pdev_is_sata - check if device is SATA |
46 | * @pdev: PCI device to check | 43 | * @pdev: PCI device to check |
@@ -461,36 +458,6 @@ static int siimage_io_ide_dma_test_irq (ide_drive_t *drive) | |||
461 | return 0; | 458 | return 0; |
462 | } | 459 | } |
463 | 460 | ||
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 | /** | 461 | /** |
495 | * siimage_mmio_ide_dma_test_irq - check we caused an IRQ | 462 | * siimage_mmio_ide_dma_test_irq - check we caused an IRQ |
496 | * @drive: drive we are testing | 463 | * @drive: drive we are testing |
@@ -512,12 +479,10 @@ static int siimage_mmio_ide_dma_test_irq (ide_drive_t *drive) | |||
512 | u32 sata_error = hwif->INL(SATA_ERROR_REG); | 479 | u32 sata_error = hwif->INL(SATA_ERROR_REG); |
513 | hwif->OUTL(sata_error, SATA_ERROR_REG); | 480 | hwif->OUTL(sata_error, SATA_ERROR_REG); |
514 | watchdog = (sata_error & 0x00680000) ? 1 : 0; | 481 | watchdog = (sata_error & 0x00680000) ? 1 : 0; |
515 | #if 1 | ||
516 | printk(KERN_WARNING "%s: sata_error = 0x%08x, " | 482 | printk(KERN_WARNING "%s: sata_error = 0x%08x, " |
517 | "watchdog = %d, %s\n", | 483 | "watchdog = %d, %s\n", |
518 | drive->name, sata_error, watchdog, | 484 | drive->name, sata_error, watchdog, |
519 | __FUNCTION__); | 485 | __FUNCTION__); |
520 | #endif | ||
521 | 486 | ||
522 | } else { | 487 | } else { |
523 | watchdog = (ext_stat & 0x8000) ? 1 : 0; | 488 | watchdog = (ext_stat & 0x8000) ? 1 : 0; |
@@ -863,7 +828,7 @@ static unsigned int __devinit init_chipset_siimage(struct pci_dev *dev, const ch | |||
863 | * time. | 828 | * time. |
864 | * | 829 | * |
865 | * The hardware supports buffered taskfiles and also some rather nice | 830 | * The hardware supports buffered taskfiles and also some rather nice |
866 | * extended PRD tables. Unfortunately right now we don't. | 831 | * extended PRD tables. For better SI3112 support use the libata driver |
867 | */ | 832 | */ |
868 | 833 | ||
869 | static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | 834 | static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) |
@@ -900,9 +865,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 | 865 | * so we can't currently use it sanely since we want to |
901 | * use LBA48 mode. | 866 | * use LBA48 mode. |
902 | */ | 867 | */ |
903 | // base += 0x10; | ||
904 | // hwif->no_lba48 = 1; | ||
905 | |||
906 | hw.io_ports[IDE_DATA_OFFSET] = base; | 868 | hw.io_ports[IDE_DATA_OFFSET] = base; |
907 | hw.io_ports[IDE_ERROR_OFFSET] = base + 1; | 869 | hw.io_ports[IDE_ERROR_OFFSET] = base + 1; |
908 | hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2; | 870 | hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2; |
@@ -936,15 +898,8 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) | |||
936 | 898 | ||
937 | base = (unsigned long) addr; | 899 | base = (unsigned long) addr; |
938 | 900 | ||
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); | 901 | hwif->dma_base = base + (ch ? 0x08 : 0x00); |
946 | hwif->dma_base2 = base + (ch ? 0x18 : 0x10); | 902 | hwif->dma_base2 = base + (ch ? 0x18 : 0x10); |
947 | #endif /* SIIMAGE_LARGE_DMA */ | ||
948 | hwif->mmio = 2; | 903 | hwif->mmio = 2; |
949 | } | 904 | } |
950 | 905 | ||
@@ -1052,9 +1007,16 @@ static void __devinit init_hwif_siimage(ide_hwif_t *hwif) | |||
1052 | hwif->reset_poll = &siimage_reset_poll; | 1007 | hwif->reset_poll = &siimage_reset_poll; |
1053 | hwif->pre_reset = &siimage_pre_reset; | 1008 | hwif->pre_reset = &siimage_pre_reset; |
1054 | 1009 | ||
1055 | if(is_sata(hwif)) | 1010 | if(is_sata(hwif)) { |
1011 | static int first = 1; | ||
1012 | |||
1056 | hwif->busproc = &siimage_busproc; | 1013 | hwif->busproc = &siimage_busproc; |
1057 | 1014 | ||
1015 | if (first) { | ||
1016 | printk(KERN_INFO "siimage: For full SATA support you should use the libata sata_sil module.\n"); | ||
1017 | first = 0; | ||
1018 | } | ||
1019 | } | ||
1058 | if (!hwif->dma_base) { | 1020 | if (!hwif->dma_base) { |
1059 | hwif->drives[0].autotune = 1; | 1021 | hwif->drives[0].autotune = 1; |
1060 | hwif->drives[1].autotune = 1; | 1022 | hwif->drives[1].autotune = 1; |
@@ -1121,10 +1083,10 @@ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_devi | |||
1121 | } | 1083 | } |
1122 | 1084 | ||
1123 | static struct pci_device_id siimage_pci_tbl[] = { | 1085 | static struct pci_device_id siimage_pci_tbl[] = { |
1124 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 1086 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680), 0}, |
1125 | #ifdef CONFIG_BLK_DEV_IDE_SATA | 1087 | #ifdef CONFIG_BLK_DEV_IDE_SATA |
1126 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 1088 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_3112), 1}, |
1127 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, | 1089 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_1210SA), 2}, |
1128 | #endif | 1090 | #endif |
1129 | { 0, }, | 1091 | { 0, }, |
1130 | }; | 1092 | }; |