Patchwork [4/4] s5pc110: OneNAND runtime badblock check

login
register
mail settings
Submitter Marek Szyprowski
Date June 9, 2010, 2:05 p.m.
Message ID <1276092335-3245-5-git-send-email-m.szyprowski@samsung.com>
Download mbox | patch
Permalink /patch/55095/
State New
Headers show

Comments

Marek Szyprowski - June 9, 2010, 2:05 p.m.
From: Kyungmin Park <kyungmin.park@samsung.com>

This patch enables runtime badblock check for Samsung OneNAND driver
depending on the value of CONFIG_MTD_RUNTIME_BADBLOCK_CHECK option.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

---
 drivers/mtd/onenand/samsung.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

Patch

diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index fa4b743..c2bbeae 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -837,8 +837,12 @@  static int s3c_onenand_probe(struct platform_device *pdev)
 	/* Set onenand_chip also */
 	this->base = onenand->base;
 
-	/* Use runtime badblock check */
+	/* Skip unlock all check */
 	this->options |= ONENAND_SKIP_UNLOCK_CHECK;
+#ifdef CONFIG_MTD_RUNTIME_BADBLOCK_CHECK
+	/* Use runtime badblock check */
+	this->options |= ONENAND_RUNTIME_BADBLOCK_CHECK;
+#endif
 
 	if (onenand->type != TYPE_S5PC110) {
 		r = platform_get_resource(pdev, IORESOURCE_MEM, 1);