aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/nand/gpmi-nand/bch-regs.h2
-rw-r--r--drivers/mtd/nand/gpmi-nand/gpmi-lib.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mtd/nand/gpmi-nand/bch-regs.h b/drivers/mtd/nand/gpmi-nand/bch-regs.h
index a0924515c396..d67bca5174bc 100644
--- a/drivers/mtd/nand/gpmi-nand/bch-regs.h
+++ b/drivers/mtd/nand/gpmi-nand/bch-regs.h
@@ -103,4 +103,6 @@
103 ? (((v) >> 2) & MX6Q_BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \ 103 ? (((v) >> 2) & MX6Q_BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \
104 : ((v) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \ 104 : ((v) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \
105 ) 105 )
106
107#define HW_BCH_VERSION 0x00000160
106#endif 108#endif
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index d84699c7968e..01cc570e98aa 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
@@ -208,6 +208,11 @@ void gpmi_dump_info(struct gpmi_nand_data *this)
208 } 208 }
209 209
210 /* start to print out the BCH info */ 210 /* start to print out the BCH info */
211 pr_err("Show BCH registers :\n");
212 for (i = 0; i <= HW_BCH_VERSION / 0x10 + 1; i++) {
213 reg = readl(r->bch_regs + i * 0x10);
214 pr_err("offset 0x%.3x : 0x%.8x\n", i * 0x10, reg);
215 }
211 pr_err("BCH Geometry :\n"); 216 pr_err("BCH Geometry :\n");
212 pr_err("GF length : %u\n", geo->gf_len); 217 pr_err("GF length : %u\n", geo->gf_len);
213 pr_err("ECC Strength : %u\n", geo->ecc_strength); 218 pr_err("ECC Strength : %u\n", geo->ecc_strength);