Patchwork mtd: cfi_probe: print manufacturer and id of probed chip

login
register
mail settings
Submitter Guillaume LECERF
Date June 14, 2010, 10:33 a.m.
Message ID <20100614103345.26103.40429.stgit@dev.siriade.com>
Download mbox | patch
Permalink /patch/55517/
State New
Headers show

Comments

Guillaume LECERF - June 14, 2010, 10:33 a.m.
Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
---
 drivers/mtd/chips/cfi_probe.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Artem Bityutskiy - June 29, 2010, 6:45 a.m.
On Mon, 2010-06-14 at 12:33 +0200, Guillaume LECERF wrote:
> Signed-off-by: Guillaume LECERF <glecerf@gmail.com>
> ---
>  drivers/mtd/chips/cfi_probe.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
> index b2acd32..5f5ba3e 100644
> --- a/drivers/mtd/chips/cfi_probe.c
> +++ b/drivers/mtd/chips/cfi_probe.c
> @@ -235,9 +235,9 @@ static int __xipram cfi_chip_setup(struct map_info *map,
>  	cfi_qry_mode_off(base, map, cfi);
>  	xip_allowed(base, map);
>  
> -	printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank\n",
> +	printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank. mfr=0x%08x id=0x%08x\n",
>  	       map->name, cfi->interleave, cfi->device_type*8, base,
> -	       map->bankwidth*8);
> +	       map->bankwidth*8, cfi->mfr, cfi->id);

This is not a debugging print, so I think you should do it in a more
user-friendly way. E.g., "manufect. ID %#08x, chip id %#08x".

Patch

diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index b2acd32..5f5ba3e 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -235,9 +235,9 @@  static int __xipram cfi_chip_setup(struct map_info *map,
 	cfi_qry_mode_off(base, map, cfi);
 	xip_allowed(base, map);
 
-	printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank\n",
+	printk(KERN_INFO "%s: Found %d x%d devices at 0x%x in %d-bit bank. mfr=0x%08x id=0x%08x\n",
 	       map->name, cfi->interleave, cfi->device_type*8, base,
-	       map->bankwidth*8);
+	       map->bankwidth*8, cfi->mfr, cfi->id);
 
 	return 1;
 }