summaryrefslogtreecommitdiff
path: root/drivers/net/designware.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/designware.c')
-rw-r--r--drivers/net/designware.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 9b17db4..8f22e00 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -171,6 +171,13 @@ static int dw_eth_init(struct eth_device *dev, bd_t *bis)
if (priv->speed != SPEED_1000M)
conf |= MII_PORTSELECT;
+ if ((priv->interface != PHY_INTERFACE_MODE_MII) &&
+ (priv->interface != PHY_INTERFACE_MODE_GMII)) {
+
+ if (priv->speed == SPEED_100M)
+ conf |= FES_100;
+ }
+
if (priv->duplex == FULL_DUPLEX)
conf |= FULLDPLXMODE;
@@ -531,7 +538,7 @@ static int dw_mii_write(const char *devname, u8 addr, u8 reg, u16 val)
}
#endif
-int designware_initialize(u32 id, ulong base_addr, u32 phy_addr)
+int designware_initialize(u32 id, ulong base_addr, u32 phy_addr, u32 interface)
{
struct eth_device *dev;
struct dw_eth_dev *priv;
@@ -565,6 +572,7 @@ int designware_initialize(u32 id, ulong base_addr, u32 phy_addr)
DW_DMA_BASE_OFFSET);
priv->address = phy_addr;
priv->phy_configured = 0;
+ priv->interface = interface;
if (mac_reset(dev) < 0)
return -1;