diff options
author | Markus Klotzbuecher <mk@denx.de> | 2006-03-24 15:43:16 +0100 |
---|---|---|
committer | Markus Klotzbücher <mk@pollux.denx.de> | 2006-03-24 15:43:16 +0100 |
commit | 2770bcb21c82835a5351176e5b2a9221d7fc8ef9 (patch) | |
tree | 78edf9afc584e1a76d219bd64d260224a84f0d10 /examples | |
parent | 0b953ffc653fc5ab3d3fa47abf0dd9b8bd0703f5 (diff) | |
parent | 05d8dce9d07cf4073ea15fbc448c1ce22b6baf0f (diff) | |
download | u-boot-imx-2770bcb21c82835a5351176e5b2a9221d7fc8ef9.zip u-boot-imx-2770bcb21c82835a5351176e5b2a9221d7fc8ef9.tar.gz u-boot-imx-2770bcb21c82835a5351176e5b2a9221d7fc8ef9.tar.bz2 |
Merge with http://www.denx.de/git/u-boot.git
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Makefile | 9 | ||||
-rw-r--r-- | examples/smc91111_eeprom.c | 6 | ||||
-rw-r--r-- | examples/stubs.c | 13 |
3 files changed, 24 insertions, 4 deletions
diff --git a/examples/Makefile b/examples/Makefile index 2f8c4c4..fee2674 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -53,6 +53,10 @@ ifeq ($(ARCH),microblaze) LOAD_ADDR = 0x80F00000 endif +ifeq ($(ARCH),blackfin) +LOAD_ADDR = 0x1000 +endif + include $(TOPDIR)/config.mk SREC = hello_world.srec @@ -73,6 +77,11 @@ SREC += sched.srec BIN += sched.bin sched endif +ifeq ($(ARCH),blackfin) +SREC += smc91111_eeprom.srec +BIN += smc91111_eeprom.bin smc91111_eeprom +endif + # The following example is pretty 8xx specific... ifeq ($(CPU),mpc8xx) SREC += timer.srec diff --git a/examples/smc91111_eeprom.c b/examples/smc91111_eeprom.c index 885f933..98e3e86 100644 --- a/examples/smc91111_eeprom.c +++ b/examples/smc91111_eeprom.c @@ -214,13 +214,11 @@ int smc91111_eeprom (int argc, char *argv[]) switch (what) { case 1: - printf ("Writing EEPROM register %02x with %04x\n", - reg, value); + printf ("Writing EEPROM register %02x with %04x\n", reg, value); write_eeprom_reg (value, reg); break; case 2: - printf ("Writing MAC register bank %i, - reg %02x with %04x\n", reg >> 4, reg & 0xE, value); + printf ("Writing MAC register bank %i, reg %02x with %04x\n", reg >> 4, reg & 0xE, value); SMC_SELECT_BANK (reg >> 4); SMC_outw (value, reg & 0xE); break; diff --git a/examples/stubs.c b/examples/stubs.c index d4c6e06..250a9af 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -125,6 +125,19 @@ gd_t *global_data; " lwi r5, r5, %1\n" \ " bra r5\n" \ : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "r5"); +#elif defined(CONFIG_BLACKFIN) +/* + * P5 holds the pointer to the global_data, P0 is a call-clobbered + * register + */ +#define EXPORT_FUNC(x) \ + asm volatile ( \ +" .globl " #x "\n" \ +#x ":\n" \ +" P0 = [P5 + %0]\n" \ +" P0 = [P0 + %1]\n" \ +" JUMP (P0)\n" \ + : : "i"(offsetof(gd_t, jt)), "i"(XF_ ## x * sizeof(void *)) : "P0"); #else #error stubs definition missing for this architecture #endif |