diff options
author | Vladimir Ermakov <vooon341@gmail.com> | 2012-03-17 17:10:50 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-03-20 02:02:05 +0400 |
commit | ba568335b089e0a27829e3a6117a7e1bf957ad07 (patch) | |
tree | 460d6569c4ad623ec8f1aee8d0fcb571b3ac1b4d /drivers/net/ethernet/freescale/fs_enet/mac-fec.c | |
parent | dc72d99dabb870ca5bd6d9fff674be853bb4a88d (diff) | |
download | linux-ba568335b089e0a27829e3a6117a7e1bf957ad07.tar.xz |
fs_enet: Add MPC5125 FEC support and PHY interface selection
Add compatible string for MPC5125 FEC. The FEC on MPC5125 additionally
supports RMII PHY interface. Configure controller/PHY interface type
according to the optional phy-connection-type property in the ethernet
node. This property should be either "rmii" or "mii".
Signed-off-by: Vladimir Ermakov <vooon341@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fs_enet/mac-fec.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c index b9fbc83d64a7..9ae6cdbcac2e 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mac-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mac-fec.c @@ -322,10 +322,11 @@ static void restart(struct net_device *dev) FW(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */ #else /* - * Only set MII mode - do not touch maximum frame length + * Only set MII/RMII mode - do not touch maximum frame length * configured before. */ - FS(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); + FS(fecp, r_cntrl, fpi->use_rmii ? + FEC_RCNTRL_RMII_MODE : FEC_RCNTRL_MII_MODE); #endif /* * adjust to duplex mode @@ -381,7 +382,9 @@ static void stop(struct net_device *dev) /* shut down FEC1? that's where the mii bus is */ if (fpi->has_phy) { - FS(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */ + FS(fecp, r_cntrl, fpi->use_rmii ? + FEC_RCNTRL_RMII_MODE : + FEC_RCNTRL_MII_MODE); /* MII/RMII enable */ FS(fecp, ecntrl, FEC_ECNTRL_PINMUX | FEC_ECNTRL_ETHER_EN); FW(fecp, ievent, FEC_ENET_MII); FW(fecp, mii_speed, feci->mii_speed); |