diff options
Diffstat (limited to 'drivers/ide/pci/amd74xx.c')
-rw-r--r-- | drivers/ide/pci/amd74xx.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index cbf78edfe00b..2cea7bf51a0f 100644 --- a/drivers/ide/pci/amd74xx.c +++ b/drivers/ide/pci/amd74xx.c | |||
@@ -112,15 +112,13 @@ static void amd_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
112 | amd_set_drive(drive, XFER_PIO_0 + pio); | 112 | amd_set_drive(drive, XFER_PIO_0 + pio); |
113 | } | 113 | } |
114 | 114 | ||
115 | static void __devinit amd7409_cable_detect(struct pci_dev *dev, | 115 | static void __devinit amd7409_cable_detect(struct pci_dev *dev) |
116 | const char *name) | ||
117 | { | 116 | { |
118 | /* no host side cable detection */ | 117 | /* no host side cable detection */ |
119 | amd_80w = 0x03; | 118 | amd_80w = 0x03; |
120 | } | 119 | } |
121 | 120 | ||
122 | static void __devinit amd7411_cable_detect(struct pci_dev *dev, | 121 | static void __devinit amd7411_cable_detect(struct pci_dev *dev) |
123 | const char *name) | ||
124 | { | 122 | { |
125 | int i; | 123 | int i; |
126 | u32 u = 0; | 124 | u32 u = 0; |
@@ -131,9 +129,9 @@ static void __devinit amd7411_cable_detect(struct pci_dev *dev, | |||
131 | amd_80w = ((t & 0x3) ? 1 : 0) | ((t & 0xc) ? 2 : 0); | 129 | amd_80w = ((t & 0x3) ? 1 : 0) | ((t & 0xc) ? 2 : 0); |
132 | for (i = 24; i >= 0; i -= 8) | 130 | for (i = 24; i >= 0; i -= 8) |
133 | if (((u >> i) & 4) && !(amd_80w & (1 << (1 - (i >> 4))))) { | 131 | if (((u >> i) & 4) && !(amd_80w & (1 << (1 - (i >> 4))))) { |
134 | printk(KERN_WARNING "%s %s: BIOS didn't set cable bits " | 132 | printk(KERN_WARNING DRV_NAME " %s: BIOS didn't set " |
135 | "correctly. Enabling workaround.\n", | 133 | "cable bits correctly. Enabling workaround.\n", |
136 | name, pci_name(dev)); | 134 | pci_name(dev)); |
137 | amd_80w |= (1 << (1 - (i >> 4))); | 135 | amd_80w |= (1 << (1 - (i >> 4))); |
138 | } | 136 | } |
139 | } | 137 | } |
@@ -142,8 +140,7 @@ static void __devinit amd7411_cable_detect(struct pci_dev *dev, | |||
142 | * The initialization callback. Initialize drive independent registers. | 140 | * The initialization callback. Initialize drive independent registers. |
143 | */ | 141 | */ |
144 | 142 | ||
145 | static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, | 143 | static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev) |
146 | const char *name) | ||
147 | { | 144 | { |
148 | u8 t = 0, offset = amd_offset(dev); | 145 | u8 t = 0, offset = amd_offset(dev); |
149 | 146 | ||
@@ -156,9 +153,9 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, | |||
156 | ; /* no UDMA > 2 */ | 153 | ; /* no UDMA > 2 */ |
157 | else if (dev->vendor == PCI_VENDOR_ID_AMD && | 154 | else if (dev->vendor == PCI_VENDOR_ID_AMD && |
158 | dev->device == PCI_DEVICE_ID_AMD_VIPER_7409) | 155 | dev->device == PCI_DEVICE_ID_AMD_VIPER_7409) |
159 | amd7409_cable_detect(dev, name); | 156 | amd7409_cable_detect(dev); |
160 | else | 157 | else |
161 | amd7411_cable_detect(dev, name); | 158 | amd7411_cable_detect(dev); |
162 | 159 | ||
163 | /* | 160 | /* |
164 | * Take care of prefetch & postwrite. | 161 | * Take care of prefetch & postwrite. |