summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Gala <[email protected]>2009-09-09 11:40:41 -0500
committerTom Rix <[email protected]>2009-10-03 09:04:17 -0500
commitbbff2d2861a1210cc6ab2a871cdd82f195905b2f (patch)
treefd74dde1ffbf7a18afe87d161837a283ef43f0bc
parent5079ae4a203c8deb6fe58584ef151d5113ea1b54 (diff)
ppc/85xx: Introduce RESET_VECTOR_ADDRESS to handle non-standard link address
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 <[email protected]> Acked-by: Wolfgang Denk <[email protected]>
-rw-r--r--board/freescale/mpc8536ds/config.mk2
-rw-r--r--board/freescale/mpc8572ds/config.mk2
-rw-r--r--board/freescale/p1_p2_rdb/config.mk2
-rw-r--r--board/freescale/p2020ds/config.mk2
-rw-r--r--config.mk4
-rw-r--r--cpu/mpc85xx/u-boot.lds10
6 files changed, 19 insertions, 3 deletions
diff --git a/board/freescale/mpc8536ds/config.mk b/board/freescale/mpc8536ds/config.mk
index f03087620a3..c1d0525678e 100644
--- a/board/freescale/mpc8536ds/config.mk
+++ b/board/freescale/mpc8536ds/config.mk
@@ -26,3 +26,5 @@
ifndef TEXT_BASE
TEXT_BASE = 0xeff80000
endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
diff --git a/board/freescale/mpc8572ds/config.mk b/board/freescale/mpc8572ds/config.mk
index 08b61f09ab2..67394c9b718 100644
--- a/board/freescale/mpc8572ds/config.mk
+++ b/board/freescale/mpc8572ds/config.mk
@@ -26,3 +26,5 @@
ifndef TEXT_BASE
TEXT_BASE = 0xeff80000
endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
diff --git a/board/freescale/p1_p2_rdb/config.mk b/board/freescale/p1_p2_rdb/config.mk
index abd64bbbec0..a56b5366b75 100644
--- a/board/freescale/p1_p2_rdb/config.mk
+++ b/board/freescale/p1_p2_rdb/config.mk
@@ -27,3 +27,5 @@
ifndef TEXT_BASE
TEXT_BASE = 0xeff80000
endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
diff --git a/board/freescale/p2020ds/config.mk b/board/freescale/p2020ds/config.mk
index 439fa8fca69..4fcd69c5d67 100644
--- a/board/freescale/p2020ds/config.mk
+++ b/board/freescale/p2020ds/config.mk
@@ -26,3 +26,5 @@
ifndef TEXT_BASE
TEXT_BASE = 0xeff80000
endif
+
+RESET_VECTOR_ADDRESS = 0xeffffffc
diff --git a/config.mk b/config.mk
index 885215799e6..8cfd60c86ca 100644
--- 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
diff --git a/cpu/mpc85xx/u-boot.lds b/cpu/mpc85xx/u-boot.lds
index d6e22a7210e..ec4787157cc 100644
--- a/cpu/mpc85xx/u-boot.lds
+++ b/cpu/mpc85xx/u-boot.lds
@@ -20,6 +20,10 @@
* 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) :