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: 45947 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 372672153C for ; Wed, 18 Mar 2015 13:33:30 +0000 (UTC) Received: by wghl18 with SMTP id l18sf7265220wgh.1 for ; Wed, 18 Mar 2015 06:33:29 -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=IdnfHB+bOSzaWB1Di50WeWWI2cAou80WMknyRPdcclY=; b=Zd0EoWH+b2io20oWN5K72MtjpI+4/oPPgFbRhYjr8DqY3C30+TcqrbO8GKdIpoKtuA iSEVovIMoHZ+Poi8tCEiG2J+Gbzz5QChnyUs3Zvk6eNdmVFRbK3Gh8tmGtKxfJWYQ5tb /Jz2zZR+JCtskJO4XqllYxWKFzWndWclRBo7diCeASt7UXSTp/+CPRmdVLa9mAp+mcVx SkK8Rhnq9/ocuG+Fggrm263TsbuMGwiEynrQVaNNGl/Dpfzo8aAXIxGXlCs312GDB9kH dkQBDwd6y7H3bQSxlSkUTBQRqtll480uetO8krttFPDc2lHoJzeU2yn4mV38gsRlvKu1 3dKQ== X-Gm-Message-State: ALoCoQnZstQPVzYnbpwWEm4wbsRbNk/WwVAjwzQ55XD4DjtxCRG8gQ08V2Bk2SEjj7L6wM539TUp X-Received: by 10.112.13.228 with SMTP id k4mr10874030lbc.8.1426685609421; Wed, 18 Mar 2015 06:33:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.199 with SMTP id x7ls167557lae.0.gmail; Wed, 18 Mar 2015 06:33:29 -0700 (PDT) X-Received: by 10.112.110.231 with SMTP id id7mr64558923lbb.28.1426685609114; Wed, 18 Mar 2015 06:33:29 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id j9si12932025lbc.32.2015.03.18.06.33.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 06:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by lbblx11 with SMTP id lx11so7461577lbb.3 for ; Wed, 18 Mar 2015 06:33:29 -0700 (PDT) X-Received: by 10.112.150.39 with SMTP id uf7mr14734313lbb.72.1426685609007; Wed, 18 Mar 2015 06:33:29 -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 h5csp1159840lbj; Wed, 18 Mar 2015 06:33:28 -0700 (PDT) X-Received: by 10.66.66.196 with SMTP id h4mr160667254pat.127.1426685607228; Wed, 18 Mar 2015 06:33:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si36083925pdo.198.2015.03.18.06.33.26; Wed, 18 Mar 2015 06:33:27 -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 S933368AbbCRNdW (ORCPT + 27 others); Wed, 18 Mar 2015 09:33:22 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:35222 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933215AbbCRNcN (ORCPT ); Wed, 18 Mar 2015 09:32:13 -0400 Received: by wibdy8 with SMTP id dy8so90385689wib.0 for ; Wed, 18 Mar 2015 06:32:12 -0700 (PDT) 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-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.173 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-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-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-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[] = {