From patchwork Fri Jun 5 12:40:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Djakov X-Patchwork-Id: 49572 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 921C32157C for ; Fri, 5 Jun 2015 12:40:58 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf17591192lbb.0 for ; Fri, 05 Jun 2015 05:40:57 -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=9xZ5cGlspP5EJ3LcRiC4mI2j6xdPGEb/tEPf70V1zGc=; b=ftfBrpBnCwQAzqMHrc+w3mbLIoZM5ckDRGpry7h2faK8QD5/oE3uWUdHewxia7vWmQ sovo2095Fv4g500FcOpNgVsVvCSBypTNrZBmNV75bvMIOZVb7EEiHJp0s/fl+QHJNiop XemSxAkiaLhMO3KybVaGKj7SLqdTjbR5c5qKYlaq2D21GDCG6fFpVlnXaOaEIjLEoYwV 9MeDm2Jac8FgIZtDdVc8dMiDYPSYFA98INoz74xrhY6hBG1l4zRzb5zm77kyXPmPZsW8 NZ/uJcnkPAQfGCNCk3A5DyHbFDJo2gKVubMJBhnMyMRY/wvvfM4PVQyHMA1ehSRKtab2 9+7g== X-Gm-Message-State: ALoCoQnhUoTLWkNimEqnoFOLytYIcAnxfvRYj6wHcNfQgq24VuIWypsmk7L38wBcJrgd74Kanan0 X-Received: by 10.180.19.72 with SMTP id c8mr31013969wie.2.1433508057522; Fri, 05 Jun 2015 05:40:57 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.8.171 with SMTP id dl11ls326144lad.55.gmail; Fri, 05 Jun 2015 05:40:57 -0700 (PDT) X-Received: by 10.112.120.162 with SMTP id ld2mr3223946lbb.68.1433508057323; Fri, 05 Jun 2015 05:40:57 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id rd3si4701585lac.167.2015.06.05.05.40.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 05:40:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by laar3 with SMTP id r3so4233640laa.3 for ; Fri, 05 Jun 2015 05:40:56 -0700 (PDT) X-Received: by 10.152.29.34 with SMTP id g2mr3184785lah.73.1433508056897; Fri, 05 Jun 2015 05:40:56 -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 hn6csp1401716lbb; Fri, 5 Jun 2015 05:40:55 -0700 (PDT) X-Received: by 10.66.66.197 with SMTP id h5mr5858940pat.29.1433508055104; Fri, 05 Jun 2015 05:40:55 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id go7si10773524pbc.46.2015.06.05.05.40.54; Fri, 05 Jun 2015 05:40: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 S1754587AbbFEMkw (ORCPT + 5 others); Fri, 5 Jun 2015 08:40:52 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:35062 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752743AbbFEMks (ORCPT ); Fri, 5 Jun 2015 08:40:48 -0400 Received: by wgme6 with SMTP id e6so55827673wgm.2 for ; Fri, 05 Jun 2015 05:40:46 -0700 (PDT) X-Received: by 10.194.110.100 with SMTP id hz4mr6355229wjb.6.1433508046633; Fri, 05 Jun 2015 05:40:46 -0700 (PDT) Received: from mms.wifi.mm-sol.com ([37.157.136.206]) by mx.google.com with ESMTPSA id l6sm3250172wib.18.2015.06.05.05.40.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 05:40:45 -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 v2 2/5] clk: qcom: Add MSM8916 iommu clocks Date: Fri, 5 Jun 2015 15:40:33 +0300 Message-Id: <1433508036-28644-3-git-send-email-georgi.djakov@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1433508036-28644-1-git-send-email-georgi.djakov@linaro.org> References: <1433508036-28644-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.215.46 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 TCU 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 c66f7bc2ae87..d493e9f3a2eb 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_ro_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