aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorWolfgang Denk <wd@pollux.denx.de>2006-10-24 14:21:16 +0200
committerWolfgang Denk <wd@pollux.denx.de>2006-10-24 14:21:16 +0200
commit7b64fef33c66be648826c0ff9758298ef13d0604 (patch)
treeea8a3685319987b5d135c2f48e9bc1eee4720640 /examples
parent2da2d9a4766063b9848f3a35ad6025499cf87265 (diff)
downloadu-boot-7b64fef33c66be648826c0ff9758298ef13d0604.zip
u-boot-7b64fef33c66be648826c0ff9758298ef13d0604.tar.gz
u-boot-7b64fef33c66be648826c0ff9758298ef13d0604.tar.bz2
Add AVR32 architecture support
Patch by Haavard Skinnemoen, 6 Sep 2006 16:23:02 +0200 This patch adds common infrastructure code for the Atmel AVR32 architecture. See doc/README.AVR32 for details. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile4
-rw-r--r--examples/stubs.c13
2 files changed, 17 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile
index 680fe75..423a79b 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -57,6 +57,10 @@ ifeq ($(ARCH),blackfin)
LOAD_ADDR = 0x1000
endif
+ifeq ($(ARCH),avr32)
+LOAD_ADDR = 0x00000000
+endif
+
include $(TOPDIR)/config.mk
ELF = hello_world
diff --git a/examples/stubs.c b/examples/stubs.c
index 1caa575..ffd314e 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -138,6 +138,19 @@ gd_t *global_data;
" P0 = [P0 + %1]\n" \
" JUMP (P0)\n" \
: : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "P0");
+#elif defined(CONFIG_AVR32)
+/*
+ * r6 holds the pointer to the global_data. r8 is call clobbered.
+ */
+#define EXPORT_FUNC(x) \
+ asm volatile( \
+ " .globl\t" #x "\n" \
+ #x ":\n" \
+ " ld.w r8, r6[%0]\n" \
+ " ld.w pc, r8[%1]\n" \
+ : \
+ : "i"(offsetof(gd_t, jt)), "i"(XF_ ##x) \
+ : "r8");
#else
#error stubs definition missing for this architecture
#endif