Skip to content

Commit

Permalink
drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
Browse files Browse the repository at this point in the history
Enable cpts hardware time stamping for Dra7xx and AM4372.
This enables PTPv2 for DRA7xx and AM4372.

Signed-off-by: George Cherian <george.cherian@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
George Cherian authored and David S. Miller committed May 5, 2014
1 parent d0415e7 commit f7d403c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/net/ethernet/ti/cpsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,8 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
struct hwtstamp_config cfg;

if (priv->version != CPSW_VERSION_1 &&
priv->version != CPSW_VERSION_2)
priv->version != CPSW_VERSION_2 &&
priv->version != CPSW_VERSION_3)
return -EOPNOTSUPP;

if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg)))
Expand Down Expand Up @@ -1443,6 +1444,7 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr)
cpsw_hwtstamp_v1(priv);
break;
case CPSW_VERSION_2:
case CPSW_VERSION_3:
cpsw_hwtstamp_v2(priv);
break;
default:
Expand All @@ -1459,7 +1461,8 @@ static int cpsw_hwtstamp_get(struct net_device *dev, struct ifreq *ifr)
struct hwtstamp_config cfg;

if (priv->version != CPSW_VERSION_1 &&
priv->version != CPSW_VERSION_2)
priv->version != CPSW_VERSION_2 &&
priv->version != CPSW_VERSION_3)
return -EOPNOTSUPP;

cfg.flags = 0;
Expand Down

0 comments on commit f7d403c

Please sign in to comment.