diff options
| author | Siva Durga Prasad Paladugu <[email protected]> | 2017-06-22 11:14:55 +0530 |
|---|---|---|
| committer | Michal Simek <[email protected]> | 2017-11-28 16:09:27 +0100 |
| commit | dc1fcc423c940692d8d8dd7c8240e83243b34859 (patch) | |
| tree | ba340b37532a73c09bb04ea8a214b946e754cc4b | |
| parent | d02a0b1fdf6ba3197e0b46f8a8f52e3c5d375506 (diff) | |
net: xilinx_axi_emac: Read dma address using fdtdec_get_addr
Read dma address using fdtdec_get_addr as it checks for
address cells and size cells and reads the address
properly. fdtdec_get_int always assume address is of int
size which goes wrong if using it on 64-bit architecture.
Signed-off-by: Siva Durga Prasad Paladugu <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
| -rw-r--r-- | drivers/net/xilinx_axi_emac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c index ea79b7420ab..4f2cef8a38d 100644 --- a/drivers/net/xilinx_axi_emac.c +++ b/drivers/net/xilinx_axi_emac.c @@ -694,8 +694,8 @@ static int axi_emac_ofdata_to_platdata(struct udevice *dev) printf("%s: axistream is not found\n", __func__); return -EINVAL; } - priv->dmatx = (struct axidma_reg *)fdtdec_get_int(gd->fdt_blob, - offset, "reg", 0); + priv->dmatx = (struct axidma_reg *)fdtdec_get_addr(gd->fdt_blob, + offset, "reg"); if (!priv->dmatx) { printf("%s: axi_dma register space not found\n", __func__); return -EINVAL; |
