]> git.sur5r.net Git - u-boot/blobdiff - cpu/mpc85xx/speed.c
Add support for Freescale M5271: Merge with /work/u-boot.mcf5271
[u-boot] / cpu / mpc85xx / speed.c
index d40cd8c486c9057737117155f64ef6aca27dcb8d..ca81ee73521a695cf19a7ae54fa457f29c288717 100644 (file)
 #include <ppc_asm.tmpl>
 #include <asm/processor.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /* --------------------------------------------------------------- */
 
 void get_sys_info (sys_info_t * sysInfo)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        volatile immap_t    *immap = (immap_t *)CFG_IMMR;
        volatile ccsr_gur_t *gur = &immap->im_gur;
        uint plat_ratio,e500_ratio;
@@ -81,9 +82,8 @@ void get_sys_info (sys_info_t * sysInfo)
 
 int get_clocks (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
        sys_info_t sys_info;
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
        volatile immap_t *immap = (immap_t *) CFG_IMMR;
        uint sccr, dfbrg;
 
@@ -95,7 +95,7 @@ int get_clocks (void)
        get_sys_info (&sys_info);
        gd->cpu_clk = sys_info.freqProcessor;
        gd->bus_clk = sys_info.freqSystemBus;
-#if defined(CONFIG_MPC8560)
+#if defined(CONFIG_CPM2)
        gd->vco_out = 2*sys_info.freqSystemBus;
        gd->cpm_clk = gd->vco_out / 2;
        gd->scc_clk = gd->vco_out / 4;