aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips/au1xxx-ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/mips/au1xxx-ide.c')
-rw-r--r--drivers/ide/mips/au1xxx-ide.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c
index 2f322d7e881..1de58566e5b 100644
--- a/drivers/ide/mips/au1xxx-ide.c
+++ b/drivers/ide/mips/au1xxx-ide.c
@@ -601,8 +601,9 @@ static int au_ide_probe(struct device *dev)
601 _auide_hwif *ahwif = &auide_hwif; 601 _auide_hwif *ahwif = &auide_hwif;
602 ide_hwif_t *hwif; 602 ide_hwif_t *hwif;
603 struct resource *res; 603 struct resource *res;
604 hw_regs_t *hw;
605 int ret = 0; 604 int ret = 0;
605 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
606 hw_regs_t hw;
606 607
607#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA) 608#if defined(CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA)
608 char *mode = "MWDMA2"; 609 char *mode = "MWDMA2";
@@ -644,12 +645,12 @@ static int au_ide_probe(struct device *dev)
644 /* FIXME: This might possibly break PCMCIA IDE devices */ 645 /* FIXME: This might possibly break PCMCIA IDE devices */
645 646
646 hwif = &ide_hwifs[pdev->id]; 647 hwif = &ide_hwifs[pdev->id];
647 hw = &hwif->hw; 648 hwif->irq = ahwif->irq;
648 hwif->irq = hw->irq = ahwif->irq;
649 hwif->chipset = ide_au1xxx; 649 hwif->chipset = ide_au1xxx;
650 650
651 auide_setup_ports(hw, ahwif); 651 memset(&hw, 0, sizeof(hw));
652 memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports)); 652 auide_setup_ports(&hw, ahwif);
653 memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
653 654
654 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */ 655 hwif->ultra_mask = 0x0; /* Disable Ultra DMA */
655#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA 656#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
@@ -706,8 +707,10 @@ static int au_ide_probe(struct device *dev)
706 hwif->config_data = 0; /* no chipset-specific code */ 707 hwif->config_data = 0; /* no chipset-specific code */
707 708
708 hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */ 709 hwif->drives[0].autotune = 1; /* 1=autotune, 2=noautotune, 0=default */
710 hwif->drives[1].autotune = 1;
709#endif 711#endif
710 hwif->drives[0].no_io_32bit = 1; 712 hwif->drives[0].no_io_32bit = 1;
713 hwif->drives[1].no_io_32bit = 1;
711 714
712 auide_hwif.hwif = hwif; 715 auide_hwif.hwif = hwif;
713 hwif->hwif_data = &auide_hwif; 716 hwif->hwif_data = &auide_hwif;
@@ -717,9 +720,9 @@ static int au_ide_probe(struct device *dev)
717 dbdma_init_done = 1; 720 dbdma_init_done = 1;
718#endif 721#endif
719 722
720 probe_hwif_init(hwif); 723 idx[0] = hwif->index;
721 724
722 ide_proc_register_port(hwif); 725 ide_device_add(idx);
723 726
724 dev_set_drvdata(dev, hwif); 727 dev_set_drvdata(dev, hwif);
725 728