diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-25 04:07:16 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-25 07:45:27 -0400 |
commit | f5bbdacc41939f89d8ccb18dd79cd9b21c0cb75d (patch) | |
tree | c9e45db9701c41c842282b0432d915cc9facc013 /drivers/mtd/nand/diskonchip.c | |
parent | 9577f44a899cf4acb9e381c8946307b72153cd15 (diff) |
[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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c index 2ec9080e2b14..83af6f05cd00 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 | |||
968 | return 0; | 968 | return 0; |
969 | } | 969 | } |
970 | 970 | ||
971 | static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc) | 971 | static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat, |
972 | u_char *read_ecc, u_char *isnull) | ||
972 | { | 973 | { |
973 | int i, ret = 0; | 974 | int i, ret = 0; |
974 | struct nand_chip *this = mtd->priv; | 975 | struct nand_chip *this = mtd->priv; |
975 | struct doc_priv *doc = this->priv; | 976 | struct doc_priv *doc = this->priv; |
976 | void __iomem *docptr = doc->virtadr; | 977 | void __iomem *docptr = doc->virtadr; |
978 | uint8_t calc_ecc[6]; | ||
977 | volatile u_char dummy; | 979 | volatile u_char dummy; |
978 | int emptymatch = 1; | 980 | int emptymatch = 1; |
979 | 981 | ||