From patchwork Wed Mar 18 13:32:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 45948 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 93A8B2153C for ; Wed, 18 Mar 2015 13:33:48 +0000 (UTC) Received: by wesk11 with SMTP id k11sf2580438wes.3 for ; Wed, 18 Mar 2015 06:33:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=VzIF4EAlpttcszn9dMhVwRhFj6tyUQj602HbPQPfZRE=; b=XhDDo1H8tumjWnzrtpQqq+eJDj8s6wYbt/MC9bwT6RgACLoiQw78madLI7md2Ays+V 5YzoRjhfHyZTwVsBTmp4wmBBEy3qBmstrhIt2o90qbEy3hkHNSH4+t0znCq6ZgOtD0nF 04Knv6FiHPnSIqHPFN30YM1ANqIE9t7dz+J1j9qN0kBwZF85b2J4IMHoOZJUeD34F/9N 58BsfkDKvNsP1RZW3BxJpE7W9z34+msr5T84doBF78YO4z2g0dhQlbQynAglLCCJkIsF FTIZzbkXp7jqaPKTjH6/Om7BwaA/GuaoNcuEk1kEz5J5okyW9+R8b0+MXA6jJOidxVka jjMA== X-Gm-Message-State: ALoCoQnPEIoi8vzJPvJ2Fi9uI5Dqr7v1piWqM6Bdk4FiaNS8lppxe6x+wSOX3rbp/60wp31OFJRT X-Received: by 10.112.125.67 with SMTP id mo3mr9318020lbb.6.1426685627908; Wed, 18 Mar 2015 06:33:47 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.4.5 with SMTP id ca5ls143146lad.96.gmail; Wed, 18 Mar 2015 06:33:47 -0700 (PDT) X-Received: by 10.152.28.5 with SMTP id x5mr63311911lag.112.1426685627495; Wed, 18 Mar 2015 06:33:47 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id v3si12929283lav.12.2015.03.18.06.33.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 06:33:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbblx11 with SMTP id lx11so7468780lbb.3 for ; Wed, 18 Mar 2015 06:33:47 -0700 (PDT) X-Received: by 10.112.204.197 with SMTP id la5mr63646122lbc.29.1426685627185; Wed, 18 Mar 2015 06:33:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1160025lbj; Wed, 18 Mar 2015 06:33:45 -0700 (PDT) X-Received: by 10.70.88.234 with SMTP id bj10mr137764232pdb.165.1426685624405; Wed, 18 Mar 2015 06:33:44 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ee5si36087314pac.139.2015.03.18.06.33.43; Wed, 18 Mar 2015 06:33:44 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756186AbbCRNdi (ORCPT + 27 others); Wed, 18 Mar 2015 09:33:38 -0400 Received: from mail-we0-f181.google.com ([74.125.82.181]:34108 "EHLO mail-we0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933199AbbCRNcM (ORCPT ); Wed, 18 Mar 2015 09:32:12 -0400 Received: by wegp1 with SMTP id p1so32442604weg.1 for ; Wed, 18 Mar 2015 06:32:11 -0700 (PDT) X-Received: by 10.181.8.99 with SMTP id dj3mr6852681wid.83.1426685530961; Wed, 18 Mar 2015 06:32:10 -0700 (PDT) Received: from mms.wifi.mm-sol.com ([37.157.136.206]) by mx.google.com with ESMTPSA id cf12sm24531838wjb.10.2015.03.18.06.32.09 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Mar 2015 06:32:10 -0700 (PDT) From: Georgi Djakov To: sboyd@codeaurora.org, mturquette@linaro.org Cc: galak@codeaurora.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v1 7/9] clk: qcom: Convert msm8960 to parent_map tables Date: Wed, 18 Mar 2015 15:32:13 +0200 Message-Id: <1426685535-25071-8-git-send-email-georgi.djakov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1426685535-25071-1-git-send-email-georgi.djakov@linaro.org> References: <1426685535-25071-1-git-send-email-georgi.djakov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: georgi.djakov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Signed-off-by: Georgi Djakov --- drivers/clk/qcom/gcc-msm8960.c | 35 +++++++++++++++----------- drivers/clk/qcom/lcc-msm8960.c | 13 ++++++---- drivers/clk/qcom/mmcc-msm8960.c | 53 +++++++++++++++++++++------------------ 3 files changed, 57 insertions(+), 44 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/clk/qcom/gcc-msm8960.c b/drivers/clk/qcom/gcc-msm8960.c index e60feffc10a1..51956727b0e6 100644 --- a/drivers/clk/qcom/gcc-msm8960.c +++ b/drivers/clk/qcom/gcc-msm8960.c @@ -113,14 +113,17 @@ static struct clk_regmap pll14_vote = { }, }; -#define P_PXO 0 -#define P_PLL8 1 -#define P_PLL3 2 -#define P_CXO 2 +enum { + P_PXO, + P_PLL8, + P_PLL3, + P_CXO, +}; -static const u8 gcc_pxo_pll8_map[] = { - [P_PXO] = 0, - [P_PLL8] = 3, +static const struct parent_map gcc_pxo_pll8_map[] = { + { P_PXO, 0 }, + { P_PLL8, 3 }, + { } }; static const char *gcc_pxo_pll8[] = { @@ -128,10 +131,11 @@ static const char *gcc_pxo_pll8[] = { "pll8_vote", }; -static const u8 gcc_pxo_pll8_cxo_map[] = { - [P_PXO] = 0, - [P_PLL8] = 3, - [P_CXO] = 5, +static const struct parent_map gcc_pxo_pll8_cxo_map[] = { + { P_PXO, 0 }, + { P_PLL8, 3 }, + { P_CXO, 5 }, + { } }; static const char *gcc_pxo_pll8_cxo[] = { @@ -140,10 +144,11 @@ static const char *gcc_pxo_pll8_cxo[] = { "cxo", }; -static const u8 gcc_pxo_pll8_pll3_map[] = { - [P_PXO] = 0, - [P_PLL8] = 3, - [P_PLL3] = 6, +static const struct parent_map gcc_pxo_pll8_pll3_map[] = { + { P_PXO, 0 }, + { P_PLL8, 3 }, + { P_PLL3, 6 }, + { } }; static const char *gcc_pxo_pll8_pll3[] = { diff --git a/drivers/clk/qcom/lcc-msm8960.c b/drivers/clk/qcom/lcc-msm8960.c index e2c863295f00..b88b8687dbe7 100644 --- a/drivers/clk/qcom/lcc-msm8960.c +++ b/drivers/clk/qcom/lcc-msm8960.c @@ -47,12 +47,15 @@ static struct clk_pll pll4 = { }, }; -#define P_PXO 0 -#define P_PLL4 1 +enum { + P_PXO, + P_PLL4, +}; -static const u8 lcc_pxo_pll4_map[] = { - [P_PXO] = 0, - [P_PLL4] = 2, +static const struct parent_map lcc_pxo_pll4_map[] = { + { P_PXO, 0 }, + { P_PLL4, 2 }, + { } }; static const char *lcc_pxo_pll4[] = { diff --git a/drivers/clk/qcom/mmcc-msm8960.c b/drivers/clk/qcom/mmcc-msm8960.c index e8b33bbc362f..eff872cc2baf 100644 --- a/drivers/clk/qcom/mmcc-msm8960.c +++ b/drivers/clk/qcom/mmcc-msm8960.c @@ -33,18 +33,22 @@ #include "clk-branch.h" #include "reset.h" -#define P_PXO 0 -#define P_PLL8 1 -#define P_PLL2 2 -#define P_PLL3 3 -#define P_PLL15 3 +enum { + P_PXO, + P_PLL8, + P_PLL2, + P_PLL3, + P_PLL15, + P_HDMI_PLL, +}; #define F_MN(f, s, _m, _n) { .freq = f, .src = s, .m = _m, .n = _n } -static u8 mmcc_pxo_pll8_pll2_map[] = { - [P_PXO] = 0, - [P_PLL8] = 2, - [P_PLL2] = 1, +static const struct parent_map mmcc_pxo_pll8_pll2_map[] = { + { P_PXO, 0 }, + { P_PLL8, 2 }, + { P_PLL2, 1 }, + { } }; static const char *mmcc_pxo_pll8_pll2[] = { @@ -53,11 +57,12 @@ static const char *mmcc_pxo_pll8_pll2[] = { "pll2", }; -static u8 mmcc_pxo_pll8_pll2_pll3_map[] = { - [P_PXO] = 0, - [P_PLL8] = 2, - [P_PLL2] = 1, - [P_PLL3] = 3, +static const struct parent_map mmcc_pxo_pll8_pll2_pll3_map[] = { + { P_PXO, 0 }, + { P_PLL8, 2 }, + { P_PLL2, 1 }, + { P_PLL3, 3 }, + { } }; static const char *mmcc_pxo_pll8_pll2_pll15[] = { @@ -67,11 +72,12 @@ static const char *mmcc_pxo_pll8_pll2_pll15[] = { "pll15", }; -static u8 mmcc_pxo_pll8_pll2_pll15_map[] = { - [P_PXO] = 0, - [P_PLL8] = 2, - [P_PLL2] = 1, - [P_PLL15] = 3, +static const struct parent_map mmcc_pxo_pll8_pll2_pll15_map[] = { + { P_PXO, 0 }, + { P_PLL8, 2 }, + { P_PLL2, 1 }, + { P_PLL15, 3 }, + { } }; static const char *mmcc_pxo_pll8_pll2_pll3[] = { @@ -1377,11 +1383,10 @@ static struct clk_branch rot_clk = { }, }; -#define P_HDMI_PLL 1 - -static u8 mmcc_pxo_hdmi_map[] = { - [P_PXO] = 0, - [P_HDMI_PLL] = 3, +static const struct parent_map mmcc_pxo_hdmi_map[] = { + { P_PXO, 0 }, + { P_HDMI_PLL, 3 }, + { } }; static const char *mmcc_pxo_hdmi[] = {