summaryrefslogtreecommitdiff
path: root/drivers/net/sh_eth.c
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2012-05-15 15:49:39 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:53:09 -0500
commit4398d55991eb3c2484a2a8e991d701e5d7a64874 (patch)
tree8b34782edfd31c2e5bc96115a42b6f832d952e15 /drivers/net/sh_eth.c
parentee6ec5d4dd50ccf914965f49daa8db9099695596 (diff)
downloadu-boot-imx-4398d55991eb3c2484a2a8e991d701e5d7a64874.zip
u-boot-imx-4398d55991eb3c2484a2a8e991d701e5d7a64874.tar.gz
u-boot-imx-4398d55991eb3c2484a2a8e991d701e5d7a64874.tar.bz2
net: sh-eth: Add support Gigabit of SH7734
SH7734 support GMII. This add register infomation and the function which enable GMII. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Diffstat (limited to 'drivers/net/sh_eth.c')
-rw-r--r--drivers/net/sh_eth.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index 3657bd6..bb57e4d 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -348,7 +348,7 @@ static int sh_eth_phy_config(struct sh_eth_dev *eth)
phydev = phy_connect(
miiphy_get_dev_by_name(dev->name),
- port_info->phy_addr, dev, PHY_INTERFACE_MODE_MII);
+ port_info->phy_addr, dev, CONFIG_SH_ETHER_PHY_MODE);
port_info->phydev = phydev;
phy_config(phydev);
@@ -405,6 +405,9 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd)
outl(TPAUSER_UNLIMITED, TPAUSER(port));
#endif
+#if defined(CONFIG_CPU_SH7734)
+ outl(CONFIG_SH_ETHER_SH7734_MII, RMII_MII(port));
+#endif
/* Configure phy */
ret = sh_eth_phy_config(eth);
if (ret) {
@@ -434,6 +437,12 @@ static int sh_eth_config(struct sh_eth_dev *eth, bd_t *bd)
outl(0, RTRATE(port));
#endif
}
+#if defined(CONFIG_CPU_SH7763) || defined(CONFIG_CPU_SH7734)
+ else if (phy->speed == 1000) {
+ printf(SHETHER_NAME ": 1000Base/");
+ outl(GECMR_1000B, GECMR(port));
+ }
+#endif
/* Check if full duplex mode is supported by the phy */
if (phy->duplex) {