mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mtd: gpmi: dump the BCH registers
@ 2013-01-14  7:19 Huang Shijie
  2013-01-17 14:35 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Shijie @ 2013-01-14  7:19 UTC (permalink / raw)
  To: dwmw2; +Cc: dedekind1, linux-mtd, linux-kernel, linux-arm-kernel, Huang Shijie

Dump the BCH registers in gpmi_dump_info().

Signed-off-by: Huang Shijie <b32955@freescale.com>
---
 drivers/mtd/nand/gpmi-nand/bch-regs.h |    2 ++
 drivers/mtd/nand/gpmi-nand/gpmi-lib.c |    5 +++++
 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 a092451..d67bca5 100644
--- a/drivers/mtd/nand/gpmi-nand/bch-regs.h
+++ b/drivers/mtd/nand/gpmi-nand/bch-regs.h
@@ -103,4 +103,6 @@
 		? (((v) >> 2) & MX6Q_BM_BCH_FLASH0LAYOUT1_DATAN_SIZE)	\
 		: ((v) & BM_BCH_FLASH0LAYOUT1_DATAN_SIZE)		\
 	)
+
+#define HW_BCH_VERSION				0x00000160
 #endif
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
index d84699c..01cc570 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)
 	}
 
 	/* start to print out the BCH info */
+	pr_err("Show BCH registers :\n");
+	for (i = 0; i <= HW_BCH_VERSION / 0x10 + 1; i++) {
+		reg = readl(r->bch_regs + i * 0x10);
+		pr_err("offset 0x%.3x : 0x%.8x\n", i * 0x10, reg);
+	}
 	pr_err("BCH Geometry :\n");
 	pr_err("GF length              : %u\n", geo->gf_len);
 	pr_err("ECC Strength           : %u\n", geo->ecc_strength);
-- 
1.7.0.4



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: gpmi: dump the BCH registers
  2013-01-14  7:19 [PATCH] mtd: gpmi: dump the BCH registers Huang Shijie
@ 2013-01-17 14:35 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2013-01-17 14:35 UTC (permalink / raw)
  To: Huang Shijie; +Cc: dwmw2, linux-mtd, linux-kernel, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

On Mon, 2013-01-14 at 15:19 +0800, Huang Shijie wrote:
> Dump the BCH registers in gpmi_dump_info().
> 
> Signed-off-by: Huang Shijie <b32955@freescale.com>
> ---
>  drivers/mtd/nand/gpmi-nand/bch-regs.h |    2 ++
>  drivers/mtd/nand/gpmi-nand/gpmi-lib.c |    5 +++++
>  2 files changed, 7 insertions(+), 0 deletions(-)

Pushed to l2-mtd.git, thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-17 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-14  7:19 [PATCH] mtd: gpmi: dump the BCH registers Huang Shijie
2013-01-17 14:35 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®