diff options
Diffstat (limited to 'drivers/ide/pci/pdc202xx_old.c')
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 31a1308414a..da432979038 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c @@ -32,18 +32,13 @@ #include <linux/module.h> #include <linux/kernel.h> #include <linux/delay.h> -#include <linux/timer.h> -#include <linux/mm.h> -#include <linux/ioport.h> #include <linux/blkdev.h> #include <linux/hdreg.h> -#include <linux/interrupt.h> #include <linux/pci.h> #include <linux/init.h> #include <linux/ide.h> #include <asm/io.h> -#include <asm/irq.h> #define PDC202XX_DEBUG_DRIVE_INFO 0 @@ -140,10 +135,10 @@ static void pdc202xx_set_pio_mode(ide_drive_t *drive, const u8 pio) pdc202xx_set_mode(drive, XFER_PIO_0 + pio); } -static u8 pdc202xx_old_cable_detect (ide_hwif_t *hwif) +static u8 __devinit pdc2026x_old_cable_detect(ide_hwif_t *hwif) { struct pci_dev *dev = to_pci_dev(hwif->dev); - u16 CIS = 0, mask = (hwif->channel) ? (1<<11) : (1<<10); + u16 CIS, mask = hwif->channel ? (1 << 11) : (1 << 10); pci_read_config_word(dev, 0x50, &CIS); @@ -311,9 +306,12 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) hwif->quirkproc = &pdc202xx_quirkproc; - if (dev->device != PCI_DEVICE_ID_PROMISE_20246) + if (dev->device != PCI_DEVICE_ID_PROMISE_20246) { hwif->resetproc = &pdc202xx_reset; + hwif->cable_detect = pdc2026x_old_cable_detect; + } + if (hwif->dma_base == 0) return; @@ -321,9 +319,6 @@ static void __devinit init_hwif_pdc202xx(ide_hwif_t *hwif) hwif->dma_timeout = &pdc202xx_dma_timeout; if (dev->device != PCI_DEVICE_ID_PROMISE_20246) { - if (hwif->cbl != ATA_CBL_PATA40_SHORT) - hwif->cbl = pdc202xx_old_cable_detect(hwif); - hwif->dma_start = &pdc202xx_old_ide_dma_start; hwif->ide_dma_end = &pdc202xx_old_ide_dma_end; } |