Skip to content

Commit

Permalink
[MTD] NAND Modularize read function
Browse files Browse the repository at this point in the history
Split the core of the read function out and implement
seperate handling functions for software and hardware
ECC.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Thomas Gleixner authored and David Woodhouse committed May 25, 2006
1 parent 9577f44 commit f5bbdac
Show file tree
Hide file tree
Showing 4 changed files with 275 additions and 255 deletions.
4 changes: 3 additions & 1 deletion drivers/mtd/nand/diskonchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,12 +968,14 @@ static int doc200x_calculate_ecc(struct mtd_info *mtd, const u_char *dat, unsign
return 0;
}

static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc)
static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat,
u_char *read_ecc, u_char *isnull)
{
int i, ret = 0;
struct nand_chip *this = mtd->priv;
struct doc_priv *doc = this->priv;
void __iomem *docptr = doc->virtadr;
uint8_t calc_ecc[6];
volatile u_char dummy;
int emptymatch = 1;

Expand Down
Loading

0 comments on commit f5bbdac

Please sign in to comment.