]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
fix system config overwrite @ MPC834x and MPC8313
authorAndre Schwarz <andre.schwarz@matrix-vision.de>
Mon, 23 Jun 2008 09:40:56 +0000 (11:40 +0200)
committerKim Phillips <kim.phillips@freescale.com>
Wed, 25 Jun 2008 22:04:28 +0000 (17:04 -0500)
During 83xx setup the "System I/O configuration register high" gets
overwritten with user defined value if CFG_SICRH is defined.

Regarding to the MPC834x manual (Table 5-28 reve.1) bits 28+29 of SICRH
must keep their reset value regardless of configuration.

On my board (using RGMII) those bits are set after reset - yet it's
unclear where they come from.

The patch keeps both bits on MPC834x and MPC8313.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
cpu/mpc83xx/cpu_init.c

index fb184d816b62eb74962babb281b2028621ea2095..67c9e570c31d46710c614f3d9ca594d8453d9d9a 100644 (file)
@@ -181,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