Commit 31814f4e authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] clean up siiimage ide for new ifdef style

parent 4fcc74e3
...@@ -205,7 +205,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed) ...@@ -205,7 +205,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
siimage_tuneproc(drive, (speed - XFER_PIO_0)); siimage_tuneproc(drive, (speed - XFER_PIO_0));
mode |= ((unit) ? 0x10 : 0x01); mode |= ((unit) ? 0x10 : 0x01);
break; break;
#ifdef CONFIG_BLK_DEV_IDEDMA
case XFER_MW_DMA_2: case XFER_MW_DMA_2:
case XFER_MW_DMA_1: case XFER_MW_DMA_1:
case XFER_MW_DMA_0: case XFER_MW_DMA_0:
...@@ -226,7 +225,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed) ...@@ -226,7 +225,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
mode |= ((unit) ? 0x30 : 0x03); mode |= ((unit) ? 0x30 : 0x03);
config_siimage_chipset_for_pio(drive, 0); config_siimage_chipset_for_pio(drive, 0);
break; break;
#endif /* CONFIG_BLK_DEV_IDEDMA */
default: default:
return 1; return 1;
} }
...@@ -246,7 +244,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed) ...@@ -246,7 +244,6 @@ static int siimage_tune_chipset (ide_drive_t *drive, byte xferspeed)
return (ide_config_drive_speed(drive, speed)); return (ide_config_drive_speed(drive, speed));
} }
#ifdef CONFIG_BLK_DEV_IDEDMA
static int config_chipset_for_dma (ide_drive_t *drive) static int config_chipset_for_dma (ide_drive_t *drive)
{ {
u8 speed = ide_dma_speed(drive, siimage_ratemask(drive)); u8 speed = ide_dma_speed(drive, siimage_ratemask(drive));
...@@ -256,7 +253,7 @@ static int config_chipset_for_dma (ide_drive_t *drive) ...@@ -256,7 +253,7 @@ static int config_chipset_for_dma (ide_drive_t *drive)
if ((!(speed))) if ((!(speed)))
return 0; return 0;
if (HWIF(drive)->speedproc(drive, speed)) if (ide_set_xfer_rate(drive, speed))
return 0; return 0;
if (!drive->init_speed) if (!drive->init_speed)
...@@ -392,7 +389,6 @@ static int siimage_mmio_ide_dma_verbose (ide_drive_t *drive) ...@@ -392,7 +389,6 @@ static int siimage_mmio_ide_dma_verbose (ide_drive_t *drive)
#endif #endif
return temp; return temp;
} }
#endif /* CONFIG_BLK_DEV_IDEDMA */
static int siimage_busproc (ide_drive_t * drive, int state) static int siimage_busproc (ide_drive_t * drive, int state)
{ {
...@@ -811,7 +807,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif) ...@@ -811,7 +807,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
if (hwif->pci_dev->device != PCI_DEVICE_ID_SII_3112) if (hwif->pci_dev->device != PCI_DEVICE_ID_SII_3112)
hwif->atapi_dma = 1; hwif->atapi_dma = 1;
#ifdef CONFIG_BLK_DEV_IDEDMA
hwif->ide_dma_check = &siimage_config_drive_for_dma; hwif->ide_dma_check = &siimage_config_drive_for_dma;
if (!(hwif->udma_four)) if (!(hwif->udma_four))
hwif->udma_four = ata66_siimage(hwif); hwif->udma_four = ata66_siimage(hwif);
...@@ -827,7 +822,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif) ...@@ -827,7 +822,6 @@ static void __init init_hwif_siimage (ide_hwif_t *hwif)
hwif->autodma = 1; hwif->autodma = 1;
hwif->drives[0].autodma = hwif->autodma; hwif->drives[0].autodma = hwif->autodma;
hwif->drives[1].autodma = hwif->autodma; hwif->drives[1].autodma = hwif->autodma;
#endif /* CONFIG_BLK_DEV_IDEDMA */
} }
static void __init init_dma_siimage (ide_hwif_t *hwif, unsigned long dmabase) static void __init init_dma_siimage (ide_hwif_t *hwif, unsigned long dmabase)
......
...@@ -62,14 +62,14 @@ inline void sii_insl (u32 port, void *addr, u32 count) ...@@ -62,14 +62,14 @@ inline void sii_insl (u32 port, void *addr, u32 count)
// while (count--) { *(u32 *)addr = readl(port); addr += 4; } // while (count--) { *(u32 *)addr = readl(port); addr += 4; }
} }
inline void sii_outb (u8 addr, u32 port) inline void sii_outb (u8 value, u32 port)
{ {
writeb(addr, port); writeb(value, port);
} }
inline void sii_outw (u16 addr, u32 port) inline void sii_outw (u16 value, u32 port)
{ {
writew(addr, port); writew(value, port);
} }
inline void sii_outsw (u32 port, void *addr, u32 count) inline void sii_outsw (u32 port, void *addr, u32 count)
...@@ -77,9 +77,9 @@ inline void sii_outsw (u32 port, void *addr, u32 count) ...@@ -77,9 +77,9 @@ inline void sii_outsw (u32 port, void *addr, u32 count)
while (count--) { writew(*(u16 *)addr, port); addr += 2; } while (count--) { writew(*(u16 *)addr, port); addr += 2; }
} }
inline void sii_outl (u32 addr, u32 port) inline void sii_outl (u32 value, u32 port)
{ {
writel(addr, port); writel(value, port);
} }
inline void sii_outsl (u32 port, void *addr, u32 count) inline void sii_outsl (u32 port, void *addr, u32 count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment