summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2015-10-07 16:34:51 +0200
committerMichal Simek <michal.simek@xilinx.com>2015-11-19 13:09:21 +0100
commit198e9a4fe99a9c2174f1ee332d602b3c94b4a8e6 (patch)
treed70def89bb3c3525c20068aadbe94bbad5586973
parent08598d6ee9d4e01e37f00e9147bf8da37c375c82 (diff)
downloadu-boot-imx-198e9a4fe99a9c2174f1ee332d602b3c94b4a8e6.zip
u-boot-imx-198e9a4fe99a9c2174f1ee332d602b3c94b4a8e6.tar.gz
u-boot-imx-198e9a4fe99a9c2174f1ee332d602b3c94b4a8e6.tar.bz2
net: zynq: Add debug message to phyread/phywrite
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>
-rw-r--r--drivers/net/zynq_gem.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 5637a0d..e3af8dc 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -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);
}