diff options
author | Richard Cochran <richardcochran@gmail.com> | 2012-10-29 09:45:18 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-11-01 17:21:32 +0100 |
commit | 78ca0b287314ad6b7b06161b3ff9b13e8a8bcce0 (patch) | |
tree | 99ab480436bf31cb253c334f57b5b9b039ad9f0a /drivers/net/ethernet/ti | |
parent | cpsw: add a DT field for the cpts offset (diff) | |
download | linux-78ca0b287314ad6b7b06161b3ff9b13e8a8bcce0.tar.xz linux-78ca0b287314ad6b7b06161b3ff9b13e8a8bcce0.zip |
cpsw: add a DT field for the active time stamping port
Because time stamping on both external ports of the switch simultaneously
is positively useless from the application's point of view, this patch
provides a DT configuration method to choose the active port.
Signed-off-by: Richard Cochran <richardcochran@gmail.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, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index f1af5e08cabb..f16579123c1b 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -847,6 +847,13 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data, } data->slaves = prop; + if (of_property_read_u32(node, "cpts_active_slave", &prop)) { + pr_err("Missing cpts_active_slave property in the DT.\n"); + ret = -EINVAL; + goto error_ret; + } + data->cpts_active_slave = prop; + data->slave_data = kzalloc(sizeof(struct cpsw_slave_data) * data->slaves, GFP_KERNEL); if (!data->slave_data) { |