From patchwork Wed Mar 18 13:32:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 6039161 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 5A5F1BF90F for ; Wed, 18 Mar 2015 13:33:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 83E8C2021B for ; Wed, 18 Mar 2015 13:33:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C4C42045E for ; Wed, 18 Mar 2015 13:33:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933123AbbCRNdW (ORCPT ); Wed, 18 Mar 2015 09:33:22 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:38349 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933211AbbCRNcN (ORCPT ); Wed, 18 Mar 2015 09:32:13 -0400 Received: by wifj2 with SMTP id j2so39865403wif.1 for ; Wed, 18 Mar 2015 06:32:12 -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=vzJPPnYzx1CWceduMKjKd7ipLWMGXq/gwmrL45wbwwM=; b=MY9eSQPZPsQuNHNXcdt/EtG6/NspWRB85WbCRKGsH3RKIWW2rKkvuTvye2pFy+7nvG 6/NWI0vrGTpJRTPbwa8Kuy1r/XpIbr//4YKe82155j/s/EVvKWHG48t/2nc/Aqz2I6az UQige+CxypsT+3EYE34IsppkZOwzKLQAX2vSDM+QzqzaOuObq22gEtgJZ2iItwfHHQqX 8goD9shT9PDNhBmHAPB6XzkZmbSRSnkMk2EH61fcteRBie8b4HZPajQOy3ewMq4VvP3f 74HeykqoypFJAaW9H9Pm0AUTL4xzWQ4JGQG9/fbu0Vl4dZZSBXTffPVF1Vz23pFhOeix Kr6w== X-Gm-Message-State: ALoCoQnNsmSW8zHLVH41VJKu/o+IgAzwZiaimuURQfqH15Ih5aS/23Sfo84bu02L8JukCDsfWtAa X-Received: by 10.194.8.2 with SMTP id n2mr139897383wja.46.1426685532395; Wed, 18 Mar 2015 06:32:12 -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.11 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Mar 2015 06:32:11 -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 8/9] clk: qcom: Convert ipq806x to parent_map tables Date: Wed, 18 Mar 2015 15:32:14 +0200 Message-Id: <1426685535-25071-9-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-ipq806x.c | 51 +++++++++++++++++++++++----------------- drivers/clk/qcom/lcc-ipq806x.c | 13 ++++++---- 2 files changed, 37 insertions(+), 27 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-ipq806x.c b/drivers/clk/qcom/gcc-ipq806x.c index a015bb06c09b..127a151f9bbc 100644 --- a/drivers/clk/qcom/gcc-ipq806x.c +++ b/drivers/clk/qcom/gcc-ipq806x.c @@ -140,15 +140,18 @@ static struct clk_regmap pll14_vote = { }, }; -#define P_PXO 0 -#define P_PLL8 1 -#define P_PLL3 1 -#define P_PLL0 2 -#define P_CXO 2 +enum { + P_PXO, + P_PLL8, + P_PLL3, + P_PLL0, + 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[] = { @@ -156,10 +159,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[] = { @@ -168,14 +172,16 @@ static const char *gcc_pxo_pll8_cxo[] = { "cxo", }; -static const u8 gcc_pxo_pll3_map[] = { - [P_PXO] = 0, - [P_PLL3] = 1, +static const struct parent_map gcc_pxo_pll3_map[] = { + { P_PXO, 0 }, + { P_PLL3, 1 }, + { } }; -static const u8 gcc_pxo_pll3_sata_map[] = { - [P_PXO] = 0, - [P_PLL3] = 6, +static const struct parent_map gcc_pxo_pll3_sata_map[] = { + { P_PXO, 0 }, + { P_PLL3, 6 }, + { } }; static const char *gcc_pxo_pll3[] = { @@ -183,10 +189,11 @@ static const char *gcc_pxo_pll3[] = { "pll3", }; -static const u8 gcc_pxo_pll8_pll0[] = { - [P_PXO] = 0, - [P_PLL8] = 3, - [P_PLL0] = 2, +static const struct parent_map gcc_pxo_pll8_pll0[] = { + { P_PXO, 0 }, + { P_PLL8, 3 }, + { P_PLL0, 2 }, + { } }; static const char *gcc_pxo_pll8_pll0_map[] = { diff --git a/drivers/clk/qcom/lcc-ipq806x.c b/drivers/clk/qcom/lcc-ipq806x.c index 19378b080dd7..5f261e695264 100644 --- a/drivers/clk/qcom/lcc-ipq806x.c +++ b/drivers/clk/qcom/lcc-ipq806x.c @@ -61,12 +61,15 @@ static const struct pll_config pll4_config = { .main_output_mask = BIT(23), }; -#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[] = {