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: 45944 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 281882153C for ; Wed, 18 Mar 2015 13:32:47 +0000 (UTC) Received: by wghl18 with SMTP id l18sf7261590wgh.1 for ; Wed, 18 Mar 2015 06:32:46 -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=cIlo1SGkAkfIKH72fHYc/NAX2SbH+fmmrQiviTxE2iM=; b=LnlTPOEBb8XoJk1v7J5BECECwStOJgO2GZBfkbyewrOwczJxPYQDfb68jTs0T+YrnS gMxBq+8ojowdAOW12LHPW7g5LPJujWYKktYugHwm2Bvmn4sZwcLzuXOggkF/Yn8effP2 bsbNyc9GU2/OgbVK2lnTbeqZPZsAo/nhyAOh35QnNgYt/98ccMV+yz6clIXowqE7vBGD LxOXmC+ThgDr68flLmKlyFfAcCMVSgOxsgX0wh5BxEPW5yBpVjedVHEuIj/RuAzsYDPW Km9yrZC1ZEyU3FoRy4HUbHe04lTZ0Idl8hXajQHOoU91afkoBfD0Ol864SFbhSjIyu8E 3nmw== X-Gm-Message-State: ALoCoQnjETNWUZgbgLUHFW5ULRcSOcUpIqsGy+COKRxE63I7x9uXn8UnfA0+XO9av7JNfa5qTSBS X-Received: by 10.112.125.67 with SMTP id mo3mr9317289lbb.6.1426685566362; Wed, 18 Mar 2015 06:32:46 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.166 with SMTP id t6ls155393lat.83.gmail; Wed, 18 Mar 2015 06:32:45 -0700 (PDT) X-Received: by 10.112.182.69 with SMTP id ec5mr62067821lbc.118.1426685565895; Wed, 18 Mar 2015 06:32:45 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id s6si12918232las.86.2015.03.18.06.32.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Mar 2015 06:32:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by lamx15 with SMTP id x15so36105287lam.3 for ; Wed, 18 Mar 2015 06:32:45 -0700 (PDT) X-Received: by 10.152.206.70 with SMTP id lm6mr65596852lac.35.1426685565789; Wed, 18 Mar 2015 06:32:45 -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 h5csp1159376lbj; Wed, 18 Mar 2015 06:32:44 -0700 (PDT) X-Received: by 10.66.124.129 with SMTP id mi1mr161124432pab.21.1426685563713; Wed, 18 Mar 2015 06:32:43 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si21755228pdf.253.2015.03.18.06.32.42; Wed, 18 Mar 2015 06:32:43 -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 S933274AbbCRNcQ (ORCPT + 27 others); Wed, 18 Mar 2015 09:32:16 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:36010 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933028AbbCRNcK (ORCPT ); Wed, 18 Mar 2015 09:32:10 -0400 Received: by wibg7 with SMTP id g7so90405104wib.1 for ; Wed, 18 Mar 2015 06:32:09 -0700 (PDT) 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-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.215.53 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-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-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-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[] = {