summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ti
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-10-29 08:45:17 +0000
committerDavid S. Miller <davem@davemloft.net>2012-11-01 12:21:32 -0400
commit6b60393e08f9263c7b129d54eeb261e8f970175c (patch)
treedbd08a4fec51b2bc82f7e6dcd4342c85adc7ebe2 /drivers/net/ethernet/ti
parent87c0e764d43aca7f8bae8bfa86c50fa715e80050 (diff)
cpsw: add a DT field for the cpts offset
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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 588f5c340490..f1af5e08cabb 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -912,6 +912,13 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
data->hw_stats_reg_ofs = prop;
+ if (of_property_read_u32(node, "cpts_reg_ofs", &prop)) {
+ pr_err("Missing cpts_reg_ofs property in the DT.\n");
+ ret = -EINVAL;
+ goto error_ret;
+ }
+ data->cpts_reg_ofs = prop;
+
if (of_property_read_u32(node, "bd_ram_ofs", &prop)) {
pr_err("Missing bd_ram_ofs property in the DT.\n");
ret = -EINVAL;