]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_amd.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_amd.c
index 67c7e87dec042417bf33e426091216570012d075..b9c44c575ce3f42c5bddf10cf994e788a7432b13 100644 (file)
@@ -324,10 +324,6 @@ static struct scsi_host_template amd_sht = {
        .slave_configure        = ata_scsi_slave_config,
        .slave_destroy          = ata_scsi_slave_destroy,
        .bios_param             = ata_std_bios_param,
-#ifdef CONFIG_PM
-       .resume                 = ata_scsi_device_resume,
-       .suspend                = ata_scsi_device_suspend,
-#endif
 };
 
 static struct ata_port_operations amd33_port_ops = {
@@ -542,10 +538,10 @@ static struct ata_port_operations nv133_port_ops = {
 
 static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
 {
-       static struct ata_port_info info[10] = {
+       static const struct ata_port_info info[10] = {
                {       /* 0: AMD 7401 */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,     /* No SWDMA */
                        .udma_mask = 0x07,      /* UDMA 33 */
@@ -553,78 +549,78 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
                },
                {       /* 1: Early AMD7409 - no swdma */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x1f,      /* UDMA 66 */
+                       .udma_mask = ATA_UDMA4, /* UDMA 66 */
                        .port_ops = &amd66_port_ops
                },
                {       /* 2: AMD 7409, no swdma errata */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x1f,      /* UDMA 66 */
+                       .udma_mask = ATA_UDMA4, /* UDMA 66 */
                        .port_ops = &amd66_port_ops
                },
                {       /* 3: AMD 7411 */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x3f,      /* UDMA 100 */
+                       .udma_mask = ATA_UDMA5, /* UDMA 100 */
                        .port_ops = &amd100_port_ops
                },
                {       /* 4: AMD 7441 */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x3f,      /* UDMA 100 */
+                       .udma_mask = ATA_UDMA5, /* UDMA 100 */
                        .port_ops = &amd100_port_ops
                },
                {       /* 5: AMD 8111*/
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x7f,      /* UDMA 133, no swdma */
+                       .udma_mask = ATA_UDMA6, /* UDMA 133, no swdma */
                        .port_ops = &amd133_port_ops
                },
                {       /* 6: AMD 8111 UDMA 100 (Serenade) */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x3f,      /* UDMA 100, no swdma */
+                       .udma_mask = ATA_UDMA5, /* UDMA 100, no swdma */
                        .port_ops = &amd133_port_ops
                },
                {       /* 7: Nvidia Nforce */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x3f,      /* UDMA 100 */
+                       .udma_mask = ATA_UDMA5, /* UDMA 100 */
                        .port_ops = &nv100_port_ops
                },
                {       /* 8: Nvidia Nforce2 and later */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x7f,      /* UDMA 133, no swdma */
+                       .udma_mask = ATA_UDMA6, /* UDMA 133, no swdma */
                        .port_ops = &nv133_port_ops
                },
                {       /* 9: AMD CS5536 (Geode companion) */
                        .sht = &amd_sht,
-                       .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST,
+                       .flags = ATA_FLAG_SLAVE_POSS,
                        .pio_mask = 0x1f,
                        .mwdma_mask = 0x07,
-                       .udma_mask = 0x3f,      /* UDMA 100 */
+                       .udma_mask = ATA_UDMA5, /* UDMA 100 */
                        .port_ops = &amd100_port_ops
                }
        };
-       static struct ata_port_info *port_info[2];
+       const struct ata_port_info *ppi[] = { NULL, NULL };
        static int printed_version;
        int type = id->driver_data;
        u8 rev;
@@ -656,9 +652,8 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
                ata_pci_clear_simplex(pdev);
 
        /* And fire it up */
-
-       port_info[0] = port_info[1] = &info[type];
-       return ata_pci_init_one(pdev, port_info, 2);
+       ppi[0] = &info[type];
+       return ata_pci_init_one(pdev, ppi);
 }
 
 #ifdef CONFIG_PM
@@ -698,6 +693,8 @@ static const struct pci_device_id amd[] = {
        { PCI_VDEVICE(NVIDIA,   PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE), 8 },
        { PCI_VDEVICE(NVIDIA,   PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE), 8 },
        { PCI_VDEVICE(NVIDIA,   PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE), 8 },
+       { PCI_VDEVICE(NVIDIA,   PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE), 8 },
+       { PCI_VDEVICE(NVIDIA,   PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE), 8 },
        { PCI_VDEVICE(AMD,      PCI_DEVICE_ID_AMD_CS5536_IDE),          9 },
 
        { },