Skip to content
Snippets Groups Projects
Commit 4c006dd1 authored by Michael Zaidman's avatar Michael Zaidman Committed by Kim Phillips
Browse files

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.

Signed-off-by: default avatarMichael Zaidman <michael.zaidman@gmail.com>
Acked-by: default avatarDetlev Zundel <dzu@denx.de>
Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
parent 77e7273c
No related branches found
No related tags found
No related merge requests found
...@@ -199,7 +199,10 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ...@@ -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; volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR;
puts("Resetting the board.\n");
#ifdef MPC83xx_RESET #ifdef MPC83xx_RESET
/* Interrupts and MMU off */ /* Interrupts and MMU off */
__asm__ __volatile__ ("mfmsr %0":"=r" (msr):); __asm__ __volatile__ ("mfmsr %0":"=r" (msr):);
...@@ -214,9 +217,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ...@@ -214,9 +217,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
/* confirm Reset Control Reg is enabled */ /* confirm Reset Control Reg is enabled */
while(!((immap->reset.rcer) & RCER_CRE)); while(!((immap->reset.rcer) & RCER_CRE));
printf("Resetting the board.");
printf("\n");
udelay(200); udelay(200);
/* perform reset, only one bit */ /* perform reset, only one bit */
...@@ -238,8 +238,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) ...@@ -238,8 +238,6 @@ do_reset (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
*/ */
addr = CONFIG_SYS_RESET_ADDRESS; addr = CONFIG_SYS_RESET_ADDRESS;
printf("resetting the board.");
printf("\n");
((void (*)(void)) addr) (); ((void (*)(void)) addr) ();
#endif /* MPC83xx_RESET */ #endif /* MPC83xx_RESET */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment