[PATCH 2/2] fixup! cpsw: Add devicetree probe support

Sascha Hauer s.hauer at pengutronix.de
Wed Nov 27 04:41:48 EST 2013


---
 drivers/net/cpsw.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 801859b..5e68e1b 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -28,6 +28,7 @@
 #include <errno.h>
 #include <io.h>
 #include <of.h>
+#include <pinctrl.h>
 #include <of_net.h>
 #include <of_address.h>
 #include <xfuncs.h>
@@ -1057,6 +1058,12 @@ static int cpsw_probe_dt(struct cpsw_priv *priv)
 				return ret;
 		}
 
+		if (of_device_is_compatible(child, "ti,davinci_mdio")) {
+			ret = of_pinctrl_select_state_default(child);
+			if (ret)
+				return ret;
+		}
+
 		if (!strncmp(child->name, "slave", 5)) {
 			struct cpsw_slave *slave = &priv->slaves[i];
 			uint32_t phy_id[2];
-- 
1.8.4.2




More information about the barebox mailing list