#include <common.h>
#include <exports.h>
-#include "../drivers/smc91111.h"
+#include "../drivers/net/smc91111.h"
+
+#ifdef CONFIG_DRIVER_SMC91111
+
+#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);
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;");
+ SMC91111_EEPROM_INIT();
if ((SMC_inw (BANK_SELECT) & 0xFF00) != 0x3300) {
printf ("Can't find SMSC91111\n");
printf ("\n");
}
}
+
+#else
+
+int smc91111_eeprom (int argc, char *argv[])
+{
+ printf("Not supported for this board\n");
+ return 1;
+}
+
+#endif