From: Mayuresh Chitale <mchitale@ventanamicro.com>
To: Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>,
Michal Simek <michal.simek@amd.com>
Cc: Mayuresh Chitale <mchitale@ventanamicro.com>,
u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
Tom Rini <trini@konsulko.com>
Subject: [PATCH v2] net: axi_emac: Use reg property for DMA registers
Date: Thu, 16 Nov 2023 22:10:24 +0530 [thread overview]
Message-ID: <20231116164024.139934-1-mchitale@ventanamicro.com> (raw)
As per the xlnx,axi-ethernet-1.00.a DT documentation in linux, the AXI
DMA registers can be obtained via the reg property or via a separate
node for the axistream DMA controller. Currently only the latter is
supported, so add support to fetch the DMA controller registers from the
"reg" property.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
---
Changes in v2:
====
Add Reviewed-by Tag.
drivers/net/xilinx_axi_emac.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 54f2232768..ef151ee51b 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -903,12 +903,11 @@ static int axi_emac_of_to_plat(struct udevice *dev)
ret = dev_read_phandle_with_args(dev, "axistream-connected", NULL, 0, 0,
&axistream_node);
- if (ret) {
- printf("%s: axistream is not found\n", __func__);
- return -EINVAL;
- }
+ if (!ret)
+ plat->dmatx = (struct axidma_reg *)ofnode_get_addr(axistream_node.node);
+ else
+ plat->dmatx = (struct axidma_reg *)dev_read_addr_index(dev, 1);
- plat->dmatx = (struct axidma_reg *)ofnode_get_addr(axistream_node.node);
if (!plat->dmatx) {
printf("%s: axi_dma register space not found\n", __func__);
return -EINVAL;
--
2.34.1
next reply other threads:[~2023-11-16 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 16:40 Mayuresh Chitale [this message]
2023-11-21 14:29 ` [PATCH v2] net: axi_emac: Use reg property for DMA registers Michal Simek
-- strict thread matches above, loose matches on Subject: below --
2023-11-11 17:36 [PATCH v2] drivers: pcie_xilinx: Fix "reg" not found error Mayuresh Chitale
2023-11-11 17:36 ` [PATCH v2] net: axi_emac: Use reg property for DMA registers Mayuresh Chitale
2023-11-13 9:10 ` Michal Simek
2023-11-16 13:22 ` mchitale
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=20231116164024.139934-1-mchitale@ventanamicro.com \
--to=mchitale@ventanamicro.com \
--cc=joe.hershberger@ni.com \
--cc=michal.simek@amd.com \
--cc=rfried.dev@gmail.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.