diff options
| author | Mayuresh Chitale <[email protected]> | 2023-11-16 22:10:24 +0530 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2023-12-13 08:58:06 +0100 |
| commit | 3c6b1fdade236e5fa97b058529a91da476627461 (patch) | |
| tree | 2ebc0962a0c5dd5f8a3bd569a118b73685a898c8 /drivers | |
| parent | c7c82cbe2dd3991460e15fbc0b265023154c5827 (diff) | |
net: axi_emac: Use reg property for DMA registers
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 <[email protected]>
Reviewed-by: Michal Simek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michal Simek <[email protected]>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/xilinx_axi_emac.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index 54f22327684..ef151ee51b4 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; |
