Skip to contentSkip to conversation

: Reset issue fix on mpc85xx

PATCH New urwithsughosh at gmail.com 2 participants 3 messages Sep 17, 2007 – Sep 18, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Reset issue fix on mpc85xx

Hello,
I tried the v1.3.0-rc1 on the ADS board, and problem of the board reset through the 'reset' command pertains. I'm still not sure about the reason of the MSR getting cleared, but am using a brute force approach.

cpu/mpc85xx/cpu.c +6 -1
index 08e0468..bbc5444 100644
@@ -163,7 +163,12 @@ int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
         * Initiate hard reset in debug control register DBCR0
         * Make sure MSR[DE] = 1
         */
-               unsigned long val;
+               unsigned long val, msr;
+
+               msr = mfmsr ();
+               msr |= MSR_DE;
+               mtmsr (msr);
+
                val = mfspr(DBCR0);
                val |= 0x70000000;
                mtspr(DBCR0,val);
Signature · 1 line
sughosh
#1 lore raw

PATCH 1/1 : Reset issue fix on mpc85xx

Quoted 17 lines · In message <20070917171525.GA3711@GNU> you wrote:

Hello,
I tried the v1.3.0-rc1 on the ADS board, and problem of the board reset through the 'reset' command pertains. I'm still not sure about the reason of the MSR getting cleared, but am using a brute force approach.

cpu/mpc85xx/cpu.c +0 -0
index 08e0468..bbc5444 100644
@@ -163,7 +163,12 @@ int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
         * Initiate hard reset in debug control register DBCR0
         * Make sure MSR[DE] = 1
         */

cpu/mpc85xx/cpu.c int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) · line 174

Quoted 10 lines
cpu/mpc85xx/cpu.c +6 -1
-               unsigned long val;
+               unsigned long val, msr;
+
+               msr = mfmsr ();
+               msr |= MSR_DE;
+               mtmsr (msr);
+
                val = mfspr(DBCR0);
                val |= 0x70000000;
                mtspr(DBCR0,val);

You have whitespace problems with your patch. It does not apply.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I still miss my ex-wife, but my aim is getting better.
#2 lore raw

PATCH 1/1 : Reset issue fix on mpc85xx

Quoted 1 line · Wolfgang Denk

You have whitespace problems with your patch. It does not apply.

Hope this applies.

---
 cpu/mpc85xx/cpu.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
cpu/mpc85xx/cpu.c +6 -1
index 08e0468..bbc5444 100644
@@ -163,7 +163,12 @@ int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
 	 * Initiate hard reset in debug control register DBCR0
 	 * Make sure MSR[DE] = 1
 	 */
-		unsigned long val;
+		unsigned long val, msr;
+
+		msr = mfmsr ();
+		msr |= MSR_DE;
+		mtmsr (msr);
+
 		val = mfspr(DBCR0);
 		val |= 0x70000000;
 		mtspr(DBCR0,val);
Signature · 6 lines
sughosh
-------------- next part --------------

---
 cpu/mpc85xx/cpu.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
cpu/mpc85xx/cpu.c +6 -1
index 08e0468..bbc5444 100644
@@ -163,7 +163,12 @@ int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[])
 	 * Initiate hard reset in debug control register DBCR0
 	 * Make sure MSR[DE] = 1
 	 */
-		unsigned long val;
+		unsigned long val, msr;
+
+		msr = mfmsr ();
+		msr |= MSR_DE;
+		mtmsr (msr);
+
 		val = mfspr(DBCR0);
 		val |= 0x70000000;
 		mtspr(DBCR0,val);