From patchwork Tue May 12 11:00:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 48337 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 3E6B22121F for ; Tue, 12 May 2015 11:01:36 +0000 (UTC) Received: by wgvl6 with SMTP id l6sf70494wgv.2 for ; Tue, 12 May 2015 04:01:35 -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=NE8pb6uP2W259PKxtGiM7ZdjcWdfJOVBxioLJ1CGvmk=; b=TgPv1HAfpYHBFQhi5lfWKuzCC2P9UTJBLe8LltihM0+HAD33kpKLaB2A/4tJyPNcp4 jWN0/1yAMp12TnqMEDLFp2XdJl6EEzgUQewfGN3Y0qX4d+hgEwYqAaRY1IExtPez4wcK CkwOG9rGBjgm9aYOIMZVymCk8VP+QyY9ngAzBfwxUgTIrQoV0+yxaQA0yaAfeUi1TC0U 2TZSb32e0GgdMxYSBIwbrqy9pyCgjya2n4lZEEWZmmB7K94vAS5UOE/VaRuv1u53Lj95 agMZJWnS/gF9nK+oCbZDRxhDimIjWSBHAQmOAdPlJsebddWkdrhF9GrvxJcfVJv3f2FD pFLA== X-Gm-Message-State: ALoCoQmQA4b2z619I+U7BIKAt7QQRpCd+F1h09nD+xho6xo4LSvO6owUyHOUwUAwDpTS/eMp4N9j X-Received: by 10.112.162.228 with SMTP id yd4mr10378684lbb.8.1431428495439; Tue, 12 May 2015 04:01:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.225.134 with SMTP id rk6ls15332lac.83.gmail; Tue, 12 May 2015 04:01:35 -0700 (PDT) X-Received: by 10.112.171.68 with SMTP id as4mr11683167lbc.64.1431428495163; Tue, 12 May 2015 04:01:35 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id sa9si10120320lbb.132.2015.05.12.04.01.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 May 2015 04:01:35 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbbzk7 with SMTP id zk7so2794274lbb.0 for ; Tue, 12 May 2015 04:01:35 -0700 (PDT) X-Received: by 10.112.29.36 with SMTP id g4mr11918796lbh.56.1431428495049; Tue, 12 May 2015 04:01:35 -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.108.230 with SMTP id hn6csp2016223lbb; Tue, 12 May 2015 04:01:33 -0700 (PDT) X-Received: by 10.70.6.161 with SMTP id c1mr27116897pda.76.1431428493265; Tue, 12 May 2015 04:01:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4si21986844pbq.65.2015.05.12.04.01.32; Tue, 12 May 2015 04:01:33 -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 S932477AbbELLBU (ORCPT + 28 others); Tue, 12 May 2015 07:01:20 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:37988 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932237AbbELLBN (ORCPT ); Tue, 12 May 2015 07:01:13 -0400 Received: by wicnf17 with SMTP id nf17so9764559wic.1 for ; Tue, 12 May 2015 04:01:12 -0700 (PDT) X-Received: by 10.194.23.197 with SMTP id o5mr29486201wjf.75.1431428472402; Tue, 12 May 2015 04:01:12 -0700 (PDT) Received: from mms.wifi.mm-sol.com ([37.157.136.206]) by mx.google.com with ESMTPSA id l3sm2284920wik.16.2015.05.12.04.01.11 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 May 2015 04:01:11 -0700 (PDT) From: Georgi Djakov To: sboyd@codeaurora.org Cc: mturquette@linaro.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH 2/3] clk: qcom: Add MSM8916 gpu clocks Date: Tue, 12 May 2015 14:00:37 +0300 Message-Id: <1431428438-8171-2-git-send-email-georgi.djakov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1431428438-8171-1-git-send-email-georgi.djakov@linaro.org> References: <1431428438-8171-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.172 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: , Add support for the msm8916 bimc clocks that are needed for GPU. Signed-off-by: Georgi Djakov --- drivers/clk/qcom/gcc-msm8916.c | 58 ++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8916.h | 3 ++ 2 files changed, 61 insertions(+) -- 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-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c index 7ad4c3751f43..0e2db91a1dfa 100644 --- a/drivers/clk/qcom/gcc-msm8916.c +++ b/drivers/clk/qcom/gcc-msm8916.c @@ -1094,6 +1094,27 @@ static struct clk_rcg2 apss_tcu_clk_src = { }, }; +static const struct freq_tbl ftbl_gcc_bimc_gpu_clk[] = { + F(100000000, P_GPLL0, 8, 0, 0), + F(200000000, P_GPLL0, 4, 0, 0), + F(266500000, P_BIMC, 4, 0, 0), + F(533000000, P_BIMC, 2, 0, 0), + { } +}; + +static struct clk_rcg2 bimc_gpu_clk_src = { + .cmd_rcgr = 0x31028, + .hid_width = 5, + .parent_map = gcc_xo_gpll0_bimc_map, + .freq_tbl = ftbl_gcc_bimc_gpu_clk, + .clkr.hw.init = &(struct clk_init_data){ + .name = "bimc_gpu_clk_src", + .parent_names = gcc_xo_gpll0_bimc, + .num_parents = 3, + .ops = &clk_rcg2_ops, + }, +}; + static const struct freq_tbl ftbl_gcc_usb_hs_system_clk[] = { F(80000000, P_GPLL0, 10, 0, 0), { } @@ -2449,6 +2470,40 @@ static struct clk_branch gcc_gtcu_ahb_clk = { }, }; +static struct clk_branch gcc_bimc_gfx_clk = { + .halt_reg = 0x31024, + .clkr = { + .enable_reg = 0x31024, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gcc_bimc_gfx_clk", + .parent_names = (const char *[]){ + "bimc_gpu_clk_src", + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_bimc_gpu_clk = { + .halt_reg = 0x31040, + .clkr = { + .enable_reg = 0x31040, + .enable_mask = BIT(0), + .hw.init = &(struct clk_init_data){ + .name = "gcc_bimc_gpu_clk", + .parent_names = (const char *[]){ + "bimc_gpu_clk_src", + }, + .num_parents = 1, + .flags = CLK_SET_RATE_PARENT, + .ops = &clk_branch2_ops, + }, + }, +}; + static struct clk_branch gcc_jpeg_tbu_clk = { .halt_reg = 0x12034, .clkr = { @@ -2779,6 +2834,9 @@ static struct clk_regmap *gcc_msm8916_clocks[] = { [GCC_BIMC_CLK] = &gcc_bimc_clk.clkr, [GCC_APSS_TCU_CLK] = &gcc_apss_tcu_clk.clkr, [GCC_GFX_TCU_CLK] = &gcc_gfx_tcu_clk.clkr, + [BIMC_GPU_CLK_SRC] = &bimc_gpu_clk_src.clkr, + [GCC_BIMC_GFX_CLK] = &gcc_bimc_gfx_clk.clkr, + [GCC_BIMC_GPU_CLK] = &gcc_bimc_gpu_clk.clkr, }; static const struct qcom_reset_map gcc_msm8916_resets[] = { diff --git a/include/dt-bindings/clock/qcom,gcc-msm8916.h b/include/dt-bindings/clock/qcom,gcc-msm8916.h index 0af3b49431df..1bac3dcc4f84 100644 --- a/include/dt-bindings/clock/qcom,gcc-msm8916.h +++ b/include/dt-bindings/clock/qcom,gcc-msm8916.h @@ -156,5 +156,8 @@ #define GCC_BIMC_CLK 139 #define GCC_APSS_TCU_CLK 140 #define GCC_GFX_TCU_CLK 141 +#define BIMC_GPU_CLK_SRC 142 +#define GCC_BIMC_GFX_CLK 143 +#define GCC_BIMC_GPU_CLK 144 #endif