summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2016-12-08 10:25:44 +0100
committerMichal Simek <michal.simek@xilinx.com>2016-12-08 10:34:42 +0100
commitb63cb3abbc626dc918828f302bd8ea72e7c226d2 (patch)
tree998699542070c23f07bd5f573f0d7c91df6bb5ad /drivers/net
parentf1a88cf6af6c474bcf53f8f2f32aea3af5419e7a (diff)
downloadu-boot-b63cb3abbc626dc918828f302bd8ea72e7c226d2.tar.gz
net: xilinx: Use mdio_register_seq() to support multiple instances
axi_emac, emaclite and gem have the same issue with registering multiple instances with mdio busses. mdio bus name has to be uniq but drivers are setting up only one name for all. Use mdio_register_seq() and pass dev->seq number to allow multiple mdio instances registration. Reported-by: Phani Kiran Kara <phanikiran.kara@gmail.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Series-to: u-boot Series-cc: Phani Kiran Kara <phanikiran.kara@gmail.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/xilinx_axi_emac.c3
-rw-r--r--drivers/net/xilinx_emaclite.c3
-rw-r--r--drivers/net/zynq_gem.c3
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 5de06ef01e..51c7426663 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -648,9 +648,8 @@ static int axi_emac_probe(struct udevice *dev)
priv->bus->read = axiemac_miiphy_read;
priv->bus->write = axiemac_miiphy_write;
priv->bus->priv = priv;
- strcpy(priv->bus->name, "axi_emac");
- ret = mdio_register(priv->bus);
+ ret = mdio_register_seq(priv->bus, dev->seq);
if (ret)
return ret;
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 78ff44c561..ea93cf906e 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -566,9 +566,8 @@ static int emaclite_probe(struct udevice *dev)
emaclite->bus->read = emaclite_miiphy_read;
emaclite->bus->write = emaclite_miiphy_write;
emaclite->bus->priv = emaclite;
- strcpy(emaclite->bus->name, "emaclite");
- ret = mdio_register(emaclite->bus);
+ ret = mdio_register_seq(emaclite->bus, dev->seq);
if (ret)
return ret;
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 526eac658a..4ab7b40dbe 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -647,9 +647,8 @@ static int zynq_gem_probe(struct udevice *dev)
priv->bus->read = zynq_gem_miiphy_read;
priv->bus->write = zynq_gem_miiphy_write;
priv->bus->priv = priv;
- strcpy(priv->bus->name, "gem");
- ret = mdio_register(priv->bus);
+ ret = mdio_register_seq_name(priv->bus, dev->seq);
if (ret)
return ret;