]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
authorKumar Gala <galak@kernel.crashing.org>
Wed, 9 Sep 2009 16:40:41 +0000 (11:40 -0500)
committerTom Rix <Tom.Rix@windriver.com>
Sat, 3 Oct 2009 14:04:17 +0000 (09:04 -0500)
Some board ports place TEXT_BASE at a location that would cause the
RESET_VECTOR_ADDRESS not to be at 0xfffffffc when we link.  By default
we assume RESET_VECTOR_ADDRESS will be 0xfffffffc if the board doesn't
explicitly set it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Wolfgang Denk <wd@denx.de>
board/freescale/mpc8536ds/config.mk
board/freescale/mpc8572ds/config.mk
board/freescale/p1_p2_rdb/config.mk
board/freescale/p2020ds/config.mk
config.mk
cpu/mpc85xx/u-boot.lds

index f03087620a3a01afe95887bf56130e10eb25db5d..c1d0525678eba80f97c80e44bd0eb42bc5737312 100644 (file)
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
index 08b61f09ab2d356a57709bbd3df3243ae8d7e876..67394c9b7184168deac542f9d5d158a1a998e1a3 100644 (file)
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
index abd64bbbec01b119b328e6a4e8a522bba6e5fe40..a56b5366b75ffcddfb6440191e5d8a86a185e2fd 100644 (file)
@@ -27,3 +27,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
index 439fa8fca6962d5035ba22265d82cd6a233e450f..4fcd69c5d67ea636f27895b46d696546a3639c13 100644 (file)
@@ -26,3 +26,5 @@
 ifndef TEXT_BASE
 TEXT_BASE = 0xeff80000
 endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
index 885215799e6bde51c9b5e65c0a44d764e6826248..8cfd60c86ca0498665cc3bac36cb5a7ed72c41d2 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -128,6 +128,10 @@ ifneq ($(TEXT_BASE),)
 CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
 endif
 
+ifneq ($(RESET_VECTOR_ADDRESS),)
+CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS)
+endif
+
 ifneq ($(OBJTREE),$(SRCTREE))
 CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include
 endif
index d6e22a7210ec3be951337fc482b5b15a24da0459..ec4787157ccb0390a41f64b7a63fd0df421a7566 100644 (file)
  * MA 02111-1307 USA
  */
 
+#ifndef RESET_VECTOR_ADDRESS
+#define RESET_VECTOR_ADDRESS   0xfffffffc
+#endif
+
 OUTPUT_ARCH(powerpc)
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
@@ -116,17 +120,17 @@ SECTIONS
   . = ALIGN(256);
   __init_end = .;
 
-  .bootpg ADDR(.text) + 0x7f000 :
+  .bootpg RESET_VECTOR_ADDRESS - 0xffc :
   {
     cpu/mpc85xx/start.o        (.bootpg)
   } :text = 0xffff
 
-  .resetvec ADDR(.text) + 0x7fffc :
+  .resetvec RESET_VECTOR_ADDRESS :
   {
     *(.resetvec)
   } :text = 0xffff
 
-  . = ADDR(.text) + 0x80000;
+  . = RESET_VECTOR_ADDRESS + 0x4;
 
   __bss_start = .;
   .bss (NOLOAD)       :