Commit 42ea0d03 authored by Vitaly Bordug's avatar Vitaly Bordug Committed by Linus Torvalds

[PATCH] ppc32: Fix incorrect PCI frequency value

The time to wait after deasserting PCI_RST has been counted with incorrect
value - this patch fixes the issue.
Signed-off-by: default avatarVitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 00c1bd54
...@@ -248,7 +248,8 @@ pq2ads_setup_pci(struct pci_controller *hose) ...@@ -248,7 +248,8 @@ pq2ads_setup_pci(struct pci_controller *hose)
pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) * pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) *
( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1); ( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1);
freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div)); freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div));
time = (int)666666/freq; time = (int)66666666/freq;
/* due to PCI Local Bus spec, some devices needs to wait such a long /* due to PCI Local Bus spec, some devices needs to wait such a long
time after RST deassertion. More specifically, 0.508s for 66MHz & twice more for 33 */ time after RST deassertion. More specifically, 0.508s for 66MHz & twice more for 33 */
printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting RST...\n",__FILE__,freq, printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting RST...\n",__FILE__,freq,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment