diff options
author | George Cherian <george.cherian@ti.com> | 2014-05-02 02:32:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-05 13:18:50 -0400 |
commit | f7d403cb38cde82778cbb0c2a5a474a014df1771 (patch) | |
tree | 1f00cd49ac8cc713f90b4ac95601f61d9f8df386 /drivers/net/ethernet/ti | |
parent | d0415e7cc092b2f77028895b65195210b4ad4dc6 (diff) |
drivers: net: cpsw: Enable CPTS for DRA7xx and AM4372
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>
Diffstat (limited to 'drivers/net/ethernet/ti')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 36aa109416c4..085ffb5697ba 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -1398,7 +1398,8 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr) | |||
1398 | struct hwtstamp_config cfg; | 1398 | struct hwtstamp_config cfg; |
1399 | 1399 | ||
1400 | if (priv->version != CPSW_VERSION_1 && | 1400 | if (priv->version != CPSW_VERSION_1 && |
1401 | priv->version != CPSW_VERSION_2) | 1401 | priv->version != CPSW_VERSION_2 && |
1402 | priv->version != CPSW_VERSION_3) | ||
1402 | return -EOPNOTSUPP; | 1403 | return -EOPNOTSUPP; |
1403 | 1404 | ||
1404 | if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg))) | 1405 | if (copy_from_user(&cfg, ifr->ifr_data, sizeof(cfg))) |
@@ -1443,6 +1444,7 @@ static int cpsw_hwtstamp_set(struct net_device *dev, struct ifreq *ifr) | |||
1443 | cpsw_hwtstamp_v1(priv); | 1444 | cpsw_hwtstamp_v1(priv); |
1444 | break; | 1445 | break; |
1445 | case CPSW_VERSION_2: | 1446 | case CPSW_VERSION_2: |
1447 | case CPSW_VERSION_3: | ||
1446 | cpsw_hwtstamp_v2(priv); | 1448 | cpsw_hwtstamp_v2(priv); |
1447 | break; | 1449 | break; |
1448 | default: | 1450 | default: |
@@ -1459,7 +1461,8 @@ static int cpsw_hwtstamp_get(struct net_device *dev, struct ifreq *ifr) | |||
1459 | struct hwtstamp_config cfg; | 1461 | struct hwtstamp_config cfg; |
1460 | 1462 | ||
1461 | if (priv->version != CPSW_VERSION_1 && | 1463 | if (priv->version != CPSW_VERSION_1 && |
1462 | priv->version != CPSW_VERSION_2) | 1464 | priv->version != CPSW_VERSION_2 && |
1465 | priv->version != CPSW_VERSION_3) | ||
1463 | return -EOPNOTSUPP; | 1466 | return -EOPNOTSUPP; |
1464 | 1467 | ||
1465 | cfg.flags = 0; | 1468 | cfg.flags = 0; |