diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-03-20 10:42:05 -0600 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-03-20 10:42:05 -0600 |
commit | f8edca2e9a128f526b1fe6f997f7adb852cf5b3c (patch) | |
tree | 92deb9ddf1153c64ff1ced9392816e60b4ecaa03 /examples | |
parent | 79582020313e6d992a3bac71cf3a9b337f9ac7f7 (diff) | |
parent | 7b4fd36b0322ec98836a8459d9be80e2777fdc05 (diff) | |
download | u-boot-imx-f8edca2e9a128f526b1fe6f997f7adb852cf5b3c.zip u-boot-imx-f8edca2e9a128f526b1fe6f997f7adb852cf5b3c.tar.gz u-boot-imx-f8edca2e9a128f526b1fe6f997f7adb852cf5b3c.tar.bz2 |
Merge branch 'origin'
Conflicts:
CHANGELOG
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 |