From patchwork Mon Mar 30 22:01:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dinh Nguyen X-Patchwork-Id: 456372 X-Patchwork-Delegate: marek.vasut@gmail.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 F11451400D5 for ; Tue, 31 Mar 2015 09:07:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 61112A743D; Tue, 31 Mar 2015 00:07:28 +0200 (CEST) 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 jvOBcS2iRkvv; Tue, 31 Mar 2015 00:07:28 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6E821A7458; Tue, 31 Mar 2015 00:07:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E56C9A7421 for ; Tue, 31 Mar 2015 00:07:02 +0200 (CEST) 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 HSFIZ4XZwAwB for ; Tue, 31 Mar 2015 00:07:02 +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 na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0074.outbound.protection.outlook.com [65.55.169.74]) by theia.denx.de (Postfix) with ESMTPS id 1C1A84B664 for ; Tue, 31 Mar 2015 00:06:56 +0200 (CEST) Received: from BN3PR0301CA0020.namprd03.prod.outlook.com ([25.160.180.158]) by BLUPR03MB017.namprd03.prod.outlook.com ([10.255.208.39]) with Microsoft SMTP Server (TLS) id 15.1.130.12; Mon, 30 Mar 2015 22:06:51 +0000 Received: from BN1AFFO11FD031.protection.gbl (2a01:111:f400:7c10::199) by BN3PR0301CA0020.outlook.office365.com (2a01:111:e400:4000::30) with Microsoft SMTP Server (TLS) id 15.1.125.19 via Frontend Transport; Mon, 30 Mar 2015 22:06:52 +0000 Received: from sj-itexedge04.altera.priv.altera.com (66.35.236.236) by BN1AFFO11FD031.mail.protection.outlook.com (10.58.52.185) with Microsoft SMTP Server (TLS) id 15.1.130.10 via Frontend Transport; Mon, 30 Mar 2015 22:06:51 +0000 Received: from na01-by2-obe.outbound.protection.outlook.com (207.46.163.242) by webmail.altera.com (66.35.236.236) with Microsoft SMTP Server (TLS) id 14.3.174.1; Mon, 30 Mar 2015 15:04:38 -0700 Received: from linux-builds1.altera.com (64.129.157.38) by BLUPR03MB1361.namprd03.prod.outlook.com (25.163.80.27) with Microsoft SMTP Server (TLS) id 15.1.118.21; Mon, 30 Mar 2015 22:06:37 +0000 From: To: , , , , , Date: Mon, 30 Mar 2015 17:01:09 -0500 Message-ID: <1427752878-18426-9-git-send-email-dinguyen@opensource.altera.com> X-Mailer: git-send-email 2.2.1 In-Reply-To: <1427752878-18426-1-git-send-email-dinguyen@opensource.altera.com> References: <1427752878-18426-1-git-send-email-dinguyen@opensource.altera.com> MIME-Version: 1.0 X-Originating-IP: [64.129.157.38] X-ClientProxiedBy: DM2PR10CA0067.namprd10.prod.outlook.com (10.141.241.35) To BLUPR03MB1361.namprd03.prod.outlook.com (25.163.80.27) Authentication-Results: denx.de; dkim=none (message not signed) header.d=none; denx.de; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1361; UriScan:; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB017; X-Forefront-Antispam-Report-Untrusted: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(42186005)(2950100001)(122386002)(50226001)(48376002)(62966003)(229853001)(50466002)(86362001)(77156002)(92566002)(47776003)(2201001)(46102003)(76176999)(19580405001)(53416004)(66066001)(87976001)(50986999)(19580395003)(86152002)(33646002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB1361; H:linux-builds1.altera.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:;UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:BLUPR03MB1361; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1361; BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:BLUPR03MB017; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB017; X-Forefront-PRVS: 05315CBE52 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1361 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1AFFO11FD031.protection.gbl Received-SPF: Fail (protection.outlook.com: domain of opensource.altera.com does not designate 66.35.236.236 as permitted sender) receiver=protection.outlook.com; client-ip=66.35.236.236; helo=sj-itexedge04.altera.priv.altera.com; Authentication-Results: spf=fail (sender IP is 66.35.236.236) smtp.mailfrom=dinguyen@opensource.altera.com; X-Forefront-Antispam-Report: CIP:66.35.236.236; CTRY:US; IPV:NLI; EFV:NLI; BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(339900001)(199003)(189002)(105606002)(106466001)(6806004)(229853001)(16796002)(50466002)(2201001)(86152002)(85426001)(19580395003)(77156002)(19580405001)(66066001)(47776003)(62966003)(48376002)(40100003)(122386002)(76176999)(50986999)(46102003)(50226001)(2950100001)(86362001)(92566002)(33646002)(87936001)(53416004)(7099025); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR03MB017; H:sj-itexedge04.altera.priv.altera.com; FPR:; SPF:Fail; MLV:ovrnspm; A:0; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Forefront-PRVS: 05315CBE52 X-OriginatorOrg: opensource.altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Mar 2015 22:06:51.5350 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a; Ip=[66.35.236.236]; Helo=[sj-itexedge04.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB017 Cc: u-boot@lists.denx.de, dinh.linux@gmail.com Subject: [U-Boot] [PATCHv3 08/17] arm: socfpga: spl: printout sdram size X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Dinh Nguyen Signed-off-by: Dinh Nguyen Reviewed-by: Marek Vasut --- v3: remove extra brackets v2: Add a debug print --- arch/arm/cpu/armv7/socfpga/spl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm/cpu/armv7/socfpga/spl.c b/arch/arm/cpu/armv7/socfpga/spl.c index 128fe7c..a008eac 100644 --- a/arch/arm/cpu/armv7/socfpga/spl.c +++ b/arch/arm/cpu/armv7/socfpga/spl.c @@ -54,6 +54,7 @@ u32 spl_boot_device(void) */ void spl_board_init(void) { + unsigned long sdram_size; #ifndef CONFIG_SOCFPGA_VIRTUAL_TARGET cm_config_t cm_default_cfg = { /* main group */ @@ -187,4 +188,7 @@ void spl_board_init(void) puts("SDRAM calibration failed!\n"); hang(); } + + sdram_size = sdram_calculate_size(); + debug("SDRAM: %ld MiB\n", sdram_size >> 20); }