From: T Karthik Reddy Date: Wed, 15 Jan 2020 09:15:13 +0000 (-0700) Subject: net: zynq_gem: Use ulong instead of u32 data type X-Git-Tag: v2020.04-rc4~28^2~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b6779274f2bdbcde2c7fa3a2f90d1db55c02951f;p=oweals%2Fu-boot.git 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 Signed-off-by: Michal Simek --- 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();