Skip to content

Commit f722689

Browse files
Huang Shijiededekind
authored andcommitted
mtd: gpmi: dump the BCH registers
Dump the BCH registers in gpmi_dump_info(). Signed-off-by: Huang Shijie <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
1 parent 54cccc7 commit f722689

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

drivers/mtd/nand/gpmi-nand/bch-regs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,6 @@
103103
? (((v) >> 2) & MX6Q_BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \
104104
: ((v) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE) \
105105
)
106+
107+
#define HW_BCH_VERSION 0x00000160
106108
#endif

drivers/mtd/nand/gpmi-nand/gpmi-lib.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ void gpmi_dump_info(struct gpmi_nand_data *this)
208208
}
209209

210210
/* 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+
}
211216
pr_err("BCH Geometry :\n");
212217
pr_err("GF length : %u\n", geo->gf_len);
213218
pr_err("ECC Strength : %u\n", geo->ecc_strength);

0 commit comments

Comments
 (0)