[PATCH 7/9 V2] cfi_flash: use %W and IEEE 1541 format

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Thu Sep 2 15:41:48 EDT 2010


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 drivers/nor/cfi_flash.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/nor/cfi_flash.c b/drivers/nor/cfi_flash.c
index fa5e5ee..bb72e39 100644
--- a/drivers/nor/cfi_flash.c
+++ b/drivers/nor/cfi_flash.c
@@ -713,8 +713,8 @@ static void cfi_info (struct device_d* dev)
 
 	printf ("CFI conformant FLASH (%d x %d)",
 		(info->portwidth << 3), (info->chipwidth << 3));
-	printf ("  Size: %ld MB in %d Sectors\n",
-		info->size >> 20, info->sector_count);
+	printf ("  Size: %WB in %d Sectors\n",
+		info->size, info->sector_count);
 	printf ("  ");
 	switch (info->vendor) {
 		case CFI_CMDSET_INTEL_STANDARD:
@@ -1036,8 +1036,8 @@ static int cfi_probe (struct device_d *dev)
 	}
 
 	if (info->flash_id == FLASH_UNKNOWN) {
-		printf ("## Unknown FLASH on Bank at 0x%08x - Size = 0x%08lx = %ld MB\n",
-			dev->map_base, info->size, info->size << 20);
+		printf ("## Unknown FLASH on Bank at 0x%08x - Size = 0x%08lx = %WB\n",
+			dev->map_base, info->size, info->size);
 		return -ENODEV;
 	}
 
-- 
1.7.1




More information about the barebox mailing list