aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2010-03-19 08:05:51 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-03-26 11:28:59 -0400
commit01de69c2b0e471844193532a85c173f51d9ea6b2 (patch)
tree9f0132c3dc3478a153a366243cda39d9567441f3
parente5f710cfc6947e64672b7205f7992515868c7782 (diff)
mtd: sm_ftl: remove CONFIG_SM_FTL_MUSEUM and make it always on
The sole purpose of this setting was to avoid a dependency on MTD_NAND. Now that we can depend on MTD_NAND_ECC without pulling in all the rest of the NAND code, we might as well do so unconditionally. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
-rw-r--r--drivers/mtd/Kconfig9
-rw-r--r--drivers/mtd/sm_ftl.c8
2 files changed, 1 insertions, 16 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index e652080bce5d..f8210bf2d241 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -317,15 +317,6 @@ config SM_FTL
317 eat your card, so please don't use it together with valuable data. 317 eat your card, so please don't use it together with valuable data.
318 Use readonly driver (CONFIG_SSFDC) instead. 318 Use readonly driver (CONFIG_SSFDC) instead.
319 319
320config SM_FTL_MUSEUM
321 boolean "Additional Support for 1MiB and 2MiB SmartMedia cards"
322 depends on SM_FTL
323 select MTD_NAND_ECC_SMC
324 help
325 Very old SmartMedia cards need ECC to be calculated in the FTL.
326 Such cards are very rare, thus enabling this option is mostly useless.
327 Also this support is completely UNTESTED.
328
329config MTD_OOPS 320config MTD_OOPS
330 tristate "Log panic/oops to an MTD buffer" 321 tristate "Log panic/oops to an MTD buffer"
331 depends on MTD 322 depends on MTD
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 2e7307d60af5..a9b4e344c55c 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -15,12 +15,10 @@
15#include <linux/freezer.h> 15#include <linux/freezer.h>
16#include <linux/sysfs.h> 16#include <linux/sysfs.h>
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18#include <linux/mtd/nand_ecc.h>
18#include "nand/sm_common.h" 19#include "nand/sm_common.h"
19#include "sm_ftl.h" 20#include "sm_ftl.h"
20 21
21#ifdef CONFIG_SM_FTL_MUSEUM
22#include <linux/mtd/nand_ecc.h>
23#endif
24 22
25 23
26struct workqueue_struct *cache_flush_workqueue; 24struct workqueue_struct *cache_flush_workqueue;
@@ -206,7 +204,6 @@ static void sm_break_offset(struct sm_ftl *ftl, loff_t offset,
206 204
207static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob) 205static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob)
208{ 206{
209#ifdef CONFIG_SM_FTL_MUSEUM
210 uint8_t ecc[3]; 207 uint8_t ecc[3];
211 208
212 __nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc); 209 __nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc);
@@ -218,7 +215,6 @@ static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob)
218 __nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc); 215 __nand_calculate_ecc(buffer, SM_SMALL_PAGE, ecc);
219 if (__nand_correct_data(buffer, ecc, oob->ecc2, SM_SMALL_PAGE) < 0) 216 if (__nand_correct_data(buffer, ecc, oob->ecc2, SM_SMALL_PAGE) < 0)
220 return -EIO; 217 return -EIO;
221#endif
222 return 0; 218 return 0;
223} 219}
224 220
@@ -382,7 +378,6 @@ restart:
382 oob.data_status = 0; 378 oob.data_status = 0;
383 } 379 }
384 380
385#ifdef CONFIG_SM_FTL_MUSEUM
386 if (ftl->smallpagenand) { 381 if (ftl->smallpagenand) {
387 __nand_calculate_ecc(buf + boffset, 382 __nand_calculate_ecc(buf + boffset,
388 SM_SMALL_PAGE, oob.ecc1); 383 SM_SMALL_PAGE, oob.ecc1);
@@ -390,7 +385,6 @@ restart:
390 __nand_calculate_ecc(buf + boffset + SM_SMALL_PAGE, 385 __nand_calculate_ecc(buf + boffset + SM_SMALL_PAGE,
391 SM_SMALL_PAGE, oob.ecc2); 386 SM_SMALL_PAGE, oob.ecc2);
392 } 387 }
393#endif
394 if (!sm_write_sector(ftl, zone, block, boffset, 388 if (!sm_write_sector(ftl, zone, block, boffset,
395 buf + boffset, &oob)) 389 buf + boffset, &oob))
396 continue; 390 continue;