Skip to contentSkip to conversation

lib_ppc: Move trap_init to occur earlier

PATCH New Becky Bruce 3 participants 5 messages Oct 31, 2008 – Nov 18, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib_ppc: Move trap_init to occur earlier

Doing trap_init immediately once we're running from RAM means we're no longer dependent on the physical location of the flash on non-BookE platforms. Before trap_init, those platforms switch to real mode and go to 0xfff00100 on exception. After the switch, they go to 0x00000100 This makes it easier to move the flash location.

---
 lib_ppc/board.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
lib_ppc/board.c +5 -5
index ce07c4e..289a32a 100644
@@ -689,6 +689,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
 	WATCHDOG_RESET ();
 
+	/*
+	 * Setup trap handlers
+	 */
+	trap_init (dest_addr);
+
 #if defined(CONFIG_BOARD_EARLY_INIT_R)
 	board_early_init_r ();
 #endif
@@ -765,11 +770,6 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
 	asm ("sync ; isync");
 
-	/*
-	 * Setup trap handlers
-	 */
-	trap_init (dest_addr);
-
 #if !defined(CONFIG_SYS_NO_FLASH)
 	puts ("FLASH: ");
 
Signature · 1 line
1.5.5.1
#1 lore raw

PATCH 1/1 lib_ppc: Move trap_init to occur earlier

Quoted 11 lines · Becky Bruce

Doing trap_init immediately once we're running from RAM means we're no longer dependent on the physical location of the flash on non-BookE platforms. Before trap_init, those platforms switch to real mode and go to 0xfff00100 on exception. After the switch, they go to 0x00000100 This makes it easier to move the flash location.

---
 lib_ppc/board.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Wolfgang,

Will you pick this one up? Or would you like me
to run it through u-boot-mpc86xx with the others?

Thanks,
jdl

#2 lore raw

PATCH 1/1 lib_ppc: Move trap_init to occur earlier

Quoted 13 lines · Jon Loeliger
Quoted 11 lines · Becky Bruce

Doing trap_init immediately once we're running from RAM means we're no longer dependent on the physical location of the flash on non-BookE platforms. Before trap_init, those platforms switch to real mode and go to 0xfff00100 on exception. After the switch, they go to 0x00000100 This makes it easier to move the flash location.

---
 lib_ppc/board.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Quoted 7 lines

Wolfgang,

Will you pick this one up? Or would you like me
to run it through u-boot-mpc86xx with the others?

Thanks,
jdl

Wolfgang,

I spoke to Becky about this patch and she says it is required for the rest of her 86xx patches to work.
So I will pick this one up and run it through the u-boot-mpc86xx git tree.

Thanks,
jdl

#3 lore raw

PATCH 1/1 lib_ppc: Move trap_init to occur earlier

Dear Jon,

Quoted 5 lines · In message <1226332549.6112.3.camel@ld0161-tx32> you wrote:

I spoke to Becky about this patch and she says it is required for the rest of her 86xx patches to work.
So I will pick this one up and run it through the u-boot-mpc86xx git tree.

OK - and sorry for being unresponsive so long.

Best regards,

Wolfgang Denk

Signature · 6 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
There's no honorable way to kill, no gentle way to destroy.  There is
nothing good in war.  Except its ending.
	-- Abraham Lincoln, "The Savage Curtain", stardate 5906.5
#4 lore raw

PATCH 1/1 lib_ppc: Move trap_init to occur earlier

In reply to Jon Loeliger

Dear Jon,

Quoted 3 lines · In message <1225729137.17577.17.camel@ld0161-tx32> you wrote:

Will you pick this one up? Or would you like me
to run it through u-boot-mpc86xx with the others?

Thanks for running it through the 86xx repo for me.

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
Minds are like parachutes - they only function when open.