]> git.sur5r.net Git - u-boot/blobdiff - examples/standalone/smc91111_eeprom.c
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[u-boot] / examples / standalone / smc91111_eeprom.c
index 89afc871fa70283cf5963448f5e4fa57188863f0..c98b0fc075630b936dcab85b11ec6f54b8847383 100644 (file)
 
 #include <common.h>
 #include <exports.h>
-/* the smc91111.h gets base addr through eth_device' iobase */
-struct eth_device { unsigned long iobase; };
 #include "../drivers/net/smc91111.h"
 
-#ifdef CONFIG_SMC91111
-
 #ifndef SMC91111_EEPROM_INIT
 # define SMC91111_EEPROM_INIT()
 #endif
@@ -52,14 +48,13 @@ void print_MAC (struct eth_device *dev);
 int read_eeprom_reg (struct eth_device *dev, int reg);
 void print_macaddr (struct eth_device *dev);
 
-int smc91111_eeprom (int argc, char *argv[])
+int smc91111_eeprom (int argc, char * const argv[])
 {
        int c, i, j, done, line, reg, value, start, what;
        char input[50];
 
-       struct eth_device dev = {
-               .iobase = CONFIG_SMC91111_BASE
-       };
+       struct eth_device dev;
+       dev.iobase = CONFIG_SMC91111_BASE;
 
        /* Print the ABI version */
        app_startup (argv);
@@ -391,13 +386,3 @@ void dump_reg (struct eth_device *dev)
                printf ("\n");
        }
 }
-
-#else
-
-int smc91111_eeprom (int argc, char *argv[])
-{
-       printf("Not supported for this board\n");
-       return 1;
-}
-
-#endif