Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / ide / pci / amd74xx.c
index 4e0f13d..b22ee54 100644 (file)
@@ -73,6 +73,8 @@ static struct amd_ide_chip {
        { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE,        0x50, AMD_UDMA_133 },
        { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE,        0x50, AMD_UDMA_133 },
        { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE,        0x50, AMD_UDMA_133 },
+       { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE,        0x50, AMD_UDMA_133 },
+       { PCI_DEVICE_ID_AMD_CS5536_IDE,                 0x40, AMD_UDMA_100 },
        { 0 }
 };
 
@@ -309,7 +311,7 @@ static int amd74xx_ide_dma_check(ide_drive_t *drive)
  * and initialize its drive independent registers.
  */
 
-static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const char *name)
 {
        unsigned char t;
        unsigned int u;
@@ -345,10 +347,8 @@ static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char
                        break;
 
                case AMD_UDMA_66:
-                       pci_read_config_dword(dev, AMD_UDMA_TIMING, &u);
-                       for (i = 24; i >= 0; i -= 8)
-                               if ((u >> i) & 4)
-                                       amd_80w |= (1 << (1 - (i >> 4)));
+                       /* no host side cable detection */
+                       amd_80w = 0x03;
                        break;
        }
 
@@ -384,8 +384,6 @@ static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char
        if (amd_clock < 20000 || amd_clock > 50000) {
                printk(KERN_WARNING "%s: User given PCI clock speed impossible (%d), using 33 MHz instead.\n",
                        amd_chipset->name, amd_clock);
-               printk(KERN_WARNING "%s: Use ide0=ata66 if you want to assume 80-wire cable\n",
-                       amd_chipset->name);
                amd_clock = 33333;
        }
 
@@ -413,7 +411,7 @@ static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char
        return dev->irq;
 }
 
-static void __init init_hwif_amd74xx(ide_hwif_t *hwif)
+static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
 {
        int i;
 
@@ -489,6 +487,8 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
        /* 13 */ DECLARE_NV_DEV("NFORCE-CK804"),
        /* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"),
        /* 15 */ DECLARE_NV_DEV("NFORCE-MCP51"),
+       /* 16 */ DECLARE_NV_DEV("NFORCE-MCP55"),
+       /* 17 */ DECLARE_AMD_DEV("AMD5536"),
 };
 
 static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
@@ -524,6 +524,8 @@ static struct pci_device_id amd74xx_pci_tbl[] = {
        { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 },
        { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 },
        { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 },
+       { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE,  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 16 },
+       { PCI_VENDOR_ID_AMD,    PCI_DEVICE_ID_AMD_CS5536_IDE,           PCI_ANY_ID, PCI_ANY_ID, 0, 0, 17 },
        { 0, },
 };
 MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);