Commit 29635762 authored by Christian Lamparter's avatar Christian Lamparter Committed by David S. Miller

net: ibm: emac: support RGMII-[RX|TX]ID phymode

The RGMII spec allows compliance for devices that implement an internal
delay on TXC and/or RXC inside the transmitter. This patch adds the
necessary RGMII_[RX|TX]ID mode code to handle such PHYs with the
emac driver.
Signed-off-by: default avatarChristian Lamparter <chunkeey@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78b69921
...@@ -199,8 +199,8 @@ static void __emac_set_multicast_list(struct emac_instance *dev); ...@@ -199,8 +199,8 @@ static void __emac_set_multicast_list(struct emac_instance *dev);
static inline int emac_phy_supports_gige(int phy_mode) static inline int emac_phy_supports_gige(int phy_mode)
{ {
return phy_mode == PHY_INTERFACE_MODE_GMII || return phy_interface_mode_is_rgmii(phy_mode) ||
phy_mode == PHY_INTERFACE_MODE_RGMII || phy_mode == PHY_INTERFACE_MODE_GMII ||
phy_mode == PHY_INTERFACE_MODE_SGMII || phy_mode == PHY_INTERFACE_MODE_SGMII ||
phy_mode == PHY_INTERFACE_MODE_TBI || phy_mode == PHY_INTERFACE_MODE_TBI ||
phy_mode == PHY_INTERFACE_MODE_RTBI; phy_mode == PHY_INTERFACE_MODE_RTBI;
......
...@@ -52,9 +52,9 @@ ...@@ -52,9 +52,9 @@
/* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */ /* RGMII bridge supports only GMII/TBI and RGMII/RTBI PHYs */
static inline int rgmii_valid_mode(int phy_mode) static inline int rgmii_valid_mode(int phy_mode)
{ {
return phy_mode == PHY_INTERFACE_MODE_GMII || return phy_interface_mode_is_rgmii(phy_mode) ||
phy_mode == PHY_INTERFACE_MODE_GMII ||
phy_mode == PHY_INTERFACE_MODE_MII || phy_mode == PHY_INTERFACE_MODE_MII ||
phy_mode == PHY_INTERFACE_MODE_RGMII ||
phy_mode == PHY_INTERFACE_MODE_TBI || phy_mode == PHY_INTERFACE_MODE_TBI ||
phy_mode == PHY_INTERFACE_MODE_RTBI; phy_mode == PHY_INTERFACE_MODE_RTBI;
} }
...@@ -63,6 +63,9 @@ static inline u32 rgmii_mode_mask(int mode, int input) ...@@ -63,6 +63,9 @@ static inline u32 rgmii_mode_mask(int mode, int input)
{ {
switch (mode) { switch (mode) {
case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII:
case PHY_INTERFACE_MODE_RGMII_ID:
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII_TXID:
return RGMII_FER_RGMII(input); return RGMII_FER_RGMII(input);
case PHY_INTERFACE_MODE_TBI: case PHY_INTERFACE_MODE_TBI:
return RGMII_FER_TBI(input); return RGMII_FER_TBI(input);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment