Skip to contentSkip to conversation

ColdFire: Add mii driver in drivers/net

PATCH New Tsi-Chung Liew 3 participants 3 messages Oct 23, 2008 – Nov 4, 2008 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH v2 5/9 ColdFire: Add mii driver in drivers/net

From: TsiChung Liew <[email protected]>

All CF platforms' mii.c are consolidated into one

---
 drivers/net/Makefile |    4 +-
 drivers/net/mcffec.c |   18 +---
 drivers/net/mcfmii.c |  321 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 326 insertions(+), 17 deletions(-)
 create mode 100644 drivers/net/mcfmii.c
drivers/net/Makefile +2 -2
index 439c354..7e53136 100644
@@ -35,13 +35,13 @@ COBJS-$(CONFIG_DRIVER_DM9000) += dm9000x.o
 COBJS-$(CONFIG_E1000) += e1000.o
 COBJS-$(CONFIG_EEPRO100) += eepro100.o
 COBJS-$(CONFIG_ENC28J60) += enc28j60.o
-COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o
+COBJS-$(CONFIG_FSLDMAFEC) += fsl_mcdmafec.o mcfmii.o
 COBJS-$(CONFIG_GRETH) += greth.o
 COBJS-$(CONFIG_INCA_IP_SWITCH) += inca-ip_sw.o
 COBJS-$(CONFIG_DRIVER_KS8695ETH) += ks8695eth.o
 COBJS-$(CONFIG_DRIVER_LAN91C96) += lan91c96.o
 COBJS-$(CONFIG_MACB) += macb.o
-COBJS-$(CONFIG_MCFFEC) += mcffec.o
+COBJS-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o
 COBJS-$(CONFIG_MPC5xxx_FEC) += mpc5xxx_fec.o
 COBJS-$(CONFIG_MPC512x_FEC) += mpc512x_fec.o
 COBJS-$(CONFIG_NATSEMI) += natsemi.o
drivers/net/mcffec.c +3 -15
index c00474e..18240a8 100644
@@ -27,14 +27,14 @@
 #include <common.h>
 #include <malloc.h>
 
-#include <asm/fec.h>
-#include <asm/immap.h>
-
 #include <command.h>
 #include <net.h>
 #include <netdev.h>
 #include <miiphy.h>
 
+#include <asm/fec.h>
+#include <asm/immap.h>
+
 #undef	ET_DEBUG
 #undef	MII_DEBUG
 
@@ -101,18 +101,6 @@ int fec_init(struct eth_device *dev, bd_t * bd);
 void fec_halt(struct eth_device *dev);
 void fec_reset(struct eth_device *dev);
 
-extern int fecpin_setclear(struct eth_device *dev, int setclear);
-
-#ifdef CONFIG_SYS_DISCOVER_PHY
-extern void __mii_init(void);
-extern uint mii_send(uint mii_cmd);
-extern int mii_discover_phy(struct eth_device *dev);
-extern int mcffec_miiphy_read(char *devname, unsigned char addr,
-			      unsigned char reg, unsigned short *value);
-extern int mcffec_miiphy_write(char *devname, unsigned char addr,
-			       unsigned char reg, unsigned short value);
-#endif
-
 void setFecDuplexSpeed(volatile fec_t * fecp, bd_t * bd, int dup_spd)
 {
 	if ((dup_spd >> 16) == FULL) {
drivers/net/mcfmii.c new file +321 -0

321 lines not on this page · raw message

Signature · 1 line
1.5.6.4
#1 lore raw

PATCH v2 5/9 ColdFire: Add mii driver in drivers/net

Ben,

Do you want to pick this up or is it ok if it goes in via the coldfire tree?

John

Applied
#2 lore raw

PATCH v2 5/9 ColdFire: Add mii driver in drivers/net

In reply to Tsi-Chung Liew
Quoted 4 lines · Tsi-Chung Liew

From: TsiChung Liew <[email protected]>

All CF platforms' mii.c are consolidated into one

Quoted 9 lines
---
 drivers/net/Makefile |    4 +-
 drivers/net/mcffec.c |   18 +---
 drivers/net/mcfmii.c |  321 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 326 insertions(+), 17 deletions(-)
 create mode 100644 drivers/net/mcfmii.c

<snip>

Applied to net repo.

thanks,
Ben