]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_via.c
[POWERPC] mpc5200: Allow for fixed speed MII configurations
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_via.c
index e66bb85ad3d114b536dfdafd12951fef2f49a38b..d4840748fb5c902cfdd15bee9ee9c3b39081914d 100644 (file)
@@ -210,22 +210,10 @@ static int via_pre_reset(struct ata_link *link, unsigned long deadline)
                        return -ENOENT;
        }
 
-       return ata_std_prereset(link, deadline);
+       return ata_sff_prereset(link, deadline);
 }
 
 
-/**
- *     via_error_handler               -       reset for VIA chips
- *     @ap: ATA port
- *
- *     Handle the reset callback for the later chips with cable detect
- */
-
-static void via_error_handler(struct ata_port *ap)
-{
-       ata_bmdma_drive_eh(ap, via_pre_reset, ata_std_softreset, NULL, ata_std_postreset);
-}
-
 /**
  *     via_do_set_mode -       set initial PIO mode data
  *     @ap: ATA interface
@@ -343,12 +331,12 @@ static struct ata_port_operations via_port_ops = {
        .cable_detect   = via_cable_detect,
        .set_piomode    = via_set_piomode,
        .set_dmamode    = via_set_dmamode,
-       .error_handler  = via_error_handler,
+       .prereset       = via_pre_reset,
 };
 
 static struct ata_port_operations via_port_ops_noirq = {
        .inherits       = &via_port_ops,
-       .data_xfer      = ata_data_xfer_noirq,
+       .sff_data_xfer  = ata_sff_data_xfer_noirq,
 };
 
 /**
@@ -442,8 +430,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
                .udma_mask = ATA_UDMA6, /* FIXME: should check north bridge */
                .port_ops = &via_port_ops
        };
-       struct ata_port_info type;
-       const struct ata_port_info *ppi[] = { &type, NULL };
+       const struct ata_port_info *ppi[] = { NULL, NULL };
        struct pci_dev *isa = NULL;
        const struct via_isa_bridge *config;
        static int printed_version;
@@ -491,25 +478,25 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
        switch(config->flags & VIA_UDMA) {
                case VIA_UDMA_NONE:
                        if (config->flags & VIA_NO_UNMASK)
-                               type = via_mwdma_info_borked;
+                               ppi[0] = &via_mwdma_info_borked;
                        else
-                               type = via_mwdma_info;
+                               ppi[0] = &via_mwdma_info;
                        break;
                case VIA_UDMA_33:
-                       type = via_udma33_info;
+                       ppi[0] = &via_udma33_info;
                        break;
                case VIA_UDMA_66:
-                       type = via_udma66_info;
+                       ppi[0] = &via_udma66_info;
                        /* The 66 MHz devices require we enable the clock */
                        pci_read_config_dword(pdev, 0x50, &timing);
                        timing |= 0x80008;
                        pci_write_config_dword(pdev, 0x50, timing);
                        break;
                case VIA_UDMA_100:
-                       type = via_udma100_info;
+                       ppi[0] = &via_udma100_info;
                        break;
                case VIA_UDMA_133:
-                       type = via_udma133_info;
+                       ppi[0] = &via_udma133_info;
                        break;
                default:
                        WARN_ON(1);
@@ -524,9 +511,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
        }
 
        /* We have established the device type, now fire it up */
-       type.private_data = (void *)config;
-
-       return ata_pci_init_one(pdev, ppi, &via_sht);
+       return ata_pci_sff_init_one(pdev, ppi, &via_sht, (void *)config);
 }
 
 #ifdef CONFIG_PM