diff options
author | Andy Fleming <afleming@freescale.com> | 2007-07-11 12:43:07 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-18 18:29:37 -0400 |
commit | 7132ab7f6e0309bb8e0424e395ba149aee0c750e (patch) | |
tree | b947434ef6edefdbe683b4a6c5740ccec977bc4e /drivers/net/gianfar.c | |
parent | af2d940df2b60b15c271033d381c2f3ead655562 (diff) |
Fix RGMII-ID handling in gianfar
The TSEC/eTSEC can detect the interface to the PHY automatically,
but it isn't able to detect whether the RGMII connection needs internal
delay. So we need to detect that change in the device tree, propagate
it to the platform data, and then check it if we're in RGMII. This fixes
a bug on the 8641D HPCN board where the Vitesse PHY doesn't use the delay
for RGMII.
Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index d7a1a58de766..f92690555dd9 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -420,8 +420,18 @@ static phy_interface_t gfar_get_interface(struct net_device *dev) | |||
420 | if (ecntrl & ECNTRL_REDUCED_MODE) { | 420 | if (ecntrl & ECNTRL_REDUCED_MODE) { |
421 | if (ecntrl & ECNTRL_REDUCED_MII_MODE) | 421 | if (ecntrl & ECNTRL_REDUCED_MII_MODE) |
422 | return PHY_INTERFACE_MODE_RMII; | 422 | return PHY_INTERFACE_MODE_RMII; |
423 | else | 423 | else { |
424 | phy_interface_t interface = priv->einfo->interface; | ||
425 | |||
426 | /* | ||
427 | * This isn't autodetected right now, so it must | ||
428 | * be set by the device tree or platform code. | ||
429 | */ | ||
430 | if (interface == PHY_INTERFACE_MODE_RGMII_ID) | ||
431 | return PHY_INTERFACE_MODE_RGMII_ID; | ||
432 | |||
424 | return PHY_INTERFACE_MODE_RGMII; | 433 | return PHY_INTERFACE_MODE_RGMII; |
434 | } | ||
425 | } | 435 | } |
426 | 436 | ||
427 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT) | 437 | if (priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT) |