aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/diskonchip.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@cruncher.tec.linutronix.de>2006-05-25 10:07:16 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-25 12:45:27 +0100
commitf5bbdacc41939f89d8ccb18dd79cd9b21c0cb75d (patch)
treec9e45db9701c41c842282b0432d915cc9facc013 /drivers/mtd/nand/diskonchip.c
parent9577f44a899cf4acb9e381c8946307b72153cd15 (diff)
downloadkernel_samsung_smdk4412-f5bbdacc41939f89d8ccb18dd79cd9b21c0cb75d.zip
kernel_samsung_smdk4412-f5bbdacc41939f89d8ccb18dd79cd9b21c0cb75d.tar.gz
kernel_samsung_smdk4412-f5bbdacc41939f89d8ccb18dd79cd9b21c0cb75d.tar.bz2
[MTD] NAND Modularize read function
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>
Diffstat (limited to 'drivers/mtd/nand/diskonchip.c')
-rw-r--r--drivers/mtd/nand/diskonchip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index 2ec9080..83af6f0 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -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;