From patchwork Thu Feb 11 20:46:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alessandro Rubini X-Patchwork-Id: 71725 X-Patchwork-Delegate: albert.aribaud@free.fr Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id CDC04E917A3 for ; Thu, 11 Feb 2010 21:48:31 +0100 (CET) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id BD9B1C8C5CB4 for ; Thu, 11 Feb 2010 21:48:31 +0100 (CET) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.9) for (single-drop); Thu, 11 Feb 2010 21:48:31 +0100 (CET) Received: from murder (svr19.m-online.net [192.168.3.147]) by backend2 (Cyrus v2.2.12) with LMTPA; Thu, 11 Feb 2010 21:47:23 +0100 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend3.pop.m-online.net (Cyrus v2.2.13) with LMTPA; Thu, 11 Feb 2010 21:47:22 +0100 Received: from scanner-1.m-online.net (unknown [192.168.8.165]) by mail.m-online.net (Postfix) with ESMTP id E60D0200124; Thu, 11 Feb 2010 21:47:21 +0100 (CET) Received: from mxin-3.m-online.net ([192.168.6.165]) by scanner-1.m-online.net (scanner-1.m-online.net [192.168.8.165]) (amavisd-new, port 10026) with ESMTP id 21078-04; Thu, 11 Feb 2010 21:47:20 +0100 (CET) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-3.m-online.net (Postfix) with ESMTP id 1961947A4F9; Thu, 11 Feb 2010 21:47:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 89BBA280AD; Thu, 11 Feb 2010 21:47:01 +0100 (CET) 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 OnfkrW6oCTns; Thu, 11 Feb 2010 21:47:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 82728280D0; Thu, 11 Feb 2010 21:46:57 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92919280E3 for ; Thu, 11 Feb 2010 21:46:54 +0100 (CET) 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 SoEpquCzprCi for ; Thu, 11 Feb 2010 21:46:54 +0100 (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 mail.gnudd.com (mail2.gnudd.com [213.203.150.91]) by theia.denx.de (Postfix) with ESMTPS id 50B58280EE for ; Thu, 11 Feb 2010 21:46:52 +0100 (CET) Received: from mail.gnudd.com (localhost [127.0.0.1]) by mail.gnudd.com (8.14.3/8.14.3/Debian-5) with ESMTP id o1BKkoGa020286; Thu, 11 Feb 2010 21:46:50 +0100 Received: (from rubini@localhost) by mail.gnudd.com (8.14.3/8.14.3/Submit) id o1BKkoF3020285; Thu, 11 Feb 2010 21:46:50 +0100 Date: Thu, 11 Feb 2010 21:46:50 +0100 From: Alessandro Rubini To: u-boot@lists.denx.de Message-ID: <9f7307fc105747976bae44df5dae51357f54d578.1265920498.git.rubini@unipv.it> MIME-Version: 1.0 Content-Disposition: inline X-Face: #Q; A)@_4.#>0+_%y]7aBr:c"ndLp&#+2?]J; lkse\^)FP^Lr5@O0{)J; 'nny4%74.fM'n)M >ISCj.KmsL/HTxz!:Ju'pnj'Gz&. Organization: GnuDD, Device Drivers, Embedded Systems, Courses References: In-Reply-To: Subject: [U-Boot] [PATCH 2/2] edb93xx sdram: fix initialization 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 X-Virus-Scanned: by amavisd-new at m-online.net The configuration of SDRAM needs two more writel() operations, otherwise some boards won't be able to boot. These additional writes are present in vendor assembly code but were forgotten during the rewriting in C. Signed-off-by: Alessandro Rubini Acked-by: Matthias Kaehlcke --- board/edb93xx/sdram_cfg.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/board/edb93xx/sdram_cfg.c b/board/edb93xx/sdram_cfg.c index 6155f0e..418959a 100644 --- a/board/edb93xx/sdram_cfg.c +++ b/board/edb93xx/sdram_cfg.c @@ -59,13 +59,15 @@ void sdram_cfg(void) static void force_precharge(void) { + struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE; + + writel(GLCONFIG_INIT | GLCONFIG_CKE, &sdram->glconfig); /* * Errata most EP93xx revisions say that PRECHARGE ALL isn't always * issued. * * Do a read from each bank to make sure they're precharged */ - PRECHARGE_BANK(0); PRECHARGE_BANK(1); PRECHARGE_BANK(2); @@ -101,6 +103,9 @@ static void setup_refresh_timer(void) static void program_mode_registers(void) { + struct sdram_regs *sdram = (struct sdram_regs *)SDRAM_BASE; + + writel(GLCONFIG_MRS | GLCONFIG_CKE, &sdram->glconfig); /* * The mode registers are programmed by performing a read from each * SDRAM bank. The value of the address that is read defines the value