sf: Fix sram size issue for 4GB DDR

In this case, the variable sram_end(Base + Size)
will hold (0x40000000 + 0xC0000000) and will overflow
32bits. Update the variable type to u64.

Change-Id: Iadf008c0ace552b793b9424e5c9ded0873599a64
Signed-off-by: anusha <anusharao@codeaurora.org>
This commit is contained in:
anusha 2021-09-28 17:21:14 +05:30
parent c6915cd738
commit 3e6aa907bd

View file

@ -267,7 +267,7 @@ static int do_spi_flash_read_write(int argc, char * const argv[])
int ret = 1;
int dev = 0;
loff_t offset, len, maxsize;
unsigned long sram_end = CONFIG_SYS_SDRAM_BASE + gd->ram_size;
u64 sram_end = CONFIG_SYS_SDRAM_BASE + (u64)gd->ram_size;
if (argc < 3)
return -1;