]> git.sur5r.net Git - u-boot/commitdiff
smc91111_eeprom: move board-specific init into SMC91111_EEPROM_INIT()
authorMike Frysinger <vapier@gentoo.org>
Mon, 23 Mar 2009 02:18:01 +0000 (22:18 -0400)
committerWolfgang Denk <wd@denx.de>
Sat, 4 Apr 2009 20:40:45 +0000 (22:40 +0200)
Rather than sticking Blackfin-specific stuff into the eeprom example, use
an indirect macro so that any board can override it with their own magic
sauce in their board config file.

Also fix some spurious semi-colons in defines while I'm at it ...

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
examples/smc91111_eeprom.c

index 62347c7e325f09cb2e9eb338211f7225e5c44c39..39e530648d6d6baac39daf43b8622a3b9a0e8509 100644 (file)
 
 #ifdef CONFIG_DRIVER_SMC91111
 
-#ifdef pFIO0_DIR
-# define pFIO_DIR    pFIO0_DIR
-# define pFIO_FLAG_S pFIO0_FLAG_S
+#ifndef SMC91111_EEPROM_INIT
+# define SMC91111_EEPROM_INIT()
 #endif
 
 #define SMC_BASE_ADDRESS CONFIG_SMC91111_BASE
-#define EEPROM         0x1;
-#define MAC            0x2;
-#define        UNKNOWN         0x4;
+#define EEPROM         0x1
+#define MAC            0x2
+#define UNKNOWN                0x4
 
 void dump_reg (void);
 void dump_eeprom (void);
@@ -66,9 +65,7 @@ int smc91111_eeprom (int argc, char *argv[])
                return (0);
        }
 
-       *pFIO_DIR = 0x01;
-       *pFIO_FLAG_S = 0x01;
-       SSYNC();
+       SMC91111_EEPROM_INIT();
 
        if ((SMC_inw (BANK_SELECT) & 0xFF00) != 0x3300) {
                printf ("Can't find SMSC91111\n");