linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajendra Nayak <rnayak@codeaurora.org>
To: sboyd@codeaurora.org, mturquette@baylibre.com
Cc: linux-arm-msm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
	georgi.djakov@linaro.org, svarbanov@mm-sol.com,
	srinivas.kandagatla@linaro.org, sviau@codeaurora.org,
	Rajendra Nayak <rnayak@codeaurora.org>
Subject: [PATCH v7 09/13] clk: qcom: gdsc: Add GDSCs in msm8974 GCC
Date: Tue, 28 Jul 2015 15:04:02 +0530	[thread overview]
Message-ID: <1438076046-4706-10-git-send-email-rnayak@codeaurora.org> (raw)
In-Reply-To: <1438076046-4706-1-git-send-email-rnayak@codeaurora.org>

From: Stephen Boyd <sboyd@codeaurora.org>

There's just one GDSC as part of the msm8974 GCC block.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
---
 drivers/clk/qcom/Kconfig                     |  1 +
 drivers/clk/qcom/gcc-msm8974.c               | 16 ++++++++++++++++
 include/dt-bindings/clock/qcom,gcc-msm8974.h |  3 +++
 3 files changed, 20 insertions(+)

diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index abec45a..a6fcb1d 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -88,6 +88,7 @@ config MSM_MMCC_8960
 
 config MSM_GCC_8974
 	tristate "MSM8974 Global Clock Controller"
+	select QCOM_GDSC
 	depends on COMMON_CLK_QCOM
 	help
 	  Support for the global clock controller on msm8974 devices.
diff --git a/drivers/clk/qcom/gcc-msm8974.c b/drivers/clk/qcom/gcc-msm8974.c
index c39d098..9614597 100644
--- a/drivers/clk/qcom/gcc-msm8974.c
+++ b/drivers/clk/qcom/gcc-msm8974.c
@@ -31,6 +31,7 @@
 #include "clk-rcg.h"
 #include "clk-branch.h"
 #include "reset.h"
+#include "gdsc.h"
 
 enum {
 	P_XO,
@@ -2431,6 +2432,15 @@ static struct clk_branch gcc_usb_hsic_system_clk = {
 	},
 };
 
+static struct gdsc usb_hs_hsic_gdsc = {
+	.gdscr = 0x404,
+	.pd = {
+		.name = "usb_hs_hsic",
+	},
+	.pwrsts = PWRSTS_OFF_ON,
+	.con_ids = { NULL },
+};
+
 static struct clk_regmap *gcc_msm8974_clocks[] = {
 	[GPLL0] = &gpll0.clkr,
 	[GPLL0_VOTE] = &gpll0_vote,
@@ -2660,6 +2670,10 @@ static const struct qcom_reset_map gcc_msm8974_resets[] = {
 	[GCC_VENUS_RESTART] = { 0x1740 },
 };
 
+static struct gdsc *gcc_msm8974_gdscs[] = {
+	[USB_HS_HSIC_GDSC] = &usb_hs_hsic_gdsc,
+};
+
 static const struct regmap_config gcc_msm8974_regmap_config = {
 	.reg_bits	= 32,
 	.reg_stride	= 4,
@@ -2674,6 +2688,8 @@ static const struct qcom_cc_desc gcc_msm8974_desc = {
 	.num_clks = ARRAY_SIZE(gcc_msm8974_clocks),
 	.resets = gcc_msm8974_resets,
 	.num_resets = ARRAY_SIZE(gcc_msm8974_resets),
+	.gdscs = gcc_msm8974_gdscs,
+	.num_gdscs = ARRAY_SIZE(gcc_msm8974_gdscs),
 };
 
 static const struct of_device_id gcc_msm8974_match_table[] = {
diff --git a/include/dt-bindings/clock/qcom,gcc-msm8974.h b/include/dt-bindings/clock/qcom,gcc-msm8974.h
index 51e51c8..81d32f6 100644
--- a/include/dt-bindings/clock/qcom,gcc-msm8974.h
+++ b/include/dt-bindings/clock/qcom,gcc-msm8974.h
@@ -321,4 +321,7 @@
 #define GCC_SDCC1_CDCCAL_SLEEP_CLK				304
 #define GCC_SDCC1_CDCCAL_FF_CLK					305
 
+/* gdscs */
+#define USB_HS_HSIC_GDSC					0
+
 #endif
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

  parent reply	other threads:[~2015-07-28  9:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28  9:33 [PATCH v7 00/13] qcom: Add support for GDSCs Rajendra Nayak
2015-07-28  9:33 ` [PATCH v7 01/13] clk: " Rajendra Nayak
2015-07-31 16:22   ` Bjorn Andersson
2015-08-05  5:28     ` Rajendra Nayak
2015-08-03 19:24   ` Stephen Boyd
2015-08-05  5:31     ` Rajendra Nayak
2015-08-07 23:52       ` Stephen Boyd
2015-07-28  9:33 ` [PATCH v7 02/13] clk: qcom: gdsc: Prepare common clk probe to register gdscs Rajendra Nayak
2015-07-28  9:33 ` [PATCH v7 03/13] clk: qcom: gdsc: Use PM clocks to control gdsc clocks Rajendra Nayak
2015-07-28  9:33 ` [PATCH v7 04/13] clk: qcom: gdsc: Manage clocks with !CONFIG_PM Rajendra Nayak
2015-07-28  9:33 ` [PATCH v7 05/13] clk: qcom: gdsc: Enable an RCG before turing on the gdsc Rajendra Nayak
2015-07-28  9:33 ` [PATCH v7 06/13] clk: qcom: gdsc: Add support for Memory RET/OFF Rajendra Nayak
2015-07-28  9:34 ` [PATCH v7 07/13] clk: qcom: gdsc: Add support for ON only state Rajendra Nayak
2015-07-28  9:34 ` [PATCH v7 08/13] clk: qcom: gdsc: Add GDSCs in msm8916 GCC Rajendra Nayak
2015-07-28  9:34 ` Rajendra Nayak [this message]
2015-07-28  9:34 ` [PATCH v7 10/13] clk: qcom: gdsc: Add GDSCs in msm8974 MMCC Rajendra Nayak
2015-07-28  9:34 ` [PATCH v7 11/13] clk: qcom: gdsc: Add GDSCs in apq8084 GCC Rajendra Nayak
2015-07-28  9:34 ` [PATCH v7 12/13] clk: qcom: gdsc: Add GDSCs in apq8084 MMCC Rajendra Nayak
2015-07-31 14:54   ` Stanimir Varbanov
2015-08-06 10:31     ` Rajendra Nayak
2015-07-28  9:34 ` [PATCH v7 13/13] arm: dts: qcom: Add #power-domain-cells property Rajendra Nayak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438076046-4706-10-git-send-email-rnayak@codeaurora.org \
    --to=rnayak@codeaurora.org \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=svarbanov@mm-sol.com \
    --cc=sviau@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).