net: sh_eth: Add RMII mode setting in probe
authorHisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Thu, 13 Nov 2014 06:54:05 +0000 (15:54 +0900)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Nov 2014 20:03:53 +0000 (15:03 -0500)
When using RMMI mode, it is necessary to change in probe.

Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c

index dbe860650bfe3cfed8a2a59ec32dabd548a5606c..1f79ed61f9cd75ca102e87849cd727a66caf85e1 100644 (file)
@@ -1,5 +1,6 @@
 /*  SuperH Ethernet device driver
  *
+ *  Copyright (C) 2014  Renesas Electronics Corporation
  *  Copyright (C) 2006-2012 Nobuhiro Iwamatsu
  *  Copyright (C) 2008-2014 Renesas Solutions Corp.
  *  Copyright (C) 2013-2014 Cogent Embedded, Inc.
@@ -2883,6 +2884,9 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
                }
        }
 
+       if (mdp->cd->rmiimode)
+               sh_eth_write(ndev, 0x1, RMIIMODE);
+
        /* MDIO bus init */
        ret = sh_mdio_init(mdp, pd);
        if (ret) {