[PATCH] net: zynq_gem: Add a 10ms delay in zynq_gem_init()
Stefan Roese
sr at denx.de
Wed Jan 11 08:30:51 CET 2023
In our system using ZynqMP with an external SGMII PHY it's necessary
to wait a short while after the configuration in zynq_gem_init() before
the xfer starts. Otherwise the first packet(s) might get dropped,
resulting in a delay at the start of the ethernet transfers.
This patch adds a minimal delay of 10ms which fixes problems of dropped
first packages.
Signed-off-by: Stefan Roese <sr at denx.de>
Cc: Michal Simek <michal.simek at amd.com>
Cc: Ramon Fried <rfried.dev at gmail.com>
Cc: Sean Anderson <sean.anderson at seco.com>
---
drivers/net/zynq_gem.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 507b19b75975..26e468766871 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -522,6 +522,13 @@ static int zynq_gem_init(struct udevice *dev)
return ret;
}
}
+
+ /*
+ * Some additional minimal delay seems to be needed so that
+ * the first packet will be sent correctly
+ */
+ mdelay(10);
+
setbits_le32(®s->nwctrl, ZYNQ_GEM_NWCTRL_RXEN_MASK |
ZYNQ_GEM_NWCTRL_TXEN_MASK);
--
2.39.0
More information about the U-Boot
mailing list