Browse Source

make smc91111_eeprom managment simpler by depending on the board configuration file rather than a hardcoded list of boards

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger 17 years ago
parent
commit
32a9f5f216
3 changed files with 14 additions and 5 deletions
  1. 1 0
      examples/.gitignore
  2. 1 5
      examples/Makefile
  3. 12 0
      examples/smc91111_eeprom.c

+ 1 - 0
examples/.gitignore

@@ -1,5 +1,6 @@
 /hello_world
 /interrupt
 /sched
+/smc91111_eeprom
 *.bin
 *.srec

+ 1 - 5
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...

+ 12 - 0
examples/smc91111_eeprom.c

@@ -31,6 +31,8 @@
 #include <exports.h>
 #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