]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc85xx/speed.c
Merge branch 'master' of git://git.denx.de/u-boot-arm
[u-boot] / arch / powerpc / cpu / mpc85xx / speed.c
index 8132115fca6e9f455629844c77528490ad6f7e7a..f2aa8d039d69053bb0d2517f2a6860575f927ce2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004, 2007-2010 Freescale Semiconductor, Inc.
+ * Copyright 2004, 2007-2011 Freescale Semiconductor, Inc.
  *
  * (C) Copyright 2003 Motorola Inc.
  * Xianghua Xiao, (X.Xiao@motorola.com)
@@ -131,7 +131,9 @@ void get_sys_info (sys_info_t * sysInfo)
 
 #else
        uint plat_ratio,e500_ratio,half_freqSystemBus;
+#if defined(CONFIG_FSL_LBC)
        uint lcrr_div;
+#endif
        int i;
 #ifdef CONFIG_QE
        u32 qe_ratio;
@@ -168,14 +170,12 @@ void get_sys_info (sys_info_t * sysInfo)
        sysInfo->freqQE = qe_ratio * CONFIG_SYS_CLK_FREQ;
 #endif
 
+#if defined(CONFIG_FSL_LBC)
 #if defined(CONFIG_SYS_LBC_LCRR)
        /* We will program LCRR to this value later */
        lcrr_div = CONFIG_SYS_LBC_LCRR & LCRR_CLKDIV;
 #else
-       {
-           volatile ccsr_lbc_t *lbc = (void *)(CONFIG_SYS_MPC85xx_LBC_ADDR);
-           lcrr_div = in_be32(&lbc->lcrr) & LCRR_CLKDIV;
-       }
+       lcrr_div = in_be32(&(LBC_BASE_ADDR)->lcrr) & LCRR_CLKDIV;
 #endif
        if (lcrr_div == 2 || lcrr_div == 4 || lcrr_div == 8) {
 #if defined(CONFIG_FSL_CORENET)
@@ -196,6 +196,7 @@ void get_sys_info (sys_info_t * sysInfo)
                /* In case anyone cares what the unknown value is */
                sysInfo->freqLocalBus = lcrr_div;
        }
+#endif
 }