From: Pranav Tilak <pranav.vinaytilak@amd.com>
To: <u-boot@lists.denx.de>, <michal.simek@amd.com>
Cc: <git@amd.com>, <padmarao.begari@amd.com>,
Pranav Tilak <pranav.vinaytilak@amd.com>
Subject: [PATCH 2/3] net: zynq_gem: set 128-bit AXI bus width for 10GBE
Date: Fri, 10 Apr 2026 15:00:17 +0530 [thread overview]
Message-ID: <20260410093018.1461732-3-pranav.vinaytilak@amd.com> (raw)
In-Reply-To: <20260410093018.1461732-1-pranav.vinaytilak@amd.com>
Set 128-bit AXI bus width in network config for 10GBE. The default 64-bit
setting causes DMA data corruption.
Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.com>
---
drivers/net/zynq_gem.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index c06d114af68..e9210d42438 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -69,10 +69,13 @@
#define ZYNQ_GEM_NWCFG_SGMII_ENBL 0x08000000 /* SGMII Enable */
#define ZYNQ_GEM_NWCFG_PCS_SEL 0x00000800 /* PCS select */
+#define ZYNQ_GEM_DBUS_WIDTH_MASK (3 << 21) /* bits 22:21 */
#ifdef CONFIG_ARM64
# define ZYNQ_GEM_DBUS_WIDTH (1 << 21) /* 64 bit bus */
+# define ZYNQ_GEM_DBUS_WIDTH_128 (2 << 21) /* 128 bit bus */
#else
# define ZYNQ_GEM_DBUS_WIDTH (0 << 21) /* 32 bit bus */
+# define ZYNQ_GEM_DBUS_WIDTH_128 (0 << 21) /* 32 bit bus */
#endif
#define ZYNQ_GEM_NWCFG_INIT (ZYNQ_GEM_DBUS_WIDTH | \
@@ -533,6 +536,8 @@ static int zynq_gem_init(struct udevice *dev)
nwconfig = ZYNQ_GEM_NWCFG_INIT;
if (device_is_compatible(dev, "amd,versal2-10gbe")) {
+ nwconfig &= ~ZYNQ_GEM_DBUS_WIDTH_MASK;
+ nwconfig |= ZYNQ_GEM_DBUS_WIDTH_128;
if (priv->interface == PHY_INTERFACE_MODE_10GBASER) {
ctrl = readl(®s->nwcfg);
ctrl |= PCSSEL;
--
2.43.0
next prev parent reply other threads:[~2026-04-10 9:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-10 9:30 [PATCH 0/3] fix 10GBE support for AMD Versal Gen 2 Pranav Tilak
2026-04-10 9:30 ` [PATCH 1/3] net: zynq_gem: add SPEED_10000 case in clock rate selection Pranav Tilak
2026-04-10 9:30 ` Pranav Tilak [this message]
2026-04-10 9:30 ` [PATCH 3/3] net: zynq_gem: reinitialize RX BDs on every init Pranav Tilak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260410093018.1461732-3-pranav.vinaytilak@amd.com \
--to=pranav.vinaytilak@amd.com \
--cc=git@amd.com \
--cc=michal.simek@amd.com \
--cc=padmarao.begari@amd.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox