]> git.sur5r.net Git - u-boot/blobdiff - cpu/mpc8xx/cpu_init.c
* Patch by Yuli Barcohen, 3 Dec 2003:
[u-boot] / cpu / mpc8xx / cpu_init.c
index abe62094c826e56bdba464ac6123f8efc4c4d4d7..8f06dd1ab91329ee1b30c75f8cd162a9fa165f96 100644 (file)
@@ -42,8 +42,8 @@ void cpu_init_f (volatile immap_t * immr)
 {
 #ifndef CONFIG_MBX
        volatile memctl8xx_t *memctl = &immr->im_memctl;
-       ulong reg;
 #endif
+       ulong reg;
 
        /* SYPCR - contains watchdog control (11-9) */
 
@@ -54,9 +54,11 @@ void cpu_init_f (volatile immap_t * immr)
 #endif /* CONFIG_WATCHDOG */
 
        /* SIUMCR - contains debug pin configuration (11-6) */
-
+#ifndef CONFIG_SVM_SC8xx
        immr->im_siu_conf.sc_siumcr |= CFG_SIUMCR;
-
+#else
+       immr->im_siu_conf.sc_siumcr = CFG_SIUMCR;
+#endif
        /* initialize timebase status and control register (11-26) */
        /* unlock TBSCRK */
 
@@ -68,6 +70,14 @@ void cpu_init_f (volatile immap_t * immr)
        immr->im_sitk.sitk_piscrk = KAPWR_KEY;
        immr->im_sit.sit_piscr = CFG_PISCR;
 
+       /* System integration timers. Don't change EBDF! (15-27) */
+
+       immr->im_clkrstk.cark_sccrk = KAPWR_KEY;
+       reg = immr->im_clkrst.car_sccr;
+       reg &= SCCR_MASK;
+       reg |= CFG_SCCR;
+       immr->im_clkrst.car_sccr = reg;
+
        /* PLL (CPU clock) settings (15-30) */
 
        immr->im_clkrstk.cark_plprcrk = KAPWR_KEY;
@@ -88,14 +98,6 @@ void cpu_init_f (volatile immap_t * immr)
 #endif
        immr->im_clkrst.car_plprcr = reg;
 
-       /* System integration timers. Don't change EBDF! (15-27) */
-
-       immr->im_clkrstk.cark_sccrk = KAPWR_KEY;
-       reg = immr->im_clkrst.car_sccr;
-       reg &= SCCR_MASK;
-       reg |= CFG_SCCR;
-       immr->im_clkrst.car_sccr = reg;
-
        /*
         * Memory Controller:
         */
@@ -130,7 +132,8 @@ void cpu_init_f (volatile immap_t * immr)
         *  I owe him a free beer. - wd]
         */
 
-#if defined(CONFIG_GTH)                || \
+#if defined(CONFIG_ADDERII)    || \
+    defined(CONFIG_GTH)                || \
     defined(CONFIG_HERMES)     || \
     defined(CONFIG_ICU862)     || \
     defined(CONFIG_IP860)      || \
@@ -142,8 +145,7 @@ void cpu_init_f (volatile immap_t * immr)
     defined(CONFIG_R360MPI)    || \
     defined(CONFIG_RPXCLASSIC) || \
     defined(CONFIG_RPXLITE)    || \
-    defined(CONFIG_SPD823TS)   || \
-   (defined(CONFIG_MPC860T) && defined(CONFIG_FADS))
+    defined(CONFIG_SPD823TS)
 
        memctl->memc_br0 = CFG_BR0_PRELIM;
 #endif