From b45264ee85cbd92020640a32e02fb434fd557108 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Feb 2008 19:26:53 -0500 Subject: add gitignores for Blackfin pieces Signed-off-by: Mike Frysinger --- examples/smc91111_eeprom | Bin 0 -> 13643 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100755 examples/smc91111_eeprom (limited to 'examples') diff --git a/examples/smc91111_eeprom b/examples/smc91111_eeprom new file mode 100755 index 0000000..1009fec Binary files /dev/null and b/examples/smc91111_eeprom differ -- cgit v1.1 From 32a9f5f2160a034ea87ea651b233ef7c635e55cf Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Feb 2008 19:26:54 -0500 Subject: make smc91111_eeprom managment simpler by depending on the board configuration file rather than a hardcoded list of boards Signed-off-by: Mike Frysinger --- examples/.gitignore | 1 + examples/Makefile | 6 +----- examples/smc91111_eeprom.c | 12 ++++++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/.gitignore b/examples/.gitignore index f547024..059b096 100644 --- a/examples/.gitignore +++ b/examples/.gitignore @@ -1,5 +1,6 @@ /hello_world /interrupt /sched +/smc91111_eeprom *.bin *.srec diff --git a/examples/Makefile b/examples/Makefile index 71a8c7f..79af4b0 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -91,13 +91,9 @@ BIN += sched.bin endif ifeq ($(ARCH),blackfin) -ifneq ($(BOARD),bf537-stamp) -ifneq ($(BOARD),bf537-pnav) ELF += smc91111_eeprom SREC += smc91111_eeprom.srec -BIN += smc91111_eeprom.bin -endif -endif +BIN += smc91111_eeprom.bin endif # The following example is pretty 8xx specific... diff --git a/examples/smc91111_eeprom.c b/examples/smc91111_eeprom.c index b8a3594..1e1129a 100644 --- a/examples/smc91111_eeprom.c +++ b/examples/smc91111_eeprom.c @@ -31,6 +31,8 @@ #include #include "../drivers/net/smc91111.h" +#ifdef CONFIG_DRIVER_SMC91111 + #define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE #define EEPROM 0x1; #define MAC 0x2; @@ -387,3 +389,13 @@ void dump_reg (void) printf ("\n"); } } + +#else + +int smc91111_eeprom (int argc, char *argv[]) +{ + printf("Not supported for this board\n"); + return 1; +} + +#endif -- cgit v1.1 From 0858b835e7ea501ea084d34cef75932f098342bb Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Feb 2008 19:26:55 -0500 Subject: add support for Blackfin symbol prefixes to examples Signed-off-by: Mike Frysinger --- examples/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/Makefile b/examples/Makefile index 79af4b0..d63fa70 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -162,7 +162,7 @@ $(LIB): $(obj).depend $(LIBOBJS) $(ELF): $(obj)%: $(obj)%.o $(LIB) $(LD) -g $(EX_LDFLAGS) -Ttext $(LOAD_ADDR) \ - -o $@ -e $(notdir $(<:.o=)) $< $(LIB) \ + -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ -L$(gcclibdir) -lgcc $(SREC): -- cgit v1.1 From 6b9097e5e7490aa7b828c6f1a1c7a0e875df8464 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Feb 2008 19:26:56 -0500 Subject: use C code rather than inline assembly Signed-off-by: Mike Frysinger --- examples/smc91111_eeprom.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'examples') diff --git a/examples/smc91111_eeprom.c b/examples/smc91111_eeprom.c index 1e1129a..f5d8c6a 100644 --- a/examples/smc91111_eeprom.c +++ b/examples/smc91111_eeprom.c @@ -33,6 +33,11 @@ #ifdef CONFIG_DRIVER_SMC91111 +#ifdef pFIO0_DIR +# define pFIO_DIR pFIO0_DIR +# define pFIO_FLAG_S pFIO0_FLAG_S +#endif + #define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE #define EEPROM 0x1; #define MAC 0x2; @@ -61,17 +66,9 @@ int smc91111_eeprom (int argc, char *argv[]) return (0); } - asm ("p2.h = 0xFFC0;"); - asm ("p2.l = 0x0730;"); - asm ("r0 = 0x01;"); - asm ("w[p2] = r0;"); - asm ("ssync;"); - - asm ("p2.h = 0xffc0;"); - asm ("p2.l = 0x0708;"); - asm ("r0 = 0x01;"); - asm ("w[p2] = r0;"); - asm ("ssync;"); + *pFIO_DIR = 0x01; + *pFIO_FLAG_S = 0x01; + SSYNC(); if ((SMC_inw (BANK_SELECT) & 0xFF00) != 0x3300) { printf ("Can't find SMSC91111\n"); -- cgit v1.1 From e7670f6c1e52ae6d2a43ff75a8bcfa7a5c86e47b Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 14 Feb 2008 22:43:22 +0100 Subject: PPC: Use r2 instead of r29 as global data pointer R29 was an unlucky choice as with recent toolchains (gcc-4.2.x) gcc will refuse to use load/store multiple insns; instead, it issues a list of simple load/store instructions upon function entry and exit, resulting in bigger code size, which in turn makes the build for a few boards fail. Use r2 instead. Signed-off-by: Wolfgang Denk --- examples/stubs.c | 4 ++-- examples/test_burst_lib.S | 2 +- examples/x86-testapp.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'examples') diff --git a/examples/stubs.c b/examples/stubs.c index 571c4d5..9b3cadd 100644 --- a/examples/stubs.c +++ b/examples/stubs.c @@ -25,14 +25,14 @@ gd_t *global_data; : : "i"(XF_ ## x * sizeof(void *)) : "eax", "ecx"); #elif defined(CONFIG_PPC) /* - * r29 holds the pointer to the global_data, r11 is a call-clobbered + * r2 holds the pointer to the global_data, r11 is a call-clobbered * register */ #define EXPORT_FUNC(x) \ asm volatile ( \ " .globl " #x "\n" \ #x ":\n" \ -" lwz %%r11, %0(%%r29)\n" \ +" lwz %%r11, %0(%%r2)\n" \ " lwz %%r11, %1(%%r11)\n" \ " mtctr %%r11\n" \ " bctr\n" \ diff --git a/examples/test_burst_lib.S b/examples/test_burst_lib.S index 5bb4981..aef4e32 100644 --- a/examples/test_burst_lib.S +++ b/examples/test_burst_lib.S @@ -70,7 +70,7 @@ mmu_init: * we can load the instruction and data TLB registers with the * same values. */ - lwz r9,20(r29) /* gd->ram_size */ + lwz r9,20(r2) /* gd->ram_size */ addis r9,r9,-0x80 mr r8, r9 /* Higher 8 Meg in SDRAM */ diff --git a/examples/x86-testapp.c b/examples/x86-testapp.c index a1ab319..e8603d9 100644 --- a/examples/x86-testapp.c +++ b/examples/x86-testapp.c @@ -30,11 +30,11 @@ asm volatile ( \ asm volatile ( \ " .globl mon_" #x "\n" \ "mon_" #x ":\n" \ -" lwz %%r11, %0(%%r29)\n" \ +" lwz %%r11, %0(%%r2)\n" \ " lwz %%r11, %1(%%r11)\n" \ " mtctr %%r11\n" \ " bctr\n" \ - : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r29"); + : : "i"(offsetof(xxx_t, pfunc)), "i"(XF_ ## x * sizeof(void *)) : "r11", "r2"); #elif defined(__arm__) #define EXPORT_FUNC(x) \ asm volatile ( \ @@ -67,7 +67,7 @@ int main(void) #if defined(__i386__) xxx_t *pq; #elif defined(__powerpc__) - register volatile xxx_t *pq asm("r29"); + register volatile xxx_t *pq asm("r2"); #elif defined(__arm__) register volatile xxx_t *pq asm("r8"); #elif defined(__mips__) -- cgit v1.1 From 375c4353db8f900f7ec772e26fab116ec00f7d3a Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Sun, 17 Feb 2008 15:43:44 +0100 Subject: Remove files added by mistake, update CHANGELOG. Signed-off-by: Wolfgang Denk --- examples/smc91111_eeprom | Bin 13643 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100755 examples/smc91111_eeprom (limited to 'examples') diff --git a/examples/smc91111_eeprom b/examples/smc91111_eeprom deleted file mode 100755 index 1009fec..0000000 Binary files a/examples/smc91111_eeprom and /dev/null differ -- cgit v1.1