From: Andre Schwarz <andre.schwarz@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x
Date: Thu, 17 Apr 2008 19:28:17 +0200 [thread overview]
Message-ID: <480788B1.9090208@matrix-vision.de> (raw)
Kim,
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.
Cheers,
Andre
Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
--
cpu/mpc83xx/cpu_init.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/cpu/mpc83xx/cpu_init.c b/cpu/mpc83xx/cpu_init.c
index fba5b02..66cc1c2 100644
--- a/cpu/mpc83xx/cpu_init.c
+++ b/cpu/mpc83xx/cpu_init.c
@@ -59,6 +59,8 @@ static void config_qe_ioports(void)
*/
void cpu_init_f (volatile immap_t * im)
{
+ u32 tmp_sicrh = 0;
+
/* Pointer is writable since we allocated a register for it */
gd = (gd_t *) (CFG_INIT_RAM_ADDR + CFG_GBL_DATA_OFFSET);
@@ -181,7 +183,11 @@ void cpu_init_f (volatile immap_t * im)
/* System General Purpose Register */
#ifdef CFG_SICRH
- im->sysconf.sicrh = CFG_SICRH;
+#ifdef CONFIG_MPC834X
+ /* regarding to MPC34x manual rev.1 bits 28..29 must be preserved */
+ tmp_sicrh = im->sysconf.sicrh & 0x0000000C;
+#endif
+ im->sysconf.sicrh = CFG_SICRH | tmp_sicrh;
#endif
#ifdef CFG_SICRL
im->sysconf.sicrl = CFG_SICRL;
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
next reply other threads:[~2008-04-17 17:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-17 17:28 Andre Schwarz [this message]
2008-04-17 20:56 ` [U-Boot-Users] [PATCH] fix system config overwrite @ MPC834x Kim Phillips
2008-04-18 8:48 ` Andre Schwarz
2008-04-18 16:20 ` Kim Phillips
2008-04-18 18:31 ` André Schwarz
2008-04-19 12:55 ` Jerry Van Baren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=480788B1.9090208@matrix-vision.de \
--to=andre.schwarz@matrix-vision.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox