aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r--drivers/ide/pci/amd74xx.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index b6a475313c7c..5115d448ff83 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -173,24 +173,6 @@ static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev,
173 t |= 0xf0; 173 t |= 0xf0;
174 pci_write_config_byte(dev, AMD_IDE_CONFIG + offset, t); 174 pci_write_config_byte(dev, AMD_IDE_CONFIG + offset, t);
175 175
176/*
177 * Determine the system bus clock.
178 */
179
180 amd_clock = (ide_pci_clk ? ide_pci_clk : 33) * 1000;
181
182 switch (amd_clock) {
183 case 33000: amd_clock = 33333; break;
184 case 37000: amd_clock = 37500; break;
185 case 41000: amd_clock = 41666; break;
186 }
187
188 if (amd_clock < 20000 || amd_clock > 50000) {
189 printk(KERN_WARNING "%s: User given PCI clock speed impossible (%d), using 33 MHz instead.\n",
190 name, amd_clock);
191 amd_clock = 33333;
192 }
193
194 return dev->irq; 176 return dev->irq;
195} 177}
196 178
@@ -302,6 +284,24 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
302 d.name, pci_name(dev), dev->revision, 284 d.name, pci_name(dev), dev->revision,
303 amd_dma[fls(d.udma_mask) - 1]); 285 amd_dma[fls(d.udma_mask) - 1]);
304 286
287 /*
288 * Determine the system bus clock.
289 */
290 amd_clock = (ide_pci_clk ? ide_pci_clk : 33) * 1000;
291
292 switch (amd_clock) {
293 case 33000: amd_clock = 33333; break;
294 case 37000: amd_clock = 37500; break;
295 case 41000: amd_clock = 41666; break;
296 }
297
298 if (amd_clock < 20000 || amd_clock > 50000) {
299 printk(KERN_WARNING "%s: User given PCI clock speed impossible"
300 " (%d), using 33 MHz instead.\n",
301 d.name, amd_clock);
302 amd_clock = 33333;
303 }
304
305 return ide_pci_init_one(dev, &d, NULL); 305 return ide_pci_init_one(dev, &d, NULL);
306} 306}
307 307