blob: 5f607a97d436b7a6629ab0f665dc54a707b506be [file] [log] [blame]
From f06f021d625c05db6c0114828e87bfe816a3c2aa Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 16 Apr 2013 12:34:09 +0200
Subject: [PATCH] net/cpsw: Use fallback for active_slave
In case the .dts has not been yet updated we also try to look for the
old "cpts_active_slave" property.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/net/ethernet/ti/cpsw.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 1b2126d..4701ab3 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1424,8 +1424,12 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
if (of_property_read_u32(node, "active_slave", &prop)) {
pr_err("Missing active_slave property in the DT.\n");
- ret = -EINVAL;
- goto error_ret;
+ if (of_property_read_u32(node, "cpts_active_slave", &prop)) {
+ ret = -EINVAL;
+ goto error_ret;
+ } else {
+ pr_err("Using old cpts_active_slave as fallback.\n");
+ }
}
data->active_slave = prop;
--
1.7.10.4