aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHolger Freyther <zecke@openmoko.org>2008-11-19 17:10:51 +0000
committerLars-Peter Clausen <lars@metafoo.de>2009-12-06 09:54:11 +0100
commit9aa3a682096fec8e726d7178e2d585b6a395f7cb (patch)
tree335425bdc84b8a1218f0f09115246301c9b5a135 /arch
parentbc94658fe9c361303245cff7f9798e9453b3baf0 (diff)
gta02: Disable hardware ECC unless we get instructed to enable it
Early verions off uboot used for the gta02 flashed the nand with ecc information incompatible to s3c2442 hardware ecc. Disable hardware error correction by default, unless the bootloader explicitly enables it. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2442/mach-gta02.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2442/mach-gta02.c b/arch/arm/mach-s3c2442/mach-gta02.c
index b20a912b991..d9ee75f2afe 100644
--- a/arch/arm/mach-s3c2442/mach-gta02.c
+++ b/arch/arm/mach-s3c2442/mach-gta02.c
@@ -457,6 +457,7 @@ static struct s3c2410_platform_nand gta02_nand_info = {
.twrph1 = 15,
.nr_sets = ARRAY_SIZE(gta02_nand_sets),
.sets = gta02_nand_sets,
+ .software_ecc = 1,
};
@@ -756,6 +757,18 @@ static void gta02_hijack_gpb(void)
s3c24xx_gpios[1].chip.get = gta02_gpb_get;
}
+/*
+ * Allow the bootloader to enable hw ecc
+ * hardware_ecc=1|0
+ */
+static int __init hardware_ecc_setup(char *str)
+{
+ if (str && str[0] == '1')
+ gta02_nand_info.software_ecc = 0;
+ return 1;
+}
+__setup("hardware_ecc=", hardware_ecc_setup);
+
static void gta02_request_gpios(void)
{
int ret;