From: Maxim Levitsky <maximlevitsky@gmail.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-mtd@lists.infradead.org, Maxim Levitsky <maximlevitsky@gmail.com>
Subject: [PATCH] MTD: SM_FTL: remove CONFIG_SM_FTL_MUSEUM and make it always on
Date: Fri, 19 Mar 2010 14:05:51 +0200 [thread overview]
Message-ID: <1269000351-12023-1-git-send-email-maximlevitsky@gmail.com> (raw)
The sole purpose of this settings was to avoid depedency
on MTD_NAND. It seems that such configuration isn't well
supported by Kconfig/is ugly to implement/I don't know how to do.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
---
drivers/mtd/Kconfig | 9 ---------
drivers/mtd/sm_ftl.c | 8 +-------
2 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index dbee14d..d90652f 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -316,15 +316,6 @@ config SM_FTL
eat your card, so please don't use it together with valuable data.
Use readonly driver (CONFIG_SSFDC) instead.
-config SM_FTL_MUSEUM
- boolean "Additional Support for 1MiB and 2MiB SmartMedia cards"
- depends on SM_FTL
- select MTD_NAND_ECC_SMC
- help
- Very old SmartMedia cards need ECC to be calculated in the FTL.
- Such cards are very rare, thus enabling this option is mostly useless.
- Also this support is completely UNTESTED.
-
config MTD_OOPS
tristate "Log panic/oops to an MTD buffer"
depends on MTD
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 9fb56c7..812e212 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -15,12 +15,10 @@
#include <linux/freezer.h>
#include <linux/sysfs.h>
#include <linux/bitops.h>
+#include <linux/mtd/nand_ecc.h>
#include "nand/sm_common.h"
#include "sm_ftl.h"
-#ifdef CONFIG_SM_FTL_MUSEUM
-#include <linux/mtd/nand_ecc.h>
-#endif
struct workqueue_struct *cache_flush_workqueue;
@@ -204,7 +202,6 @@ static void sm_break_offset(struct sm_ftl *ftl, loff_t offset,
static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob)
{
-#ifdef CONFIG_SM_FTL_MUSEUM
uint8_t ecc[3];
__nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc);
@@ -216,7 +213,6 @@ static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob)
__nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc);
if (__nand_correct_data(buffer, ecc, oob->ecc2, SM_SMALL_PAGE) < 0)
return -EIO;
-#endif
return 0;
}
@@ -380,7 +376,6 @@ restart:
oob.data_status = 0;
}
-#ifdef CONFIG_SM_FTL_MUSEUM
if (ftl->smallpagenand) {
__nand_calculate_ecc(buf + boffset,
SM_SMALL_PAGE, oob.ecc1);
@@ -388,7 +383,6 @@ restart:
__nand_calculate_ecc(buf + boffset + SM_SMALL_PAGE,
SM_SMALL_PAGE, oob.ecc2);
}
-#endif
if (!sm_write_sector(ftl, zone, block, boffset,
buf + boffset, &oob))
continue;
--
1.6.3.3
next reply other threads:[~2010-03-19 12:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-19 12:05 Maxim Levitsky [this message]
2010-03-19 15:22 ` [PATCH 1/2] MTD: SM_FTL: initialize sysfs attributes This is new requirement in 2.6.34 Maxim Levitsky
2010-03-19 15:22 ` [PATCH 2/2] MTD: NAND: split out ECC module Maxim Levitsky
2010-03-24 12:02 ` [PATCH] MTD: SM_FTL: remove CONFIG_SM_FTL_MUSEUM and make it always on Maxim Levitsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1269000351-12023-1-git-send-email-maximlevitsky@gmail.com \
--to=maximlevitsky@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).