From patchwork Fri Jul 22 04:38:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 72596 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp797807qga; Thu, 21 Jul 2016 21:37:40 -0700 (PDT) X-Received: by 10.28.211.10 with SMTP id k10mr2574245wmg.16.1469162260093; Thu, 21 Jul 2016 21:37:40 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id v10si7817556wmf.49.2016.07.21.21.37.39; Thu, 21 Jul 2016 21:37:40 -0700 (PDT) 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 2A1EBA767F; Fri, 22 Jul 2016 06:37:27 +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 9pEUL_wajdr8; Fri, 22 Jul 2016 06:37:27 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 61AE6A7573; Fri, 22 Jul 2016 06:37:26 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3DE7BA7573 for ; Fri, 22 Jul 2016 06:37:23 +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 TD6LQFB0qW7F for ; Fri, 22 Jul 2016 06:37:23 +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 conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id DB48EA761E for ; Fri, 22 Jul 2016 06:37:10 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u6M4amRl019169; Fri, 22 Jul 2016 13:36:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u6M4amRl019169 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1469162210; bh=afW0PBSVA9P9m6IShkJc1Kvj8PiSEjgSDeuCiE65PCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sMq/i3y4LpZhVVT1rWXx1Pw9gPZyp7y4JZcP3QGM5geVg+2pekxQ4A8+9A9dPoOnV JYfu9o538xChR+l3qHmLCCujUFLkQ72vhf8UvbPj8iZcaNj8BsYXW2hksxlewQkKwR KU59a2QddGO4fnpaWa2aftTzKC/E1aT35pd/ewPhTces8iehY38I3sNV0C1TtK9QEH fYZgPiilO0I5fSpm4acQygmij61PMt8JT4Ezx0IKEbvEEuKx0MXsEzyz6h6x7ZNFDC s3W65MVQql8gBEKk9vO1YRmHWWhgVZKzOS76hGgnIs+ESrAXVl0AuLJZg5879s8JJ5 +FnGkxGdTzeZw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Fri, 22 Jul 2016 13:38:32 +0900 Message-Id: <1469162313-17027-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469162313-17027-1-git-send-email-yamada.masahiro@socionext.com> References: <1469162313-17027-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 3/4] ARM: uniphier: introduce flags to uniphier_board_data structure 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" I need to add more board attributes, so the "flags" member will be handier than separate boolean ones. Signed-off-by: Masahiro Yamada --- arch/arm/mach-uniphier/boards.c | 4 ++-- arch/arm/mach-uniphier/dram/umc-ld4.c | 2 +- arch/arm/mach-uniphier/dram/umc-pro4.c | 2 +- arch/arm/mach-uniphier/dram/umc-sld8.c | 2 +- arch/arm/mach-uniphier/init.h | 3 ++- 5 files changed, 7 insertions(+), 6 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/boards.c b/arch/arm/mach-uniphier/boards.c index ed308f3..f8db1ee 100644 --- a/arch/arm/mach-uniphier/boards.c +++ b/arch/arm/mach-uniphier/boards.c @@ -38,7 +38,6 @@ static const struct uniphier_board_data uniphier_sld3_data = { static const struct uniphier_board_data uniphier_ld4_data = { .dram_freq = 1600, .dram_nr_ch = 2, - .dram_ddr3plus = true, .dram_ch[0] = { .base = 0x80000000, .size = 0x10000000, @@ -49,6 +48,7 @@ static const struct uniphier_board_data uniphier_ld4_data = { .size = 0x10000000, .width = 16, }, + .flags = UNIPHIER_BD_DDR3PLUS, }; #endif @@ -90,7 +90,6 @@ static const struct uniphier_board_data uniphier_pro4_2g_data = { static const struct uniphier_board_data uniphier_sld8_data = { .dram_freq = 1333, .dram_nr_ch = 2, - .dram_ddr3plus = true, .dram_ch[0] = { .base = 0x80000000, .size = 0x10000000, @@ -101,6 +100,7 @@ static const struct uniphier_board_data uniphier_sld8_data = { .size = 0x10000000, .width = 16, }, + .flags = UNIPHIER_BD_DDR3PLUS, }; #endif diff --git a/arch/arm/mach-uniphier/dram/umc-ld4.c b/arch/arm/mach-uniphier/dram/umc-ld4.c index fc75864..7641a9f 100644 --- a/arch/arm/mach-uniphier/dram/umc-ld4.c +++ b/arch/arm/mach-uniphier/dram/umc-ld4.c @@ -175,7 +175,7 @@ int uniphier_ld4_umc_init(const struct uniphier_board_data *bd) for (ch = 0; ch < DRAM_CH_NR; ch++) { ret = umc_ch_init(dc_base, ca_base, bd->dram_freq, bd->dram_ch[ch].size, - bd->dram_ddr3plus, ch); + !!(bd->flags & UNIPHIER_BD_DDR3PLUS), ch); if (ret) { pr_err("failed to initialize UMC ch%d\n", ch); return ret; diff --git a/arch/arm/mach-uniphier/dram/umc-pro4.c b/arch/arm/mach-uniphier/dram/umc-pro4.c index 853f561..02ee4b6 100644 --- a/arch/arm/mach-uniphier/dram/umc-pro4.c +++ b/arch/arm/mach-uniphier/dram/umc-pro4.c @@ -170,7 +170,7 @@ int uniphier_pro4_umc_init(const struct uniphier_board_data *bd) ret = umc_ch_init(dc_base, ca_base, bd->dram_freq, bd->dram_ch[ch].size, bd->dram_ch[ch].width, - bd->dram_ddr3plus); + !!(bd->flags & UNIPHIER_BD_DDR3PLUS)); if (ret) { pr_err("failed to initialize UMC ch%d\n", ch); return ret; diff --git a/arch/arm/mach-uniphier/dram/umc-sld8.c b/arch/arm/mach-uniphier/dram/umc-sld8.c index e831766..89a7e8c 100644 --- a/arch/arm/mach-uniphier/dram/umc-sld8.c +++ b/arch/arm/mach-uniphier/dram/umc-sld8.c @@ -178,7 +178,7 @@ int uniphier_sld8_umc_init(const struct uniphier_board_data *bd) for (ch = 0; ch < DRAM_CH_NR; ch++) { ret = umc_ch_init(dc_base, ca_base, bd->dram_freq, bd->dram_ch[ch].size, - bd->dram_ddr3plus, ch); + !!(bd->flags & UNIPHIER_BD_DDR3PLUS), ch); if (ret) { pr_err("failed to initialize UMC ch%d\n", ch); return ret; diff --git a/arch/arm/mach-uniphier/init.h b/arch/arm/mach-uniphier/init.h index cba0bc9..4dbce17 100644 --- a/arch/arm/mach-uniphier/init.h +++ b/arch/arm/mach-uniphier/init.h @@ -20,8 +20,9 @@ struct uniphier_dram_ch { struct uniphier_board_data { unsigned int dram_freq; unsigned int dram_nr_ch; - bool dram_ddr3plus; struct uniphier_dram_ch dram_ch[UNIPHIER_MAX_NR_DRAM_CH]; + unsigned int flags; +#define UNIPHIER_BD_DDR3PLUS BIT(2) }; const struct uniphier_board_data *uniphier_get_board_param(void);