diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 22:53:17 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 22:53:17 +0200 |
commit | d51f19c86583ca70468883d8137a92689f1a80c1 (patch) | |
tree | 2c94deec3c28505fa0533691778e3e7fb7ae8284 | |
parent | b16040b14e766d390138b04c8829c816f4c1d95b (diff) |
amd74xx: cleanup ->init_chipset method
Move amd_clock setup from init_chipset_amd74xx() to amd74xx_probe().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/pci/amd74xx.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c index b6a475313c7..5115d448ff8 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, t |= 0xf0; pci_write_config_byte(dev, AMD_IDE_CONFIG + offset, t); -/* - * Determine the system bus clock. - */ - - amd_clock = (ide_pci_clk ? ide_pci_clk : 33) * 1000; - - switch (amd_clock) { - case 33000: amd_clock = 33333; break; - case 37000: amd_clock = 37500; break; - case 41000: amd_clock = 41666; break; - } - - if (amd_clock < 20000 || amd_clock > 50000) { - printk(KERN_WARNING "%s: User given PCI clock speed impossible (%d), using 33 MHz instead.\n", - name, amd_clock); - amd_clock = 33333; - } - return dev->irq; } @@ -302,6 +284,24 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_ d.name, pci_name(dev), dev->revision, amd_dma[fls(d.udma_mask) - 1]); + /* + * Determine the system bus clock. + */ + amd_clock = (ide_pci_clk ? ide_pci_clk : 33) * 1000; + + switch (amd_clock) { + case 33000: amd_clock = 33333; break; + case 37000: amd_clock = 37500; break; + case 41000: amd_clock = 41666; break; + } + + if (amd_clock < 20000 || amd_clock > 50000) { + printk(KERN_WARNING "%s: User given PCI clock speed impossible" + " (%d), using 33 MHz instead.\n", + d.name, amd_clock); + amd_clock = 33333; + } + return ide_pci_init_one(dev, &d, NULL); } |