[U-Boot] [PATCH v6 15/76] sf: Use uint64_t for flash->size

Jagan Teki
2016-02-14T20:48:14Z

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(-)

diff --git a/cmd/sf.c b/cmd/sf.c
index c20c901..0fda27c 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -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;
}
diff --git a/include/spi_flash.h b/include/spi_flash.h
index c68df26..e4d1d78 100644
--- a/include/spi_flash.h
+++ b/include/spi_flash.h
@@ -70,7 +70,7 @@ struct spi_flash {
u8 shift;
u16 flags;

- u32 size;
+ uint64_t size;
u32 page_size;
u32 sector_size;
u32 erasesize;
--
1.9.1