From patchwork Mon Feb 20 08:13:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 94187 Delivered-To: patch@linaro.org Received: by 10.182.3.34 with SMTP id 2csp1247007obz; Mon, 20 Feb 2017 01:10:15 -0800 (PST) X-Received: by 10.28.102.67 with SMTP id a64mr18751236wmc.140.1487581815169; Mon, 20 Feb 2017 01:10:15 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id j83si11530146wmj.140.2017.02.20.01.10.14; Mon, 20 Feb 2017 01:10:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7B614B38C7; Mon, 20 Feb 2017 09:50:40 +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 2an9qO6SWQeO; Mon, 20 Feb 2017 09:50:40 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 41B5A4B63E; Mon, 20 Feb 2017 09:41:01 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 54B5AB39DA for ; Mon, 20 Feb 2017 09:40:52 +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 6MDm-92obGSe for ; Mon, 20 Feb 2017 09:40:52 +0100 (CET) X-Greylist: delayed 519 seconds by postgrey-1.34 at theia; Mon, 20 Feb 2017 09:25:25 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 condef-10.nifty.com (condef-10.nifty.com [202.248.20.75]) by theia.denx.de (Postfix) with ESMTPS id 404403B17 for ; Mon, 20 Feb 2017 09:25:25 +0100 (CET) Received: from conuserg-11.nifty.com ([10.126.8.74])by condef-10.nifty.com with ESMTP id v1K8Dsnd021812 for ; Mon, 20 Feb 2017 17:13:54 +0900 Received: from pug.jp.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id v1K8Dndj025025; Mon, 20 Feb 2017 17:13:49 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com v1K8Dndj025025 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1487578430; bh=J0BdEs1Mtoy8mR1sV5NvLJRXOA8bdkUbi7kegnDHE+I=; h=From:To:Cc:Subject:Date:From; b=EjDISIbSCc6kSPq6kaSQy6siqeVTmee6FvAN1w7cV20/KJKjPxFXzXfMyz3Imij/S Qjy8bbH3/CyD4iPQGUCKuy5cPRyhA583KwGJMSWBE29OlHAOmuiL+63j3YHUhSmNxk axZ2RZ+NPYEKg8WkNEEqp/lxQQMGxdriyX4NvYFgwXil+SVSwolZSZ8NPLSPcYtovj cCeRJgAo+6pEUl85xEb1/2+MBXAdFmVNwySzvy9gkBrKK9869Z9b8RoxfDYtY6TN4T xgk+6qqwF1FEIwo3vz5R87HKvsXJo2MCM1X3rsCGr4ITrLCk8exwPW6XHuzZbBxzph zr0GLpk2/HO9A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 20 Feb 2017 17:13:32 +0900 Message-Id: <1487578412-10087-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Cc: Albert Aribaud Subject: [U-Boot] [PATCH] ARM: uniphier: skip memreserve of unused DRAM bank of LD20 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now the "for" loop here iterates on the detected memory banks. It must skip unused DRAM banks. Fixes: c995f3a3c526 ("ARM: uniphier: use gd->bd->bi_dram for memory reserve on LD20 SoC") Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/dram_init.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index d121a3b..4b7b867 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -263,6 +263,9 @@ int ft_board_setup(void *fdt, bd_t *bd) return 0; for (i = 0; i < ARRAY_SIZE(gd->bd->bi_dram); i++) { + if (!gd->bd->bi_dram[i].size) + continue; + rsv_addr = gd->bd->bi_dram[i].start + gd->bd->bi_dram[i].size; rsv_addr -= rsv_size;