mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-14 21:10:27 +01:00
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 <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
d02a0b1fdf
commit
dc1fcc423c
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue