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: 6039311 Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 27FF19F318 for ; Wed, 18 Mar 2015 13:38:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A055204FB for ; Wed, 18 Mar 2015 13:38:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1DC42204A9 for ; Wed, 18 Mar 2015 13:38:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755158AbbCRNdh (ORCPT ); Wed, 18 Mar 2015 09:33:37 -0400 Received: from mail-we0-f173.google.com ([74.125.82.173]:33456 "EHLO mail-we0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933203AbbCRNcM (ORCPT ); Wed, 18 Mar 2015 09:32:12 -0400 Received: by weop45 with SMTP id p45so32465101weo.0 for ; Wed, 18 Mar 2015 06:32:11 -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=5GfJs8HG7zAA2rc6Iej5s8TZJk1mZ4eIPx7mVWEorj8=; b=LlVv5SWTNNp6i22Y6m4M7wGvjVauAqesB7pHxd1UZgUtoEtjJo08q7DstO8w68RF40 6ydKp08Cg5dM3Il5pnrcA+t77r3ITRJjQ6cyU7nJnjCpFbVlZTEC0epmqyD+fAkG93JQ 1E/HdZ6QdWhMDF6d4VRpqtrLaM9FmuGngf2nqqkaSyMRX9OINC3ZWk2liQVf2RUAZ+gb dsxbQsrAJB4dHHYXt3j/0+p62GqGqvh5vakRht5keWYha307SlfnK7HNDwOg0WIkb3yM dkU3+uYl03Ut/s4nEtrkioFzNdDb+WK3TSsLAnl2RglyivLfDaaiUr8uSITqIgVhdNVY KX7g== X-Gm-Message-State: ALoCoQn4sjL7GVxUZBe/sWm1fvT4w0VwULKeZLwcsqQtk016ZL+cZ2p52ggY01A8/CptJI50Bzrd 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-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-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-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-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[] = {