Merge branch 'master' of /home/stefan/git/u-boot/u-boot
[oweals/u-boot.git] / cpu / mpc83xx / cpu_init.c
index e643037d2745690afcff59de3636c2683b71d51c..67c9e570c31d46710c614f3d9ca594d8453d9d9a 100644 (file)
@@ -79,6 +79,12 @@ void cpu_init_f (volatile immap_t * im)
                          (CFG_ACR_RPTCNT << ACR_RPTCNT_SHIFT);
 #endif
 
+#ifdef CFG_SPCR_OPT
+       /* Optimize transactions between CSB and other devices */
+       im->sysconf.spcr = (im->sysconf.spcr & ~SPCR_OPT) |
+                          (CFG_SPCR_OPT << SPCR_OPT_SHIFT);
+#endif
+
 #ifdef CFG_SPCR_TSECEP
        /* all eTSEC's Emergency priority */
        im->sysconf.spcr = (im->sysconf.spcr & ~SPCR_TSECEP) |
@@ -175,8 +181,13 @@ void cpu_init_f (volatile immap_t * im)
 
        /* System General Purpose Register */
 #ifdef CFG_SICRH
+#if defined(CONFIG_MPC834X) || defined(CONFIG_MPC8313)
+       /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */
+       im->sysconf.sicrh = (im->sysconf.sicrh & 0x0000000C) | CFG_SICRH;
+#else
        im->sysconf.sicrh = CFG_SICRH;
 #endif
+#endif
 #ifdef CFG_SICRL
        im->sysconf.sicrl = CFG_SICRL;
 #endif
@@ -212,7 +223,7 @@ void cpu_init_f (volatile immap_t * im)
        im->sysconf.lblaw[0].bar = CFG_LBLAWBAR0_PRELIM;
        im->sysconf.lblaw[0].ar = CFG_LBLAWAR0_PRELIM;
 #else
-#error         CFG_BR0_PRELIM, CFG_OR0_PRELIM, CFG_LBLAWBAR0_PRELIM & CFG_LBLAWAR0_PRELIM must be defined
+#error CFG_BR0_PRELIM, CFG_OR0_PRELIM, CFG_LBLAWBAR0_PRELIM & CFG_LBLAWAR0_PRELIM must be defined
 #endif
 
 #if defined(CFG_BR1_PRELIM) && defined(CFG_OR1_PRELIM)