120-mtd-nand-print-ecc-strength.patch 1.0 KB

1234567891011121314151617181920212223242526272829
  1. From ec6cde9ea451ffa94b4d0ccbbcbe15c0d35f73d8 Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Mon, 25 May 2015 12:57:48 +0200
  4. Subject: [PATCH] mtd: nand: nand_get_flash_type: Print detected ECC strength
  5. and size
  6. Print the detected ECC strength and size from nand_get_flash_type().
  7. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  8. ---
  9. drivers/mtd/nand/nand_base.c | 6 ++++--
  10. 1 file changed, 4 insertions(+), 2 deletions(-)
  11. --- a/drivers/mtd/nand/nand_base.c
  12. +++ b/drivers/mtd/nand/nand_base.c
  13. @@ -4437,9 +4437,11 @@ ident_done:
  14. pr_info("%s %s\n", nand_manuf_ids[maf_idx].name,
  15. type->name);
  16. - pr_info("%d MiB, %s, erase size: %d KiB, page size: %d, OOB size: %d\n",
  17. + pr_info("%d MiB, %s, erase size: %d KiB, page size: %d, "
  18. + "OOB size: %d, ECC strength %d size %d\n",
  19. (int)(chip->chipsize >> 20), nand_is_slc(chip) ? "SLC" : "MLC",
  20. - mtd->erasesize >> 10, mtd->writesize, mtd->oobsize);
  21. + mtd->erasesize >> 10, mtd->writesize, mtd->oobsize,
  22. + chip->ecc_strength_ds, chip->ecc_step_ds);
  23. return type;
  24. }