summaryrefslogtreecommitdiff
path: root/drivers/net/ti
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-09-15 10:45:01 -0400
committerTom Rini <trini@konsulko.com>2020-09-30 08:53:26 -0400
commit143d81dc8602198b567357160b8dd61edf1bfc48 (patch)
tree812c686fa6543fc6212be150d0bff9a4ba38f7cf /drivers/net/ti
parentef043693c6b8ffbf0d17caac5c99855cfaeaef3c (diff)
downloadu-boot-143d81dc8602198b567357160b8dd61edf1bfc48.tar.gz
u-boot-143d81dc8602198b567357160b8dd61edf1bfc48.tar.bz2
u-boot-143d81dc8602198b567357160b8dd61edf1bfc48.zip
net: ti: cpsw: Fix not calling dev_dbg with a device
Without DM_ETH, cpsw_priv.dev is an eth_device. Just use its name instead. Signed-off-by: Sean Anderson <seanga2@gmail.com> Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
Diffstat (limited to 'drivers/net/ti')
-rw-r--r--drivers/net/ti/cpsw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index d6fefe5306..1c11257839 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -856,8 +856,14 @@ static int cpsw_phy_init(struct cpsw_priv *priv, struct cpsw_slave *slave)
ret = phy_set_supported(phydev, slave->data->max_speed);
if (ret)
return ret;
+#if CONFIG_IS_ENABLED(DM_ETH)
dev_dbg(priv->dev, "Port %u speed forced to %uMbit\n",
slave->slave_num + 1, slave->data->max_speed);
+#else
+ log_debug("%s: Port %u speed forced to %uMbit\n",
+ priv->dev->name, slave->slave_num + 1,
+ slave->data->max_speed);
+#endif
}
phydev->advertising = phydev->supported;