summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorT Karthik Reddy <t.karthik.reddy@xilinx.com>2020-01-15 02:15:13 -0700
committerMichal Simek <michal.simek@xilinx.com>2020-02-28 12:04:10 +0100
commitb6779274f2bdbcde2c7fa3a2f90d1db55c02951f (patch)
tree9e163f460ed001f002892af3371c528f70c219d5 /drivers/net
parent12fdbbe860f395575f360f0c03d84bce61a9a212 (diff)
net: zynq_gem: Use ulong instead of u32 data type
flush_dcache_range() expects unsigned long in the arguments. Here u32 variable is unable to hold the higher address value when ddr mapped to higher addresses & flushing lower address dchache range instead which is unmapped causing to crash. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/zynq_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 288037e2a0..7f9dc3435b 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -655,7 +655,7 @@ static int zynq_gem_probe(struct udevice *dev)
return -ENOMEM;
memset(priv->rxbuffers, 0, RX_BUF * PKTSIZE_ALIGN);
- u32 addr = (ulong)priv->rxbuffers;
+ ulong addr = (ulong)priv->rxbuffers;
flush_dcache_range(addr, addr + roundup(RX_BUF * PKTSIZE_ALIGN, ARCH_DMA_MINALIGN));
barrier();