diff options
author | Serah Peterson <speterson@phytec.com> | 2013-06-24 14:09:25 -0700 |
---|---|---|
committer | Anthony Felice <tony.felice@timesys.com> | 2013-08-28 18:26:23 -0400 |
commit | 67df987a2664c54a350591df00ff4dc82b8f5dff (patch) | |
tree | 1c37b0e06a1882806dfeddc6285d704f24bfcbe3 /drivers | |
parent | f55b7be24bf255c248d2a488f3404f1d908d03a6 (diff) |
pcm052: fec1: support added for ETH1
Signed-off-by: Serah Peterson <speterson@phytec.com>
Diffstat (limited to 'drivers')
-rw-r--r--[-rwxr-xr-x] | drivers/net/fec.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/fec.c b/drivers/net/fec.c index 73f3f2b49a61..2deace6cd4c3 100755..100644 --- a/drivers/net/fec.c +++ b/drivers/net/fec.c @@ -869,7 +869,9 @@ static int fec_enet_mii_probe(struct net_device *ndev) static int fec_enet_mii_init(struct platform_device *pdev) { +#if !(defined(CONFIG_MACH_PCM052) || defined(CONFIG_MACH_PCL052)) static struct mii_bus *fec0_mii_bus; +#endif struct net_device *ndev = platform_get_drvdata(pdev); struct fec_enet_private *fep = netdev_priv(ndev); const struct platform_device_id *id_entry = @@ -892,11 +894,18 @@ static int fec_enet_mii_init(struct platform_device *pdev) * mdio interface in board design, and need to be configured by * fec0 mii_bus. */ + /* + * SP: Modified for dual fec interfaces on the phyCORE-Vybrid + * - fec0 and fec1 must be on different mdio interfaces + * - configured by fep -> mii_bus instead of fec0 mii_bus + */ +#if !(defined(CONFIG_MACH_PCM052) || defined(CONFIG_MACH_PCL052)) if ((id_entry->driver_data & FEC_QUIRK_ENET_MAC) && pdev->id) { /* fec1 uses fec0 mii_bus */ fep->mii_bus = fec0_mii_bus; return 0; } +#endif fep->mii_timeout = 0; @@ -905,7 +914,6 @@ static int fec_enet_mii_init(struct platform_device *pdev) */ fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk), (FEC_ENET_MII_CLK << 2)) << 1; - fep->phy_speed |= 0x10; /* set hold time to 2 internal clock cycle */ @@ -940,9 +948,11 @@ static int fec_enet_mii_init(struct platform_device *pdev) if (mdiobus_register(fep->mii_bus)) goto err_out_free_mdio_irq; +#if !(defined(CONFIG_MACH_PCM052) || defined(CONFIG_MACH_PCL052)) /* save fec0 mii_bus */ if (id_entry->driver_data & FEC_QUIRK_ENET_MAC) fec0_mii_bus = fep->mii_bus; +#endif return 0; |