From patchwork Thu Jul 19 07:28:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 946072 X-Patchwork-Delegate: yamada.m@jp.panasonic.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=socionext.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.b="GFpPTj38"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 41WQgC3TT3z9s1R for ; Thu, 19 Jul 2018 17:31:19 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3C259C21FA0; Thu, 19 Jul 2018 07:30:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 5F3B3C21FD1; Thu, 19 Jul 2018 07:29:19 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3C0CAC21FD1; Thu, 19 Jul 2018 07:28:54 +0000 (UTC) Received: from conuserg-11.nifty.com (conuserg-11.nifty.com [210.131.2.78]) by lists.denx.de (Postfix) with ESMTPS id A966EC21FC2 for ; Thu, 19 Jul 2018 07:28:50 +0000 (UTC) Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-11.nifty.com with ESMTP id w6J7STUC021119; Thu, 19 Jul 2018 16:28:31 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-11.nifty.com w6J7STUC021119 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1531985311; bh=OcgApAE7moeUUmWsG7Z9kFKONq+qHFOBR5jy4NcOsdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GFpPTj38snHMdcp7KPSflPK1o6SLD99W5VWzbrQD66atjoZO0K1eR2c5VojLIziMQ ogsaEwCiFtZkHRPii8+Gyj7KXXAiGXx84TbgnxjJ+1xpTQRgnHuCwVJUqGXWRSInkF Mn27YZGTlShxztPoG52eM9zUZuyv0XZdQgxkLVHE14Ru0yNgKxndB3YOYq/AzBWm93 31nCMKYaF7iuwSR2SpLWJr7yDUx1+B3w6kWuoRaySWB2HeOyG3ZA/8MP2DnDD50cMi Q0ehyGpFqL7PZFd2LJOszlx/e/BBiqkk5P+dX7sBhenOz0uAzRSagus1HD1YIIAPx/ C1hni02Je6BbQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Thu, 19 Jul 2018 16:28:24 +0900 Message-Id: <1531985307-4208-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1531985307-4208-1-git-send-email-yamada.masahiro@socionext.com> References: <1531985307-4208-1-git-send-email-yamada.masahiro@socionext.com> Cc: Tom Rini Subject: [U-Boot] [PATCH 3/6] ARM: uniphier: clean-up ft_board_setup() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The 'bd' is passed in ft_board_setup() as the second argument. Replace 'gd->bd' with 'bd'. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/dram_init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c index 2eb4836..8aa3f81 100644 --- a/arch/arm/mach-uniphier/dram_init.c +++ b/arch/arm/mach-uniphier/dram_init.c @@ -279,11 +279,11 @@ int ft_board_setup(void *fdt, bd_t *bd) if (uniphier_get_soc_id() != UNIPHIER_LD20_ID) return 0; - for (i = 0; i < ARRAY_SIZE(gd->bd->bi_dram); i++) { - if (!gd->bd->bi_dram[i].size) + for (i = 0; i < ARRAY_SIZE(bd->bi_dram); i++) { + if (!bd->bi_dram[i].size) continue; - rsv_addr = gd->bd->bi_dram[i].start + gd->bd->bi_dram[i].size; + rsv_addr = bd->bi_dram[i].start + bd->bi_dram[i].size; rsv_addr -= rsv_size; ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size);