[PATCH] S3C24xx NAND: Correct tacls_max for S3C2410

Harald Welte laforge at gnumonks.org
Mon Oct 20 05:09:47 EDT 2008


At least according to my S3C2410X manual, the maximum tacls setting
for the 2410 is 8, not 4.  S3C2410 is therefore like the S3C2412 (and 2443),
not like 2440 and 2442.

Signed-of-by: Harald Welte <laforge at openmoko.org>

diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
index 4413d76..251f7a3 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/s3c2410.c
@@ -183,10 +183,20 @@ static int s3c2410_nand_inithw(struct s3c2410_nand_info *info,
 {
 	struct s3c2410_platform_nand *plat = to_nand_plat(pdev);
 	unsigned long clkrate = clk_get_rate(info->clk);
-	int tacls_max = (info->cpu_type == TYPE_S3C2412) ? 8 : 4;
+	int tacls_max;
 	int tacls, twrph0, twrph1;
 	unsigned long cfg = 0;
 
+	switch (info->cpu_type) {
+	case TYPE_S3C2410:
+	case TYPE_S3C2412:
+		tacls_max = 8;
+		break;
+	default:
+		tacls_max = 4;
+		break;
+	}
+
 	/* calculate the timing information for the controller */
 
 	clkrate /= 1000;	/* turn clock into kHz for ease of use */
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)



More information about the linux-mtd mailing list