[U-Boot] [PATCH] smc91111_eeprom: get working with net multi conversion
Mike Frysinger
vapier at gentoo.org
Wed Sep 16 04:37:27 CEST 2009
This should be squashed into the pending:
Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API
The changes to the eeprom were incomplete, and the new version needs
slightly different handling on the BF533 boards that share flash.
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
examples/standalone/smc91111_eeprom.c | 4 +++-
include/configs/bf533-ezkit.h | 5 +++--
include/configs/bf533-stamp.h | 5 +++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c
index a38cc4d..89afc87 100644
--- a/examples/standalone/smc91111_eeprom.c
+++ b/examples/standalone/smc91111_eeprom.c
@@ -29,9 +29,11 @@
#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_DRIVER_SMC91111
+#ifdef CONFIG_SMC91111
#ifndef SMC91111_EEPROM_INIT
# define SMC91111_EEPROM_INIT()
diff --git a/include/configs/bf533-ezkit.h b/include/configs/bf533-ezkit.h
index 8f23f1d..cee33f2 100644
--- a/include/configs/bf533-ezkit.h
+++ b/include/configs/bf533-ezkit.h
@@ -70,8 +70,9 @@
#define CONFIG_SMC91111_BASE 0x20310300
#define SMC91111_EEPROM_INIT() \
do { \
- *pFIO_DIR |= PF1; \
- *pFIO_FLAG_S = PF1; \
+ bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF1 | PF0); \
+ bfin_write_FIO_FLAG_C(PF1); \
+ bfin_write_FIO_FLAG_S(PF0); \
SSYNC(); \
} while (0)
#define CONFIG_HOSTNAME bf533-ezkit
diff --git a/include/configs/bf533-stamp.h b/include/configs/bf533-stamp.h
index 56fec53..573d4e5 100644
--- a/include/configs/bf533-stamp.h
+++ b/include/configs/bf533-stamp.h
@@ -65,8 +65,9 @@
#define CONFIG_SMC91111_BASE 0x20300300
#define SMC91111_EEPROM_INIT() \
do { \
- *pFIO_DIR |= PF1; \
- *pFIO_FLAG_S = PF1; \
+ bfin_write_FIO_DIR(bfin_read_FIO_DIR() | PF1 | PF0); \
+ bfin_write_FIO_FLAG_C(PF1); \
+ bfin_write_FIO_FLAG_S(PF0); \
SSYNC(); \
} while (0)
#define CONFIG_HOSTNAME bf533-stamp
--
1.6.5.rc1
More information about the U-Boot
mailing list