summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_ecc.c
diff options
context:
space:
mode:
authorScott Wood <scottwood@freescale.com>2008-10-24 16:20:43 -0500
committerScott Wood <scottwood@freescale.com>2008-10-29 10:42:16 -0500
commitc45912d8abc52de796b9059a58faf7c4166eab58 (patch)
treea1b020b0dd2c78af2663f79915d128f99145bc34 /drivers/mtd/nand/nand_ecc.c
parentb1d0db1805c3395149777e507b6da53410abac4e (diff)
downloadu-boot-imx-c45912d8abc52de796b9059a58faf7c4166eab58.zip
u-boot-imx-c45912d8abc52de796b9059a58faf7c4166eab58.tar.gz
u-boot-imx-c45912d8abc52de796b9059a58faf7c4166eab58.tar.bz2
NAND: sync with 2.6.27
This brings the core NAND code up to date with the Linux kernel. Since there were several drivers in Linux as of the last update that are not in u-boot, I'm not bringing over new drivers that have been added since in the absence of an interested party. I did not update OneNAND since it was recently synced by Kyungmin Park, and I'm not sure exactly what the common ancestor is. Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'drivers/mtd/nand/nand_ecc.c')
-rw-r--r--drivers/mtd/nand/nand_ecc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c
index ee1f6cc..94923b9 100644
--- a/drivers/mtd/nand/nand_ecc.c
+++ b/drivers/mtd/nand/nand_ecc.c
@@ -9,8 +9,6 @@
*
* Copyright (C) 2006 Thomas Gleixner <tglx@linutronix.de>
*
- * $Id: nand_ecc.c,v 1.15 2005/11/07 11:14:30 gleixner Exp $
- *
* This file is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 or (at your option) any
@@ -47,7 +45,8 @@
#include <linux/mtd/nand_ecc.h>
#endif
-#include<linux/mtd/mtd.h>
+#include <asm/errno.h>
+#include <linux/mtd/mtd.h>
/*
* NAND-SPL has no sofware ECC for now, so don't include nand_calculate_ecc(),
@@ -206,7 +205,7 @@ int nand_correct_data(struct mtd_info *mtd, u_char *dat,
if(countbits(s0 | ((uint32_t)s1 << 8) | ((uint32_t)s2 <<16)) == 1)
return 1;
- return -1;
+ return -EBADMSG;
}
/* XXX U-BOOT XXX */