summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorHuang Shijie2012-04-09 05:41:37 +0200
committerDavid Woodhouse2012-05-14 05:47:35 +0200
commit886bd33da7cfb1f6c7f3396f7146278ed02e76a7 (patch)
treeca263c0b00ad97608395c60b13bebaeac3666151 /drivers/mtd
parentmtd: IFC NAND: Add support of ONFI NAND flash (diff)
downloadkernel-qcow2-linux-886bd33da7cfb1f6c7f3396f7146278ed02e76a7.tar.gz
kernel-qcow2-linux-886bd33da7cfb1f6c7f3396f7146278ed02e76a7.tar.xz
kernel-qcow2-linux-886bd33da7cfb1f6c7f3396f7146278ed02e76a7.zip
mtd: print out the page size and oob size after parsing out the nand
Some not-supported nand chips may pass the current parsing code, and get the wrong page size and oob size. Sometimes, it's hard to notice that you get the wrong values, because there is no warning or error. So it's useful to print out the page size and oob size in the end of the parsing function. We can check these values with the datasheet of the nand chip as soon as possible. Artem: amend the print a bit Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/nand_base.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 47b19c0bb070..eb88d8b04262 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3154,10 +3154,11 @@ ident_done:
if (mtd->writesize > 512 && chip->cmdfunc == nand_command)
chip->cmdfunc = nand_command_lp;
- pr_info("NAND device: Manufacturer ID:"
- " 0x%02x, Chip ID: 0x%02x (%s %s)\n", *maf_id, *dev_id,
- nand_manuf_ids[maf_idx].name,
- chip->onfi_version ? chip->onfi_params.model : type->name);
+ pr_info("NAND device: Manufacturer ID: 0x%02x, Chip ID: 0x%02x (%s %s),"
+ " page size: %d, OOB size: %d\n",
+ *maf_id, *dev_id, nand_manuf_ids[maf_idx].name,
+ chip->onfi_version ? chip->onfi_params.model : type->name,
+ mtd->writesize, mtd->oobsize);
return type;
}