Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
[oweals/u-boot.git] / cpu / mpc824x / speed.c
index bd3156d2552cc17d1acae556d2bab598b01c60eb..fdcb9723cbd8817675d700e266a8812e50a5b6b9 100644 (file)
@@ -29,6 +29,8 @@
 #include <mpc824x.h>
 #include <asm/processor.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* ------------------------------------------------------------------------- */
 /* NOTE: This describes the proper use of this file.
  *
@@ -61,8 +63,8 @@ short pll_pci_to_mem_multiplier[] = {
        25,  0, 10,  0, 15, 15,  0,  0,
 #elif defined(CONFIG_MPC8245)
        30, 30, 10, 10, 20, 10, 10, 10,
-       10, 20, 20, 15, 20, 15, 20,  0,
-       30,  0, 15, 40, 20, 25, 20, 40,
+       10, 20, 20, 15, 20, 15, 20, 30,
+       30, 40, 15, 40, 20, 25, 20, 40,
        25, 20, 10, 20, 15, 15, 15,  0,
 #else
 #error Specific type of MPC824x must be defined (i.e. CONFIG_MPC8240)
@@ -107,8 +109,6 @@ short pllratio_to_factor[] = {
 /* compute the CPU and memory bus clock frequencies */
 int get_clocks (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        uint hid1 = mfspr(HID1);
        hid1 = (hid1 >> (32-5)) & 0x1f;
        gd->cpu_clk = (pllratio_to_factor[hid1] * get_bus_freq(0) + 5)