From patchwork Thu Aug 13 14:48:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 52393 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 23EDF22EC6 for ; Thu, 13 Aug 2015 14:50:59 +0000 (UTC) Received: by lbsm2 with SMTP id m2sf17057717lbs.1 for ; Thu, 13 Aug 2015 07:50:58 -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=L/cCYRpXzjLFgAwD7fJCoY5va0GhAZ8wNhIOV8KBF9U=; b=Uyzmj7enLIz1bNQX1W0HBe4PMqCsQPKHzZuL3ZdvsLuEWkQ1lGi52k2CS6Bw6RjTjW Dfg2PM46TiXaNyrUIn7LeUDU4PTVp5uK1Ku2lU5VxruYmspP5LsVFwQhhazYvsBOiFXg ZHpKMqkxGAIgToHDseZCjxR06nXYN3Bk5kkezVQxWRRkORP4b5MdkjKDHMbAY7m78/wi vPN8XlWLqaRQGJbwwbgBi73zGE/KN4Vi7zBi2eb/P9h6BiMB/rnsOYfhf08QRL56mqnv xXiXmmFni80siLpyqMe695FTYkhyU6HYOgB8LLQ5lkmd/mwvq3BssP2lsGjvvBAXan2r oqLQ== X-Gm-Message-State: ALoCoQnaLZZFNVJNw30hk6Rv9d6C5SsCCOgqsAAIf3ZxOGxiBShLUx2NvGQnBqJCNOokNG0CO0Ws X-Received: by 10.152.25.233 with SMTP id f9mr11265796lag.5.1439477458058; Thu, 13 Aug 2015 07:50:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.129 with SMTP id s1ls192307las.11.gmail; Thu, 13 Aug 2015 07:50:57 -0700 (PDT) X-Received: by 10.152.18.232 with SMTP id z8mr37205518lad.66.1439477457759; Thu, 13 Aug 2015 07:50:57 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id ty7si2695957lbb.49.2015.08.13.07.50.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Aug 2015 07:50:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbcbn3 with SMTP id bn3so28338777lbc.2 for ; Thu, 13 Aug 2015 07:50:57 -0700 (PDT) X-Received: by 10.152.170.230 with SMTP id ap6mr20138643lac.73.1439477457544; Thu, 13 Aug 2015 07:50:57 -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.7.198 with SMTP id l6csp993980lba; Thu, 13 Aug 2015 07:50:56 -0700 (PDT) X-Received: by 10.66.138.16 with SMTP id qm16mr80518601pab.29.1439477455618; Thu, 13 Aug 2015 07:50:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fy16si4181133pdb.100.2015.08.13.07.50.54; Thu, 13 Aug 2015 07:50:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-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 S1753365AbbHMOux (ORCPT + 6 others); Thu, 13 Aug 2015 10:50:53 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:33481 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752447AbbHMOsw (ORCPT ); Thu, 13 Aug 2015 10:48:52 -0400 Received: by wijp15 with SMTP id p15so261990003wij.0 for ; Thu, 13 Aug 2015 07:48:51 -0700 (PDT) X-Received: by 10.180.107.70 with SMTP id ha6mr7092741wib.20.1439477330980; Thu, 13 Aug 2015 07:48:50 -0700 (PDT) Received: from mms.wifi.mm-sol.com ([37.157.136.206]) by smtp.googlemail.com with ESMTPSA id hn2sm3706749wjc.45.2015.08.13.07.48.49 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 13 Aug 2015 07:48:50 -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 v3 1/4] clk: qcom: Add MSM8916 iommu clocks Date: Thu, 13 Aug 2015 17:48:34 +0300 Message-Id: <1439477317-1902-2-git-send-email-georgi.djakov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1439477317-1902-1-git-send-email-georgi.djakov@linaro.org> References: <1439477317-1902-1-git-send-email-georgi.djakov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-arm-msm@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.177 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-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-msm8916.c b/drivers/clk/qcom/gcc-msm8916.c index 3bf4fb3deef6..83b7df476453 100644 --- a/drivers/clk/qcom/gcc-msm8916.c +++ b/drivers/clk/qcom/gcc-msm8916.c @@ -2358,6 +2358,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 = { @@ -2701,6 +2746,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 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 e430f644dd6c..53b39293d759 100644 --- a/include/dt-bindings/clock/qcom,gcc-msm8916.h +++ b/include/dt-bindings/clock/qcom,gcc-msm8916.h @@ -152,5 +152,8 @@ #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 #endif