Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffdac6cd authored by Huang Shijie's avatar Huang Shijie Committed by Brian Norris
Browse files

mtd: nand: print out the right information for JEDEC compliant NAND



Check the chip->jedec_version, and print out the right information
for JEDEC compliant NAND.

Signed-off-by: default avatarHuang Shijie <b32955@freescale.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 91361818
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -3691,8 +3691,17 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,

	pr_info("device found, Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n",
		*maf_id, *dev_id);

	if (chip->onfi_version)
		pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
				chip->onfi_params.model);
	else if (chip->jedec_version)
		pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
		chip->onfi_version ? chip->onfi_params.model : type->name);
				chip->jedec_params.model);
	else
		pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
				type->name);

	pr_info("%dMiB, %s, page size: %d, OOB size: %d\n",
		(int)(chip->chipsize >> 20), nand_is_slc(chip) ? "SLC" : "MLC",
		mtd->writesize, mtd->oobsize);