From patchwork Wed Mar 18 13:32:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 6039131 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D620CBF90F for ; Wed, 18 Mar 2015 13:33:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E995D204FF for ; Wed, 18 Mar 2015 13:33:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3C1F2045E for ; Wed, 18 Mar 2015 13:33:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933235AbbCRNcP (ORCPT ); Wed, 18 Mar 2015 09:32:15 -0400 Received: from mail-we0-f176.google.com ([74.125.82.176]:33428 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933194AbbCRNcL (ORCPT ); Wed, 18 Mar 2015 09:32:11 -0400 Received: by weop45 with SMTP id p45so32464489weo.0 for ; Wed, 18 Mar 2015 06:32:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8AXwBIyikzwytrBSSVjKFV01oVcmiFLPpSyOtrHIYDM=; b=DxbqWzdRBC7L6a7SWO2QwuPMZM8DtjyHZCR8fXXdDzRGtwS0hRixNSNG2XQ6xfJ86T DBXSvWH182aih0gfMpAkUz6p3D2PhqhZhKlZFDZ6Ur0ApDkoVVh42suHp8FjTb+g0kTc MyMRbe5/Z/W87S/z/3KVju1pN5L16+1pvuBc8lr9Pu9/CjKze5FCLPFEGnJLFO4bPfUr EsCEm9QNBHUlG8442vB2TsyMIRcllZtrJ1G8xwLGpf6cqwG70UUTSW/4WSpDBWhzSqCH XfNx/cy8mP3C/90K2wJvEQPe7s/g+AsEXGqFdEtXtLzhr1R0JtfIXThO+b7r0envwOmH GRow== X-Gm-Message-State: ALoCoQl66mPLsxyX70HH0aVavPcl1ipgT9P2EtLiVxa/lPypd21fIlp1iQCU4Vub90k8qqWzjBc8 X-Received: by 10.194.57.206 with SMTP id k14mr144626985wjq.1.1426685529492; Wed, 18 Mar 2015 06:32:09 -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.08 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Mar 2015 06:32:08 -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 6/9] clk: qcom: Convert msm8974 to parent_map tables Date: Wed, 18 Mar 2015 15:32:12 +0200 Message-Id: <1426685535-25071-7-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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Georgi Djakov --- drivers/clk/qcom/gcc-msm8974.c | 33 +++++---- drivers/clk/qcom/mmcc-msm8974.c | 142 +++++++++++++++++++++------------------ 2 files changed, 95 insertions(+), 80 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/qcom/gcc-msm8974.c b/drivers/clk/qcom/gcc-msm8974.c index a6937fe78d8a..a7141145e902 100644 --- a/drivers/clk/qcom/gcc-msm8974.c +++ b/drivers/clk/qcom/gcc-msm8974.c @@ -32,14 +32,17 @@ #include "clk-branch.h" #include "reset.h" -#define P_XO 0 -#define P_GPLL0 1 -#define P_GPLL1 1 -#define P_GPLL4 2 +enum { + P_XO, + P_GPLL0, + P_GPLL1, + P_GPLL4, +}; -static const u8 gcc_xo_gpll0_map[] = { - [P_XO] = 0, - [P_GPLL0] = 1, +static const struct parent_map gcc_xo_gpll0_map[] = { + { P_XO, 0 }, + { P_GPLL0, 1}, + { } }; static const char *gcc_xo_gpll0[] = { @@ -47,10 +50,11 @@ static const char *gcc_xo_gpll0[] = { "gpll0_vote", }; -static const u8 gcc_xo_gpll0_gpll4_map[] = { - [P_XO] = 0, - [P_GPLL0] = 1, - [P_GPLL4] = 5, +static const struct parent_map gcc_xo_gpll0_gpll4_map[] = { + { P_XO, 0 }, + { P_GPLL0, 1 }, + { P_GPLL4, 5 }, + { } }; static const char *gcc_xo_gpll0_gpll4[] = { @@ -984,9 +988,10 @@ static const struct freq_tbl ftbl_gcc_usb_hsic_clk[] = { { } }; -static u8 usb_hsic_clk_src_map[] = { - [P_XO] = 0, - [P_GPLL1] = 4, +static const struct parent_map usb_hsic_clk_src_map[] = { + { P_XO, 0 }, + { P_GPLL1, 4 }, + { } }; static struct clk_rcg2 usb_hsic_clk_src = { diff --git a/drivers/clk/qcom/mmcc-msm8974.c b/drivers/clk/qcom/mmcc-msm8974.c index be94c54a9a4f..a3b7af3ace43 100644 --- a/drivers/clk/qcom/mmcc-msm8974.c +++ b/drivers/clk/qcom/mmcc-msm8974.c @@ -32,26 +32,29 @@ #include "clk-branch.h" #include "reset.h" -#define P_XO 0 -#define P_MMPLL0 1 -#define P_EDPLINK 1 -#define P_MMPLL1 2 -#define P_HDMIPLL 2 -#define P_GPLL0 3 -#define P_EDPVCO 3 -#define P_GPLL1 4 -#define P_DSI0PLL 4 -#define P_DSI0PLL_BYTE 4 -#define P_MMPLL2 4 -#define P_MMPLL3 4 -#define P_DSI1PLL 5 -#define P_DSI1PLL_BYTE 5 - -static const u8 mmcc_xo_mmpll0_mmpll1_gpll0_map[] = { - [P_XO] = 0, - [P_MMPLL0] = 1, - [P_MMPLL1] = 2, - [P_GPLL0] = 5, +enum { + P_XO, + P_MMPLL0, + P_EDPLINK, + P_MMPLL1, + P_HDMIPLL, + P_GPLL0, + P_EDPVCO, + P_GPLL1, + P_DSI0PLL, + P_DSI0PLL_BYTE, + P_MMPLL2, + P_MMPLL3, + P_DSI1PLL, + P_DSI1PLL_BYTE, +}; + +static const struct parent_map mmcc_xo_mmpll0_mmpll1_gpll0_map[] = { + { P_XO, 0 }, + { P_MMPLL0, 1 }, + { P_MMPLL1, 2 }, + { P_GPLL0, 5 }, + { } }; static const char *mmcc_xo_mmpll0_mmpll1_gpll0[] = { @@ -61,13 +64,14 @@ static const char *mmcc_xo_mmpll0_mmpll1_gpll0[] = { "mmss_gpll0_vote", }; -static const u8 mmcc_xo_mmpll0_dsi_hdmi_gpll0_map[] = { - [P_XO] = 0, - [P_MMPLL0] = 1, - [P_HDMIPLL] = 4, - [P_GPLL0] = 5, - [P_DSI0PLL] = 2, - [P_DSI1PLL] = 3, +static const struct parent_map mmcc_xo_mmpll0_dsi_hdmi_gpll0_map[] = { + { P_XO, 0 }, + { P_MMPLL0, 1 }, + { P_HDMIPLL, 4 }, + { P_GPLL0, 5 }, + { P_DSI0PLL, 2 }, + { P_DSI1PLL, 3 }, + { } }; static const char *mmcc_xo_mmpll0_dsi_hdmi_gpll0[] = { @@ -79,12 +83,13 @@ static const char *mmcc_xo_mmpll0_dsi_hdmi_gpll0[] = { "dsi1pll", }; -static const u8 mmcc_xo_mmpll0_1_2_gpll0_map[] = { - [P_XO] = 0, - [P_MMPLL0] = 1, - [P_MMPLL1] = 2, - [P_GPLL0] = 5, - [P_MMPLL2] = 3, +static const struct parent_map mmcc_xo_mmpll0_1_2_gpll0_map[] = { + { P_XO, 0 }, + { P_MMPLL0, 1 }, + { P_MMPLL1, 2 }, + { P_GPLL0, 5 }, + { P_MMPLL2, 3 }, + { } }; static const char *mmcc_xo_mmpll0_1_2_gpll0[] = { @@ -95,12 +100,13 @@ static const char *mmcc_xo_mmpll0_1_2_gpll0[] = { "mmpll2", }; -static const u8 mmcc_xo_mmpll0_1_3_gpll0_map[] = { - [P_XO] = 0, - [P_MMPLL0] = 1, - [P_MMPLL1] = 2, - [P_GPLL0] = 5, - [P_MMPLL3] = 3, +static const struct parent_map mmcc_xo_mmpll0_1_3_gpll0_map[] = { + { P_XO, 0 }, + { P_MMPLL0, 1 }, + { P_MMPLL1, 2 }, + { P_GPLL0, 5 }, + { P_MMPLL3, 3 }, + { } }; static const char *mmcc_xo_mmpll0_1_3_gpll0[] = { @@ -111,12 +117,13 @@ static const char *mmcc_xo_mmpll0_1_3_gpll0[] = { "mmpll3", }; -static const u8 mmcc_xo_mmpll0_1_gpll1_0_map[] = { - [P_XO] = 0, - [P_MMPLL0] = 1, - [P_MMPLL1] = 2, - [P_GPLL0] = 5, - [P_GPLL1] = 4, +static const struct parent_map mmcc_xo_mmpll0_1_gpll1_0_map[] = { + { P_XO, 0 }, + { P_MMPLL0, 1 }, + { P_MMPLL1, 2 }, + { P_GPLL0, 5 }, + { P_GPLL1, 4 }, + { } }; static const char *mmcc_xo_mmpll0_1_gpll1_0[] = { @@ -127,13 +134,14 @@ static const char *mmcc_xo_mmpll0_1_gpll1_0[] = { "gpll1_vote", }; -static const u8 mmcc_xo_dsi_hdmi_edp_map[] = { - [P_XO] = 0, - [P_EDPLINK] = 4, - [P_HDMIPLL] = 3, - [P_EDPVCO] = 5, - [P_DSI0PLL] = 1, - [P_DSI1PLL] = 2, +static const struct parent_map mmcc_xo_dsi_hdmi_edp_map[] = { + { P_XO, 0 }, + { P_EDPLINK, 4 }, + { P_HDMIPLL, 3 }, + { P_EDPVCO, 5 }, + { P_DSI0PLL, 1 }, + { P_DSI1PLL, 2 }, + { } }; static const char *mmcc_xo_dsi_hdmi_edp[] = { @@ -145,13 +153,14 @@ static const char *mmcc_xo_dsi_hdmi_edp[] = { "dsi1pll", }; -static const u8 mmcc_xo_dsi_hdmi_edp_gpll0_map[] = { - [P_XO] = 0, - [P_EDPLINK] = 4, - [P_HDMIPLL] = 3, - [P_GPLL0] = 5, - [P_DSI0PLL] = 1, - [P_DSI1PLL] = 2, +static const struct parent_map mmcc_xo_dsi_hdmi_edp_gpll0_map[] = { + { P_XO, 0 }, + { P_EDPLINK, 4 }, + { P_HDMIPLL, 3 }, + { P_GPLL0, 5 }, + { P_DSI0PLL, 1 }, + { P_DSI1PLL, 2 }, + { } }; static const char *mmcc_xo_dsi_hdmi_edp_gpll0[] = { @@ -163,13 +172,14 @@ static const char *mmcc_xo_dsi_hdmi_edp_gpll0[] = { "dsi1pll", }; -static const u8 mmcc_xo_dsibyte_hdmi_edp_gpll0_map[] = { - [P_XO] = 0, - [P_EDPLINK] = 4, - [P_HDMIPLL] = 3, - [P_GPLL0] = 5, - [P_DSI0PLL_BYTE] = 1, - [P_DSI1PLL_BYTE] = 2, +static const struct parent_map mmcc_xo_dsibyte_hdmi_edp_gpll0_map[] = { + { P_XO, 0 }, + { P_EDPLINK, 4 }, + { P_HDMIPLL, 3 }, + { P_GPLL0, 5 }, + { P_DSI0PLL_BYTE, 1 }, + { P_DSI1PLL_BYTE, 2 }, + { } }; static const char *mmcc_xo_dsibyte_hdmi_edp_gpll0[] = {