From patchwork Mon Nov 29 15:49:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?David_M=C3=BCller_=28ELSOFT_AG=29?= X-Patchwork-Id: 73437 X-Patchwork-Delegate: scottwood@freescale.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2B5C21007D1 for ; Tue, 30 Nov 2010 02:49:24 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6BD9428278; Mon, 29 Nov 2010 16:49:21 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HgAn3XymnQnJ; Mon, 29 Nov 2010 16:49:21 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0E5928287; Mon, 29 Nov 2010 16:49:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2669828287 for ; Mon, 29 Nov 2010 16:49:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZhOC2giLZJ9F for ; Mon, 29 Nov 2010 16:49:15 +0100 (CET) X-Greylist: delayed 925 seconds by postgrey-1.27 at theia; Mon, 29 Nov 2010 16:49:12 CET X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail4.hostpark.net (mail4.hostpark.net [212.243.197.34]) by theia.denx.de (Postfix) with ESMTPS id 0613928278 for ; Mon, 29 Nov 2010 16:49:12 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail4.hostpark.net (Postfix) with ESMTP id 0A55C4C2B4; Mon, 29 Nov 2010 16:49:12 +0100 (CET) X-Virus-Scanned: by Hostpark/NetZone Mailprotection at hostpark.net Received: from mail4.hostpark.net ([127.0.0.1]) by localhost (mail4.hostpark.net [127.0.0.1]) (amavisd-new, port 10124) with ESMTP id ChU1NADBK8kn; Mon, 29 Nov 2010 16:49:11 +0100 (CET) Received: from [192.168.11.10] (80-218-33-144.dclient.hispeed.ch [80.218.33.144]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail4.hostpark.net (Postfix) with ESMTP id 64D544C2A4; Mon, 29 Nov 2010 16:49:11 +0100 (CET) Message-ID: <4CF3CB7F.6080001@elsoft.ch> Date: Mon, 29 Nov 2010 16:49:19 +0100 From: =?ISO-8859-1?Q?=22David_M=FCller_=28ELSOFT_AG=29=22?= Organization: ELSOFT AG User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.15) Gecko/20101027 SeaMonkey/2.0.10 MIME-Version: 1.0 To: u-boot@lists.denx.de References: <4CB2F602.30103@elsoft.ch> In-Reply-To: <4CB2F602.30103@elsoft.ch> X-Enigmail-Version: 1.0.1 Subject: [U-Boot] [PATCH] fix s3c2410_nand timing default values X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Hello The attached patch fixes wrong timing default values and adds the possibility to specify board specific timing value in the board config file. Dave Signed-off-by: David Mueller 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);