]> git.sur5r.net Git - u-boot/commitdiff
net: zynq: Add debug message to phyread/phywrite
authorMichal Simek <michal.simek@xilinx.com>
Wed, 7 Oct 2015 14:34:51 +0000 (16:34 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 19 Nov 2015 12:09:21 +0000 (13:09 +0100)
Add debug messages to phyread/write to help with PHY debug.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/zynq_gem.c

index 5637a0d083ce9e42bf0c86016bdd65858e5e9f2d..e3af8dc930fd0ab706131e8b7e5c19a910146985 100644 (file)
@@ -208,12 +208,23 @@ static u32 phy_setup_op(struct eth_device *dev, u32 phy_addr, u32 regnum,
 
 static u32 phyread(struct eth_device *dev, u32 phy_addr, u32 regnum, u16 *val)
 {
-       return phy_setup_op(dev, phy_addr, regnum,
+       u32 ret;
+
+       ret = phy_setup_op(dev, phy_addr, regnum,
                                ZYNQ_GEM_PHYMNTNC_OP_R_MASK, val);
+
+       if (!ret)
+               debug("%s: phy_addr %d, regnum 0x%x, val 0x%x\n", __func__,
+                     phy_addr, regnum, *val);
+
+       return ret;
 }
 
 static u32 phywrite(struct eth_device *dev, u32 phy_addr, u32 regnum, u16 data)
 {
+       debug("%s: phy_addr %d, regnum 0x%x, data 0x%x\n", __func__, phy_addr,
+             regnum, data);
+
        return phy_setup_op(dev, phy_addr, regnum,
                                ZYNQ_GEM_PHYMNTNC_OP_W_MASK, &data);
 }