summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-06-19 09:35:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-06-22 08:58:15 +0200
commit1099bd178ec14380650ffbaf365ca90865e8bc8d (patch)
treec2e8b860c59c39f037072973b2d92f346ae43f3b /drivers/mtd
parenta3a17dfd5a2c5df9626c844dcbef3bb2e9cce14c (diff)
downloadbarebox-1099bd178ec14380650ffbaf365ca90865e8bc8d.tar.gz
barebox-1099bd178ec14380650ffbaf365ca90865e8bc8d.tar.xz
mtd: cfi-flash: We can print longlongs
printf supports printing longlongs, so drop print_longlong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nor/cfi_flash.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/mtd/nor/cfi_flash.c b/drivers/mtd/nor/cfi_flash.c
index 0fa41bf67b..6d8276413a 100644
--- a/drivers/mtd/nor/cfi_flash.c
+++ b/drivers/mtd/nor/cfi_flash.c
@@ -124,19 +124,6 @@ static int flash_write_cfiword (struct flash_info *info, ulong dest,
}
#ifdef DEBUG
-/*
- * Debug support
- */
-void print_longlong (char *str, unsigned long long data)
-{
- int i;
- char *cp;
-
- cp = (unsigned char *) &data;
- for (i = 0; i < 8; i++)
- sprintf (&str[i * 2], "%2.2x", *cp++);
-}
-
static void flash_printqry (struct cfi_qry *qry)
{
u8 *p = (u8 *)qry;
@@ -867,16 +854,7 @@ int flash_isequal(struct flash_info *info, flash_sect_t sect,
dev_dbg(info->dev, "is= %8.8x %8.8x\n", flash_read32(addr), (u32)cword);
retval = (flash_read32(addr) == cword);
} else if (bankwidth_is_8(info)) {
-#ifdef DEBUG
- {
- char str1[20];
- char str2[20];
-
- print_longlong (str1, flash_read32(addr));
- print_longlong (str2, cword);
- dev_dbg(info->dev, "is= %s %s\n", str1, str2);
- }
-#endif
+ dev_dbg(info->dev, "is= %16.16llx %16.16llx\n", flash_read64(addr), (u64)cword);
retval = (flash_read64(addr) == cword);
} else
retval = 0;