[U-Boot] [PATCH v7 15/87] sf: Use uint64_t for flash->size
Jagan Teki
jteki at openedev.com
Tue Mar 22 08:37:27 CET 2016
To sync with size in mtd_info{} this patch change
data type of size to uint64_t
Cc: Simon Glass <sjg at chromium.org>
Cc: Bin Meng <bmeng.cn at gmail.com>
Cc: Mugunthan V N <mugunthanvnm at ti.com>
Cc: Michal Simek <michal.simek at xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
Signed-off-by: Jagan Teki <jteki at 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 1e0dcb4..0d0a02c 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 4b92605..c7fd4f3 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
More information about the U-Boot
mailing list