From patchwork Wed Sep 16 13:24:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 53740 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by patches.linaro.org (Postfix) with ESMTPS id 77BCF22A0D for ; Wed, 16 Sep 2015 13:26:22 +0000 (UTC) Received: by lamp12 with SMTP id p12sf73132211lam.2 for ; Wed, 16 Sep 2015 06:26:21 -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=eBW1xVwNCMFjHyJUGXZGohk/NLnk2kpZ51GT+gZzoXs=; b=iPhFaRLq+cL0VGjcVrDbu97Ese01XFLCkRf/fHR9HnVGbsAhliHtbTKGw2/cLcWdkJ pA00RFnLC91dI3EVRWbujrCHMWyGt14qB/k9DxUygpSQBBZtQ20+NN5MKoQ3X20eUxwI JgEdG9JFdRG4pI2L5o5mQ0NweU02R5Xm7wRgm5ViBwI08tJEMThAwmDIn7mhpnUpGlg6 XpbZNZZqglA5kKzYeFNjRhiWO+7gm6tT/Je+9D3Dm7mmaj0ofnJtnITgFgdBlKVG98NB 0MkOiJv3J1k1XD3P2TebQ9mQ1j0gEwm6XQAvDrPgbPeVRde//D+gIW+3ouejU2S5gTMJ KFAg== X-Gm-Message-State: ALoCoQkDD1QJnKZX8exWeVKzLZDGOH8cfBBTh7MjXn7J4y+MqM1Gde9tYMZOGhf5Fvg9FzwdLgF7 X-Received: by 10.112.173.230 with SMTP id bn6mr5401436lbc.15.1442409981422; Wed, 16 Sep 2015 06:26:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.143.4 with SMTP id sa4ls482662lab.44.gmail; Wed, 16 Sep 2015 06:26:21 -0700 (PDT) X-Received: by 10.112.61.193 with SMTP id s1mr29010865lbr.83.1442409981176; Wed, 16 Sep 2015 06:26:21 -0700 (PDT) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id i4si18214516lai.25.2015.09.16.06.26.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 06:26:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by lbpo4 with SMTP id o4so103697820lbp.2 for ; Wed, 16 Sep 2015 06:26:21 -0700 (PDT) X-Received: by 10.112.199.70 with SMTP id ji6mr29312851lbc.73.1442409981029; Wed, 16 Sep 2015 06:26:21 -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.59.35 with SMTP id w3csp2453774lbq; Wed, 16 Sep 2015 06:26:20 -0700 (PDT) X-Received: by 10.50.79.164 with SMTP id k4mr15468031igx.16.1442409979989; Wed, 16 Sep 2015 06:26:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id if5si40728115pbb.200.2015.09.16.06.26.18; Wed, 16 Sep 2015 06:26:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753777AbbIPN0P (ORCPT + 29 others); Wed, 16 Sep 2015 09:26:15 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:38393 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753268AbbIPNYz (ORCPT ); Wed, 16 Sep 2015 09:24:55 -0400 Received: by wiclk2 with SMTP id lk2so70864711wic.1 for ; Wed, 16 Sep 2015 06:24:54 -0700 (PDT) X-Received: by 10.180.93.196 with SMTP id cw4mr19450804wib.54.1442409894176; Wed, 16 Sep 2015 06:24:54 -0700 (PDT) Received: from mms.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id ej5sm26610019wjd.22.2015.09.16.06.24.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 06:24:53 -0700 (PDT) From: Georgi Djakov To: sboyd@codeaurora.org Cc: mturquette@baylibre.com, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, georgi.djakov@linaro.org Subject: [PATCH v4 1/4] clk: qcom: Add MSM8916 iommu clocks Date: Wed, 16 Sep 2015 16:24:45 +0300 Message-Id: <1442409888-19917-2-git-send-email-georgi.djakov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1442409888-19917-1-git-send-email-georgi.djakov@linaro.org> References: <1442409888-19917-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.179 as permitted sender) smtp.mailfrom=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 TCU (Translation Control Unit) clocks that are needed for IOMMU. Signed-off-by: Georgi Djakov --- drivers/clk/qcom/gcc-msm8916.c | 48 ++++++++++++++++++++++++++ include/dt-bindings/clock/qcom,gcc-msm8916.h | 3 ++ 2 files changed, 51 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 83871b663e21..ad9316751eb2 100644 --- a/drivers/clk/qcom/gcc-msm8916.c +++ b/drivers/clk/qcom/gcc-msm8916.c @@ -2347,6 +2347,51 @@ static struct clk_branch gcc_sdcc2_apps_clk = { }, }; +static struct clk_rcg2 bimc_ddr_clk_src = { + .cmd_rcgr = 0x32004, + .hid_width = 5, + .parent_map = gcc_xo_gpll0_bimc_map, + .clkr.hw.init = &(struct clk_init_data){ + .name = "bimc_ddr_clk_src", + .parent_names = gcc_xo_gpll0_bimc, + .num_parents = 3, + .ops = &clk_rcg2_ops, + .flags = CLK_GET_RATE_NOCACHE, + }, +}; + +static struct clk_branch gcc_apss_tcu_clk = { + .halt_reg = 0x12018, + .clkr = { + .enable_reg = 0x4500c, + .enable_mask = BIT(1), + .hw.init = &(struct clk_init_data){ + .name = "gcc_apss_tcu_clk", + .parent_names = (const char *[]){ + "bimc_ddr_clk_src", + }, + .num_parents = 1, + .ops = &clk_branch2_ops, + }, + }, +}; + +static struct clk_branch gcc_gfx_tcu_clk = { + .halt_reg = 0x12020, + .clkr = { + .enable_reg = 0x4500c, + .enable_mask = BIT(2), + .hw.init = &(struct clk_init_data){ + .name = "gcc_gfx_tcu_clk", + .parent_names = (const char *[]){ + "bimc_ddr_clk_src", + }, + .num_parents = 1, + .ops = &clk_branch2_ops, + }, + }, +}; + static struct clk_branch gcc_gtcu_ahb_clk = { .halt_reg = 0x12044, .clkr = { @@ -2730,6 +2775,9 @@ static struct clk_regmap *gcc_msm8916_clocks[] = { [GCC_VENUS0_AHB_CLK] = &gcc_venus0_ahb_clk.clkr, [GCC_VENUS0_AXI_CLK] = &gcc_venus0_axi_clk.clkr, [GCC_VENUS0_VCODEC0_CLK] = &gcc_venus0_vcodec0_clk.clkr, + [BIMC_DDR_CLK_SRC] = &bimc_ddr_clk_src.clkr, + [GCC_APSS_TCU_CLK] = &gcc_apss_tcu_clk.clkr, + [GCC_GFX_TCU_CLK] = &gcc_gfx_tcu_clk.clkr, }; static struct gdsc *gcc_msm8916_gdscs[] = { diff --git a/include/dt-bindings/clock/qcom,gcc-msm8916.h b/include/dt-bindings/clock/qcom,gcc-msm8916.h index 11566c567356..9169ae656c77 100644 --- a/include/dt-bindings/clock/qcom,gcc-msm8916.h +++ b/include/dt-bindings/clock/qcom,gcc-msm8916.h @@ -152,6 +152,9 @@ #define GCC_VENUS0_AHB_CLK 135 #define GCC_VENUS0_AXI_CLK 136 #define GCC_VENUS0_VCODEC0_CLK 137 +#define BIMC_DDR_CLK_SRC 138 +#define GCC_APSS_TCU_CLK 139 +#define GCC_GFX_TCU_CLK 140 /* Indexes for GDSCs */ #define BIMC_GDSC 0