From patchwork Fri Mar 4 06:54:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 63549 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp302289lbc; Thu, 3 Mar 2016 22:54:01 -0800 (PST) X-Received: by 10.28.32.13 with SMTP id g13mr3159008wmg.13.1457074441054; Thu, 03 Mar 2016 22:54:01 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id n66si2379419wmb.52.2016.03.03.22.54.00; Thu, 03 Mar 2016 22:54:01 -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; 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 00593A7669; Fri, 4 Mar 2016 07:53:59 +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 bCnBupZ0yEet; Fri, 4 Mar 2016 07:53:59 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 68AC5A7639; Fri, 4 Mar 2016 07:53:59 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0BEABA7639 for ; Fri, 4 Mar 2016 07:53:56 +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 cJ9wOYo8mPrg for ; Fri, 4 Mar 2016 07:53:55 +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 conuserg009-v.nifty.com (conuserg009.nifty.com [202.248.44.35]) by theia.denx.de (Postfix) with ESMTPS id 49515A745C for ; Fri, 4 Mar 2016 07:53:51 +0100 (CET) Received: from beagle.diag.org (p14090-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.90]) (authenticated) by conuserg009-v.nifty.com with ESMTP id u246riNc021821; Fri, 4 Mar 2016 15:53:44 +0900 X-Nifty-SrcIP: [153.142.97.90] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 4 Mar 2016 15:54:29 +0900 Message-Id: <1457074469-9999-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] ARM: uniphier: fix build error when CONFIG_CMD_DDRMPHY_DUMP=y 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" The build fails if compiled with CONFIG_CMD_DDRMPHY_DUMP=y since commit 46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data"). Fixes: 46abfcc99e04 ("ARM: uniphier: rework struct uniphier_board_data") Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/dram/cmd_ddrmphy.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) -- 1.9.1 _______________________________________________ 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/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c index c18f099..7ac9378 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c @@ -28,28 +28,14 @@ static int get_nr_ch(void) { const struct uniphier_board_data *bd = uniphier_get_board_param(); - return bd->dram_ch2_width ? 3 : 2; + return bd->dram_ch[2].size ? 3 : 2; } static int get_nr_datx8(int ch) { - unsigned int width; - const struct uniphier_board_data *bd = uniphier_get_board_param(); - switch (ch) { - case 0: - width = bd->dram_ch0_width; - break; - case 1: - width = bd->dram_ch1_width; - break; - default: - width = bd->dram_ch2_width; - break; - } - - return width / 8; + return bd->dram_ch[ch].width / 8; } static void print_bdl(void __iomem *reg, int n)