pata_bf54x: handle portmuxing of pins through GPIO PORTs
[safe/jmp/linux-2.6] / drivers / ata / pata_cs5535.c
index f910a8a..71cef9a 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * pata-cs5535.c       - CS5535 PATA for new ATA layer
  *                       (C) 2005-2006 Red Hat Inc
- *                       Alan Cox <alan@redhat.com>
+ *                       Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * based upon cs5535.c from AMD <Jens.Altmann@amd.com> as cleaned up and
- * made readable and Linux style by Wolfgang Zuleger <wolfgang.zuleger@gmx.de
+ * made readable and Linux style by Wolfgang Zuleger <wolfgang.zuleger@gmx.de>
  * and Alexander Kiausch <alex.kiausch@t-online.de>
  *
  * This program is free software; you can redistribute it and/or modify
@@ -72,7 +72,6 @@
 /**
  *     cs5535_cable_detect     -       detect cable type
  *     @ap: Port to detect on
- *     @deadline: deadline jiffies for the operation
  *
  *     Perform cable detection for ATA66 capable cable. Return a libata
  *     cable type.
@@ -181,10 +180,9 @@ static struct ata_port_operations cs5535_port_ops = {
 static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
        static const struct ata_port_info info = {
-               .sht = &cs5535_sht,
                .flags = ATA_FLAG_SLAVE_POSS,
-               .pio_mask = 0x1f,
-               .mwdma_mask = 0x07,
+               .pio_mask = ATA_PIO4,
+               .mwdma_mask = ATA_MWDMA2,
                .udma_mask = ATA_UDMA4,
                .port_ops = &cs5535_port_ops
        };
@@ -200,11 +198,12 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id)
        rdmsr(ATAC_CH0D1_PIO, timings, dummy);
        if (CS5535_BAD_PIO(timings))
                wrmsr(ATAC_CH0D1_PIO, 0xF7F4F7F4UL, 0);
-       return ata_pci_init_one(dev, ppi);
+       return ata_pci_sff_init_one(dev, ppi, &cs5535_sht, NULL);
 }
 
 static const struct pci_device_id cs5535[] = {
-       { PCI_VDEVICE(NS, 0x002D), },
+       { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_CS5535_IDE), },
+       { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5535_IDE), },
 
        { },
 };