Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195920
b: refs/heads/master
c: 01de69c
h: refs/heads/master
v: v3
  • Loading branch information
Maxim Levitsky authored and David Woodhouse committed Mar 26, 2010
1 parent dc935e8 commit 78f08b4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5f710cfc6947e64672b7205f7992515868c7782
refs/heads/master: 01de69c2b0e471844193532a85c173f51d9ea6b2
9 changes: 0 additions & 9 deletions trunk/drivers/mtd/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,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
Expand Down
8 changes: 1 addition & 7 deletions trunk/drivers/mtd/sm_ftl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -206,7 +204,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);
Expand All @@ -218,7 +215,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;
}

Expand Down Expand Up @@ -382,15 +378,13 @@ static int sm_write_block(struct sm_ftl *ftl, uint8_t *buf,
oob.data_status = 0;
}

#ifdef CONFIG_SM_FTL_MUSEUM
if (ftl->smallpagenand) {
__nand_calculate_ecc(buf + boffset,
SM_SMALL_PAGE, oob.ecc1);

__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;
Expand Down

0 comments on commit 78f08b4

Please sign in to comment.