diff options
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 9004e7521889..566e0ecb8db1 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -340,7 +340,7 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const | |||
340 | * Determine system bus clock. | 340 | * Determine system bus clock. |
341 | */ | 341 | */ |
342 | 342 | ||
343 | via_clock = system_bus_clock() * 1000; | 343 | via_clock = (ide_pci_clk ? ide_pci_clk : system_bus_clock()) * 1000; |
344 | 344 | ||
345 | switch (via_clock) { | 345 | switch (via_clock) { |
346 | case 33000: via_clock = 33333; break; | 346 | case 33000: via_clock = 33333; break; |
@@ -415,25 +415,21 @@ static u8 __devinit via82cxxx_cable_detect(ide_hwif_t *hwif) | |||
415 | return ATA_CBL_PATA40; | 415 | return ATA_CBL_PATA40; |
416 | } | 416 | } |
417 | 417 | ||
418 | static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif) | 418 | static const struct ide_port_ops via_port_ops = { |
419 | { | 419 | .set_pio_mode = via_set_pio_mode, |
420 | hwif->set_pio_mode = &via_set_pio_mode; | 420 | .set_dma_mode = via_set_drive, |
421 | hwif->set_dma_mode = &via_set_drive; | 421 | .cable_detect = via82cxxx_cable_detect, |
422 | 422 | }; | |
423 | hwif->cable_detect = via82cxxx_cable_detect; | ||
424 | } | ||
425 | 423 | ||
426 | static const struct ide_port_info via82cxxx_chipset __devinitdata = { | 424 | static const struct ide_port_info via82cxxx_chipset __devinitdata = { |
427 | .name = "VP_IDE", | 425 | .name = "VP_IDE", |
428 | .init_chipset = init_chipset_via82cxxx, | 426 | .init_chipset = init_chipset_via82cxxx, |
429 | .init_hwif = init_hwif_via82cxxx, | ||
430 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, | 427 | .enablebits = { { 0x40, 0x02, 0x02 }, { 0x40, 0x01, 0x01 } }, |
428 | .port_ops = &via_port_ops, | ||
431 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | | 429 | .host_flags = IDE_HFLAG_PIO_NO_BLACKLIST | |
432 | IDE_HFLAG_PIO_NO_DOWNGRADE | | ||
433 | IDE_HFLAG_ABUSE_SET_DMA_MODE | | 430 | IDE_HFLAG_ABUSE_SET_DMA_MODE | |
434 | IDE_HFLAG_POST_SET_MODE | | 431 | IDE_HFLAG_POST_SET_MODE | |
435 | IDE_HFLAG_IO_32BIT | | 432 | IDE_HFLAG_IO_32BIT, |
436 | IDE_HFLAG_BOOTABLE, | ||
437 | .pio_mask = ATA_PIO5, | 433 | .pio_mask = ATA_PIO5, |
438 | .swdma_mask = ATA_SWDMA2, | 434 | .swdma_mask = ATA_SWDMA2, |
439 | .mwdma_mask = ATA_MWDMA2, | 435 | .mwdma_mask = ATA_MWDMA2, |