diff options
author | Peter Pearse <peter.pearse@arm.com> | 2008-01-07 15:34:22 +0000 |
---|---|---|
committer | Peter Pearse <peter.pearse@arm.com> | 2008-01-07 15:34:22 +0000 |
commit | 4985ca5af3767ffe13ea96e1dc26f88c81084414 (patch) | |
tree | 94db0464d5c7c643816dd3b4e823343496c2ed96 /examples | |
parent | 2ae64f5135e51bb18753884d1265b99e89b5aedd (diff) | |
parent | 5c740711f0ea5b51414b341b71597c4a0751be74 (diff) | |
download | u-boot-imx-4985ca5af3767ffe13ea96e1dc26f88c81084414.zip u-boot-imx-4985ca5af3767ffe13ea96e1dc26f88c81084414.tar.gz u-boot-imx-4985ca5af3767ffe13ea96e1dc26f88c81084414.tar.bz2 |
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'examples')
-rw-r--r-- | examples/.gitignore | 5 | ||||
-rw-r--r-- | examples/Makefile | 5 | ||||
-rw-r--r-- | examples/smc91111_eeprom.c | 2 | ||||
-rw-r--r-- | examples/stubs.c | 18 |
4 files changed, 28 insertions, 2 deletions
diff --git a/examples/.gitignore b/examples/.gitignore new file mode 100644 index 0000000..f547024 --- /dev/null +++ b/examples/.gitignore @@ -0,0 +1,5 @@ +/hello_world +/interrupt +/sched +*.bin +*.srec diff --git a/examples/Makefile b/examples/Makefile index e9b4974..71a8c7f 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/smc91111_eeprom.c b/examples/smc91111_eeprom.c index 98e3e86..b8a3594 100644 --- a/examples/smc91111_eeprom.c +++ b/examples/smc91111_eeprom.c @@ -29,7 +29,7 @@ #include <common.h> #include <exports.h> -#include "../drivers/smc91111.h" +#include "../drivers/net/smc91111.h" #define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE #define EEPROM 0x1; diff --git a/examples/stubs.c b/examples/stubs.c index 26df6e0..571c4d5 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -132,7 +132,7 @@ gd_t *global_data; */ #define EXPORT_FUNC(x) \ asm volatile ( \ -" .globl _" #x "\n_" \ +" .globl _" #x "\n_" \ #x ":\n" \ " P0 = [P5 + %0]\n" \ " P0 = [P0 + %1]\n" \ @@ -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 |