summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid Müller (ELSOFT AG) <d.mueller@elsoft.ch>2010-11-29 05:49:19 +0000
committerScott Wood <scottwood@freescale.com>2010-12-06 18:28:48 -0600
commit2111cb44a7937bf8ea5168dd65963f68f8bf3345 (patch)
treefd5c4515bb9c0a6d5699a0d342e2579fbbda21b6 /drivers
parent068a208b4a3e1e0dfc8dea6ebbd80b62ae280732 (diff)
downloadu-boot-imx-2111cb44a7937bf8ea5168dd65963f68f8bf3345.zip
u-boot-imx-2111cb44a7937bf8ea5168dd65963f68f8bf3345.tar.gz
u-boot-imx-2111cb44a7937bf8ea5168dd65963f68f8bf3345.tar.bz2
fix s3c2410_nand timing default values
The attached patch fixes wrong timing default values and adds the possibility to specify board specific timing value in the board config file. Signed-off-by: David Mueller <d.mueller@elsoft.ch>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/s3c2410_nand.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/mtd/nand/s3c2410_nand.c b/drivers/mtd/nand/s3c2410_nand.c
index f70daef..27351fb 100644
--- a/drivers/mtd/nand/s3c2410_nand.c
+++ b/drivers/mtd/nand/s3c2410_nand.c
@@ -133,9 +133,15 @@ int board_nand_init(struct nand_chip *nand)
writel(readl(&clk_power->clkcon) | (1 << 4), &clk_power->clkcon);
/* initialize hardware */
- twrph0 = 3;
- twrph1 = 0;
- tacls = 0;
+#if defined(CONFIG_S3C24XX_CUSTOM_NAND_TIMING)
+ tacls = CONFIG_S3C24XX_TACLS;
+ twrph0 = CONFIG_S3C24XX_TWRPH0;
+ twrph1 = CONFIG_S3C24XX_TWRPH1;
+#else
+ tacls = 4;
+ twrph0 = 8;
+ twrph1 = 8;
+#endif
cfg = S3C2410_NFCONF_EN;
cfg |= S3C2410_NFCONF_TACLS(tacls - 1);