From patchwork Mon Jul 30 16:48:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 174053 X-Patchwork-Delegate: trini@ti.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 30FF52C0086 for ; Tue, 31 Jul 2012 02:50:39 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37837280D3; Mon, 30 Jul 2012 18:50:16 +0200 (CEST) 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 FP7FvO42oJkm; Mon, 30 Jul 2012 18:50:15 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7292280D4; Mon, 30 Jul 2012 18:49:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3249328090 for ; Mon, 30 Jul 2012 18:49:16 +0200 (CEST) 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 hArRrZvRLjOv for ; Mon, 30 Jul 2012 18:49:15 +0200 (CEST) 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 mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by theia.denx.de (Postfix) with ESMTPS id 42B20280B8 for ; Mon, 30 Jul 2012 18:49:13 +0200 (CEST) Received: by yhq56 with SMTP id 56so4943811yhq.3 for ; Mon, 30 Jul 2012 09:49:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=td7m/JmI9vvM21dVxf8+6ijJp3+yrLlLi2YxyQ+iHP0=; b=dh90EfH+z3uYiVEvge8YAIFgez0D1eYellZgrnL0g0dXqfR8OaelwF4MRw73pSbYUU WSOkrEQSNoX95ulQ/b7JEat5acHFtXN9HQh12JJybfSLj/urLu0Wpvd9pXH/AACoHw7N uEfDQjVyJ/21OTcrs/nBwWilmeaiylzlTGCuojCeUyMnc1qyS4Mt0/BcogUytBuD/RbD 2i6o8GGwUUPAE5yYLLntoZ0F/x9u42KgzlHDMomfC0P/EAIIANYLP+WAJeJpt5g9oGlD bKL245/cQJ9G99yo5LHBEN/iLzMxu/V9tKMLiM6io8YNbujjFMsUZ24lveEwbQa5Qp8u QrZg== Received: by 10.66.83.33 with SMTP id n1mr26052645pay.7.1343666951440; Mon, 30 Jul 2012 09:49:11 -0700 (PDT) Received: from localhost.localdomain (ip68-230-54-74.ph.ph.cox.net. [68.230.54.74]) by mx.google.com with ESMTPS id ny4sm8227805pbb.57.2012.07.30.09.49.10 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jul 2012 09:49:10 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Mon, 30 Jul 2012 09:48:53 -0700 Message-Id: <1343666943-25378-8-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1343666943-25378-1-git-send-email-trini@ti.com> References: <1343666943-25378-1-git-send-email-trini@ti.com> Subject: [U-Boot] [PATCH 07/17] am33xx: Rework DDR2 EMIF initalization slightly X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de With the previous bugfix we now don't need to set two different REF_CTRL values and instead set the final value. Signed-off-by: Tom Rini --- arch/arm/cpu/armv7/am33xx/emif4.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/arch/arm/cpu/armv7/am33xx/emif4.c b/arch/arm/cpu/armv7/am33xx/emif4.c index 2f4164d..8f7aadc 100644 --- a/arch/arm/cpu/armv7/am33xx/emif4.c +++ b/arch/arm/cpu/armv7/am33xx/emif4.c @@ -117,7 +117,6 @@ static void config_vtp(void) static void config_emif_ddr2(void) { - int i; int ret; struct sdram_config cfg; struct sdram_timing tmg; @@ -137,31 +136,19 @@ static void config_emif_ddr2(void) cfg.sdrcr = EMIF_SDCFG; cfg.sdrcr2 = EMIF_SDCFG; - cfg.refresh = 0x00004650; - cfg.refresh_sh = 0x00004650; + cfg.refresh = EMIF_SDREF; + cfg.refresh_sh = EMIF_SDREF; /* Program EMIF instance */ ret = config_ddr_phy(&phyc); if (ret < 0) printf("Couldn't configure phyc\n"); - ret = config_sdram(&cfg); - if (ret < 0) - printf("Couldn't configure SDRAM\n"); ret = set_sdram_timings(&tmg); if (ret < 0) printf("Couldn't configure timings\n"); - /* Delay */ - for (i = 0; i < 5000; i++) - ; - - cfg.refresh = EMIF_SDREF; - cfg.refresh_sh = EMIF_SDREF; - cfg.sdrcr = EMIF_SDCFG; - cfg.sdrcr2 = EMIF_SDCFG; - ret = config_sdram(&cfg); if (ret < 0) printf("Couldn't configure SDRAM\n");