Merge branch 'master' of /home/stefan/git/u-boot/u-boot
[oweals/u-boot.git] / cpu / mpc83xx / cpu_init.c
index 3337d8cc3304c567829311c41f0b7181d603f5b0..67c9e570c31d46710c614f3d9ca594d8453d9d9a 100644 (file)
@@ -73,19 +73,20 @@ void cpu_init_f (volatile immap_t * im)
                          (CFG_ACR_PIPE_DEP << ACR_PIPE_DEP_SHIFT);
 #endif
 
-#ifdef CFG_SPCR_TSECEP
-       /* eTSEC Emergency priority */
-       im->sysconf.spcr = (im->sysconf.spcr & ~SPCR_TSECEP) | (CFG_SPCR_TSECEP << SPCR_TSECEP_SHIFT);
-#endif
-
 #ifdef CFG_ACR_RPTCNT
        /* Arbiter repeat count */
        im->arbiter.acr = (im->arbiter.acr & ~(ACR_RPTCNT)) |
                          (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 TSEC's Emergency priority */
+       /* all eTSEC's Emergency priority */
        im->sysconf.spcr = (im->sysconf.spcr & ~SPCR_TSECEP) |
                           (CFG_SPCR_TSECEP << SPCR_TSECEP_SHIFT);
 #endif
@@ -180,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
@@ -217,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)