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: 142326 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1421849ljj; Thu, 19 Jul 2018 00:30:59 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeC49PvUZJR7flYjYqmHmAPJ3757pYdh3AInUtjxpDdCAMvzK08gFR/dwBXSz/GSsL2fGT5 X-Received: by 2002:a50:ac65:: with SMTP id w34-v6mr10276133edc.211.1531985459885; Thu, 19 Jul 2018 00:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531985459; cv=none; d=google.com; s=arc-20160816; b=ThocQSl8fP5we1K0MK3ZQYDH7nSOpk0GVnVPvTiAyXZXdRjYVk4UZDvt8xhKi+XIt6 uSINI6xTw7fY7rmzBGj5b530+PdYce+XA8RgaLFRYCqjysRn4BSK7fr82JhMucC2iWYr SfVmFrbByrIMOJOG5Wi/NlIFS9y4CUBk8u8BZB9VFXr54Iqb6g7MmfM63+KEALc24IUl SXT89ZCyZudz3DU5Z9gr/ldiijgdkMIUzrFnmzPbfCVy1dGIQThtJbmvq+hjIqpTQFjt j8z5PiUVTF8Mf+aqAi+XZGpH3S2SCPxswpKaW9gAF2awsrQTfjLQpUuRLr5e3yoMNMhC 2cbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:dkim-signature:dkim-filter:arc-authentication-results; bh=YUtHCbKpRkjBuQ0EuAJLPOOHz0ixMfrJArJQHh3IX8Q=; b=rDzi+CbR9CmpU9Aoyd2TBV4nn+IU5v0SXz8jdF+wafU+fqpRDxq0MPQatZkZKTNoNh L8W4ZKaCJaIC6TPatEhvZM973tOk4iXjaOJd0v90o3+CNlvcTpVeaW46cJwbBEHTurfC mhxPydF/THzU13g0IBbl3AsXxQlnoEKVpIpWuLqGXxx6bcGaSwOcMW4zbFjoj+zPwJgN dKjSoENR5lJ1v6eOAPD4etFEndQx6EleP57+rsy0+oylv7zTA5ey0wT35+b4mjj+HyTp wXM0sK5hjIxX3Vsm9O+eY/y+KR0+5BYYJJv38p0O1bKM3gxxolbWKTZH0gUrAgTTZ1WM nL5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=GFpPTj38; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id z18-v6si201064edc.424.2018.07.19.00.30.59; Thu, 19 Jul 2018 00:30:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=GFpPTj38; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 5C639C21FD0; 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);