summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-12-27 01:13:05 +0100
committerWolfgang Denk <wd@denx.de>2007-12-27 01:13:05 +0100
commit6e1bbe6e3edf5f508de89114577ce7b7caa89c8a (patch)
tree8a95b158fb4103b1db399342a66ba414aa5e82c1 /examples
parent58bbc77eb0a01033803264539d2c76c242cba210 (diff)
parent81b38be8631a0b809c97ab3d929f491373d7314f (diff)
downloadtalos-obmc-uboot-6e1bbe6e3edf5f508de89114577ce7b7caa89c8a.tar.gz
talos-obmc-uboot-6e1bbe6e3edf5f508de89114577ce7b7caa89c8a.zip
Merge branch 'master' of /home/wd/git/u-boot/custodians
Diffstat (limited to 'examples')
-rw-r--r--examples/Makefile5
-rw-r--r--examples/stubs.c16
2 files changed, 21 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile
index e9b4974be4..71a8c7f3ab 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -61,6 +61,11 @@ ifeq ($(ARCH),avr32)
LOAD_ADDR = 0x00000000
endif
+ifeq ($(ARCH),sh)
+LOAD_ADDR = 0x8C000000
+endif
+
+
include $(TOPDIR)/config.mk
ELF = hello_world
diff --git a/examples/stubs.c b/examples/stubs.c
index 26df6e06a1..263dd8c3de 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -151,6 +151,22 @@ gd_t *global_data;
: \
: "i"(offsetof(gd_t, jt)), "i"(XF_ ##x) \
: "r8");
+#elif defined(CONFIG_SH)
+/*
+ * r13 holds the pointer to the global_data. r1 is a call clobbered.
+ */
+#define EXPORT_FUNC(x) \
+ asm volatile ( \
+ " .align 2\n" \
+ " .globl " #x "\n" \
+ #x ":\n" \
+ " mov r13, r1\n" \
+ " add %0, r1\n" \
+ " add %1, r1\n" \
+ " jmp @r1\n" \
+ " nop\n" \
+ " nop\n" \
+ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r1");
#else
#error stubs definition missing for this architecture
#endif
OpenPOWER on IntegriCloud