diff options
author | Mugunthan V N <mugunthanvnm@ti.com> | 2013-03-11 19:16:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-03-13 04:38:19 -0400 |
commit | e86ac13b031cf71d8f40ff513e627aac80e6b765 (patch) | |
tree | 8f0027221533ef8b9ad028504f406505cd2ba205 | |
parent | 470d147428563aba9c2eb7c019383335249c6110 (diff) |
drivers: net: ethernet: cpsw: change cpts_active_slave to active_slave
Change cpts_active_slave to active_slave so that the same DT property
can be used to ethtool and SIOCGMIIPHY.
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | Documentation/devicetree/bindings/net/cpsw.txt | 7 | ||||
-rw-r--r-- | arch/arm/boot/dts/am33xx.dtsi | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 10 | ||||
-rw-r--r-- | include/linux/platform_data/cpsw.h | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt index 8e49c4200928..4f2ca6b4a182 100644 --- a/Documentation/devicetree/bindings/net/cpsw.txt +++ b/Documentation/devicetree/bindings/net/cpsw.txt | |||
@@ -15,7 +15,8 @@ Required properties: | |||
15 | - mac_control : Specifies Default MAC control register content | 15 | - mac_control : Specifies Default MAC control register content |
16 | for the specific platform | 16 | for the specific platform |
17 | - slaves : Specifies number for slaves | 17 | - slaves : Specifies number for slaves |
18 | - cpts_active_slave : Specifies the slave to use for time stamping | 18 | - active_slave : Specifies the slave to use for time stamping, |
19 | ethtool and SIOCGMIIPHY | ||
19 | - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds | 20 | - cpts_clock_mult : Numerator to convert input clock ticks into nanoseconds |
20 | - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds | 21 | - cpts_clock_shift : Denominator to convert input clock ticks into nanoseconds |
21 | 22 | ||
@@ -52,7 +53,7 @@ Examples: | |||
52 | rx_descs = <64>; | 53 | rx_descs = <64>; |
53 | mac_control = <0x20>; | 54 | mac_control = <0x20>; |
54 | slaves = <2>; | 55 | slaves = <2>; |
55 | cpts_active_slave = <0>; | 56 | active_slave = <0>; |
56 | cpts_clock_mult = <0x80000000>; | 57 | cpts_clock_mult = <0x80000000>; |
57 | cpts_clock_shift = <29>; | 58 | cpts_clock_shift = <29>; |
58 | cpsw_emac0: slave@0 { | 59 | cpsw_emac0: slave@0 { |
@@ -78,7 +79,7 @@ Examples: | |||
78 | rx_descs = <64>; | 79 | rx_descs = <64>; |
79 | mac_control = <0x20>; | 80 | mac_control = <0x20>; |
80 | slaves = <2>; | 81 | slaves = <2>; |
81 | cpts_active_slave = <0>; | 82 | active_slave = <0>; |
82 | cpts_clock_mult = <0x80000000>; | 83 | cpts_clock_mult = <0x80000000>; |
83 | cpts_clock_shift = <29>; | 84 | cpts_clock_shift = <29>; |
84 | cpsw_emac0: slave@0 { | 85 | cpsw_emac0: slave@0 { |
diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 0957645b73af..91fe4f148f80 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm/boot/dts/am33xx.dtsi | |||
@@ -349,7 +349,7 @@ | |||
349 | rx_descs = <64>; | 349 | rx_descs = <64>; |
350 | mac_control = <0x20>; | 350 | mac_control = <0x20>; |
351 | slaves = <2>; | 351 | slaves = <2>; |
352 | cpts_active_slave = <0>; | 352 | active_slave = <0>; |
353 | cpts_clock_mult = <0x80000000>; | 353 | cpts_clock_mult = <0x80000000>; |
354 | cpts_clock_shift = <29>; | 354 | cpts_clock_shift = <29>; |
355 | reg = <0x4a100000 0x800 | 355 | reg = <0x4a100000 0x800 |
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 01ffbc486982..98aa17a9516a 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -942,7 +942,7 @@ static void cpsw_ndo_change_rx_flags(struct net_device *ndev, int flags) | |||
942 | 942 | ||
943 | static void cpsw_hwtstamp_v1(struct cpsw_priv *priv) | 943 | static void cpsw_hwtstamp_v1(struct cpsw_priv *priv) |
944 | { | 944 | { |
945 | struct cpsw_slave *slave = &priv->slaves[priv->data.cpts_active_slave]; | 945 | struct cpsw_slave *slave = &priv->slaves[priv->data.active_slave]; |
946 | u32 ts_en, seq_id; | 946 | u32 ts_en, seq_id; |
947 | 947 | ||
948 | if (!priv->cpts->tx_enable && !priv->cpts->rx_enable) { | 948 | if (!priv->cpts->tx_enable && !priv->cpts->rx_enable) { |
@@ -971,7 +971,7 @@ static void cpsw_hwtstamp_v2(struct cpsw_priv *priv) | |||
971 | if (priv->data.dual_emac) | 971 | if (priv->data.dual_emac) |
972 | slave = &priv->slaves[priv->emac_port]; | 972 | slave = &priv->slaves[priv->emac_port]; |
973 | else | 973 | else |
974 | slave = &priv->slaves[priv->data.cpts_active_slave]; | 974 | slave = &priv->slaves[priv->data.active_slave]; |
975 | 975 | ||
976 | ctrl = slave_read(slave, CPSW2_CONTROL); | 976 | ctrl = slave_read(slave, CPSW2_CONTROL); |
977 | ctrl &= ~CTRL_ALL_TS_MASK; | 977 | ctrl &= ~CTRL_ALL_TS_MASK; |
@@ -1282,12 +1282,12 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, | |||
1282 | } | 1282 | } |
1283 | data->slaves = prop; | 1283 | data->slaves = prop; |
1284 | 1284 | ||
1285 | if (of_property_read_u32(node, "cpts_active_slave", &prop)) { | 1285 | if (of_property_read_u32(node, "active_slave", &prop)) { |
1286 | pr_err("Missing cpts_active_slave property in the DT.\n"); | 1286 | pr_err("Missing active_slave property in the DT.\n"); |
1287 | ret = -EINVAL; | 1287 | ret = -EINVAL; |
1288 | goto error_ret; | 1288 | goto error_ret; |
1289 | } | 1289 | } |
1290 | data->cpts_active_slave = prop; | 1290 | data->active_slave = prop; |
1291 | 1291 | ||
1292 | if (of_property_read_u32(node, "cpts_clock_mult", &prop)) { | 1292 | if (of_property_read_u32(node, "cpts_clock_mult", &prop)) { |
1293 | pr_err("Missing cpts_clock_mult property in the DT.\n"); | 1293 | pr_err("Missing cpts_clock_mult property in the DT.\n"); |
diff --git a/include/linux/platform_data/cpsw.h b/include/linux/platform_data/cpsw.h index 798fb80b024b..bb3cd58d71e3 100644 --- a/include/linux/platform_data/cpsw.h +++ b/include/linux/platform_data/cpsw.h | |||
@@ -30,7 +30,7 @@ struct cpsw_platform_data { | |||
30 | u32 channels; /* number of cpdma channels (symmetric) */ | 30 | u32 channels; /* number of cpdma channels (symmetric) */ |
31 | u32 slaves; /* number of slave cpgmac ports */ | 31 | u32 slaves; /* number of slave cpgmac ports */ |
32 | struct cpsw_slave_data *slave_data; | 32 | struct cpsw_slave_data *slave_data; |
33 | u32 cpts_active_slave; /* time stamping slave */ | 33 | u32 active_slave; /* time stamping, ethtool and SIOCGMIIPHY slave */ |
34 | u32 cpts_clock_mult; /* convert input clock ticks to nanoseconds */ | 34 | u32 cpts_clock_mult; /* convert input clock ticks to nanoseconds */ |
35 | u32 cpts_clock_shift; /* convert input clock ticks to nanoseconds */ | 35 | u32 cpts_clock_shift; /* convert input clock ticks to nanoseconds */ |
36 | u32 ale_entries; /* ale table size */ | 36 | u32 ale_entries; /* ale table size */ |