aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/piix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/piix.c')
-rw-r--r--drivers/ide/pci/piix.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 89d74ffdb207..21c5dd23f928 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -285,11 +285,6 @@ static u8 __devinit piix_cable_detect(ide_hwif_t *hwif)
285 285
286static void __devinit init_hwif_piix(ide_hwif_t *hwif) 286static void __devinit init_hwif_piix(ide_hwif_t *hwif)
287{ 287{
288 hwif->set_pio_mode = &piix_set_pio_mode;
289 hwif->set_dma_mode = &piix_set_dma_mode;
290
291 hwif->cable_detect = piix_cable_detect;
292
293 if (!hwif->dma_base) 288 if (!hwif->dma_base)
294 return; 289 return;
295 290
@@ -306,6 +301,12 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
306 hwif->ide_dma_clear_irq = &piix_dma_clear_irq; 301 hwif->ide_dma_clear_irq = &piix_dma_clear_irq;
307} 302}
308 303
304static const struct ide_port_ops piix_port_ops = {
305 .set_pio_mode = piix_set_pio_mode,
306 .set_dma_mode = piix_set_dma_mode,
307 .cable_detect = piix_cable_detect,
308};
309
309#ifndef CONFIG_IA64 310#ifndef CONFIG_IA64
310 #define IDE_HFLAGS_PIIX IDE_HFLAG_LEGACY_IRQS 311 #define IDE_HFLAGS_PIIX IDE_HFLAG_LEGACY_IRQS
311#else 312#else
@@ -317,6 +318,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
317 .name = name_str, \ 318 .name = name_str, \
318 .init_hwif = init_hwif_piix, \ 319 .init_hwif = init_hwif_piix, \
319 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 320 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
321 .port_ops = &piix_port_ops, \
320 .host_flags = IDE_HFLAGS_PIIX, \ 322 .host_flags = IDE_HFLAGS_PIIX, \
321 .pio_mask = ATA_PIO4, \ 323 .pio_mask = ATA_PIO4, \
322 .swdma_mask = ATA_SWDMA2_ONLY, \ 324 .swdma_mask = ATA_SWDMA2_ONLY, \
@@ -330,6 +332,7 @@ static void __devinit init_hwif_ich(ide_hwif_t *hwif)
330 .init_chipset = init_chipset_ich, \ 332 .init_chipset = init_chipset_ich, \
331 .init_hwif = init_hwif_ich, \ 333 .init_hwif = init_hwif_ich, \
332 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \ 334 .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
335 .port_ops = &piix_port_ops, \
333 .host_flags = IDE_HFLAGS_PIIX, \ 336 .host_flags = IDE_HFLAGS_PIIX, \
334 .pio_mask = ATA_PIO4, \ 337 .pio_mask = ATA_PIO4, \
335 .swdma_mask = ATA_SWDMA2_ONLY, \ 338 .swdma_mask = ATA_SWDMA2_ONLY, \