Skip to contentSkip to conversation

Bug: do_reset issued via netconsole does not reset mpc83xx cpu.

PATCH New Michael Zaidman 3 participants 3 messages Feb 15, 2010 – Feb 19, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bug: do_reset issued via netconsole does not reset mpc83xx cpu.

The do_reset routine in the cpu/mpc83xx/cpu.c file does not reset the mpc83xx cpu when issued via netconsole.

Moving the console output "resetting the board." to the beginning of the routine before disabling interrupts solved the problem.

---
 cpu/mpc83xx/cpu.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
cpu/mpc83xx/cpu.c +3 -5
index e38a372..51180d6 100644
@@ -199,7 +199,10 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
 	volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
 
+	puts("Resetting the board.\n");
+
 #ifdef MPC83xx_RESET
+
 	/* Interrupts and MMU off */
 	__asm__ __volatile__ ("mfmsr    %0":"=r" (msr):);
 
@@ -214,9 +217,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 	/* confirm Reset Control Reg is enabled */
 	while(!((immap->reset.rcer) & RCER_CRE));
 
-	printf("Resetting the board.");
-	printf("\n");
-
 	udelay(200);
 
 	/* perform reset, only one bit */
@@ -238,8 +238,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 	 */
 	addr = CONFIG_SYS_RESET_ADDRESS;
 
-	printf("resetting the board.");
-	printf("\n");
 	((void (*)(void)) addr) ();
 #endif	/* MPC83xx_RESET */
 
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 Bug: do_reset issued via netconsole does not reset mpc83xx cpu.

Quoted 7 lines · Michael Zaidman

The do_reset routine in the cpu/mpc83xx/cpu.c file does not reset the mpc83xx cpu when issued via netconsole.

Moving the console output "resetting the board." to the beginning of the routine before disabling interrupts solved the problem.

Quoted 30 lines
---
 cpu/mpc83xx/cpu.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
cpu/mpc83xx/cpu.c +3 -3
index e38a372..51180d6 100644
@@ -199,7 +199,10 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
 	volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
 
+	puts("Resetting the board.\n");
+
 #ifdef MPC83xx_RESET
+
 	/* Interrupts and MMU off */
 	__asm__ __volatile__ ("mfmsr    %0":"=r" (msr):);
 
@@ -214,9 +217,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 	/* confirm Reset Control Reg is enabled */
 	while(!((immap->reset.rcer) & RCER_CRE));
 
-	printf("Resetting the board.");
-	printf("\n");
-
 	udelay(200);
 
 	/* perform reset, only one bit */

cpu/mpc83xx/cpu.c do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) · line 242

Quoted 7 lines
cpu/mpc83xx/cpu.c +0 -2
@@ -238,8 +238,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 	 */
 	addr = CONFIG_SYS_RESET_ADDRESS;
 
-	printf("resetting the board.");
-	printf("\n");
 	((void (*)(void)) addr) ();
 #endif	/* MPC83xx_RESET */

Cheers
Detlev

Signature · 6 lines
Less talking -- more hacking
                                        -- Olin Shivers
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
#2 lore raw

PATCH 1/1 Bug: do_reset issued via netconsole does not reset mpc83xx cpu.

Quoted 5 lines · On Mon, 15 Feb 2010 18:18:34 +0100 Detlev Zundel <[email protected]> wrote:
Quoted 3 lines · Michael Zaidman

The do_reset routine in the cpu/mpc83xx/cpu.c file does not reset the mpc83xx cpu when issued via netconsole.

Quoted 9 lines
Quoted 4 lines

Moving the console output "resetting the board." to the beginning of the routine before disabling interrupts solved the problem.

Quoted 3 lines
---
 cpu/mpc83xx/cpu.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

applied to u-boot-mpc83xx.

Thanks everyone.

Kim