@@ -280,7 +280,7 @@ static int do_spi_flash_read_write(int argc, char * const argv[])
/* Consistency checking */
if (offset + len > flash->size) {
- printf("ERROR: attempting %s past flash size (%#x)\n",
+ printf("ERROR: attempting %s past flash size (%#llx)\n",
argv[0], flash->size);
return 1;
}
@@ -336,7 +336,7 @@ static int do_spi_flash_erase(int argc, char * const argv[])
/* Consistency checking */
if (offset + size > flash->size) {
- printf("ERROR: attempting %s past flash size (%#x)\n",
+ printf("ERROR: attempting %s past flash size (%#llx)\n",
argv[0], flash->size);
return 1;
}
@@ -70,7 +70,7 @@ struct spi_flash {
u8 shift;
u16 flags;
- u32 size;
+ uint64_t size;
u32 page_size;
u32 sector_size;
u32 erasesize;
To sync with size in mtd_info{} this patch change data type of size to uint64_t Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Mugunthan V N <mugunthanvnm@ti.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Jagan Teki <jteki@openedev.com> --- cmd/sf.c | 4 ++-- include/spi_flash.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)