Add ADI Blackfin support
- add support for Analog Devices Blackfin BF533 CPU
- add support for the ADI BF533 Stamp uClinux board
- add support for the ADI BF533 EZKit board
Patches by Richard Klingler, June 11th 2005:
diff --git a/examples/Makefile b/examples/Makefile
index 2f8c4c4..fee2674 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -53,6 +53,10 @@
 LOAD_ADDR = 0x80F00000
 endif
 
+ifeq ($(ARCH),blackfin)
+LOAD_ADDR = 0x1000
+endif
+
 include $(TOPDIR)/config.mk
 
 SREC	= hello_world.srec
@@ -73,6 +77,11 @@
 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 @@
 
 			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..1797274 100644
--- a/examples/stubs.c
+++ b/examples/stubs.c
@@ -125,6 +125,19 @@
 "	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