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] net: axi_emac: Use reg property for DMA registers
Date: Thu, 2 Nov 2023 13:53:02 +0530 [thread overview]
Message-ID: <20231102082303.354944-3-mchitale@ventanamicro.com> (raw)
In-Reply-To: <20231102082303.354944-1-mchitale@ventanamicro.com>
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>
---
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 prev parent reply other threads:[~2023-11-02 8:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-02 8:23 [PATCH] drivers: pcie_xilinx: Fix "reg" not found error Mayuresh Chitale
2023-11-02 8:23 ` [PATCH] drivers: xilinx_spi: Fixes for MMC_SPI Mayuresh Chitale
2023-11-02 8:37 ` Michal Simek
2023-11-11 13:21 ` mchitale
2023-11-02 8:23 ` Mayuresh Chitale [this message]
2023-11-02 9:15 ` [PATCH] net: axi_emac: Use reg property for DMA registers Michal Simek
2023-11-11 13:23 ` mchitale
2023-11-02 8:23 ` [PATCH] pci: xilinx: Enable MMIO region Mayuresh Chitale
2023-11-02 9:13 ` Michal Simek
2023-11-02 9:05 ` [PATCH] drivers: pcie_xilinx: Fix "reg" not found error Michal Simek
2023-11-11 13:25 ` 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=20231102082303.354944-3-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox