From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Rajendra Nayak <rnayak@codeaurora.org>
Cc: sboyd@kernel.org, mturquette@baylibre.com,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
stanimir.varbanov@linaro.org, vivek.gautam@codeaurora.org,
srinivas.kandagatla@linaro.org
Subject: Re: [PATCH v2 1/3] clk: qcom: gdsc: Add support for ALWAYS_ON gdscs
Date: Fri, 25 May 2018 11:18:15 -0700 [thread overview]
Message-ID: <20180525181815.GE14924@minitux> (raw)
In-Reply-To: <20180323082616.10142-2-rnayak@codeaurora.org>
On Fri 23 Mar 01:26 PDT 2018, Rajendra Nayak wrote:
> Some GDSCs might have software control to turn them off, but we might
> want to keep them enabled always, in some cases because of lack of
> support in kernel to handle a graceful turning off/on of such GDSCs.
> Most common instances would be the GDCSs which power up the noc/bus
> fabrics, which need bus drivers to handle them and atleast support for
> which is missing on all qcom SoCs.
>
> Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Regards,
Bjorn
> ---
> drivers/clk/qcom/gdsc.c | 8 ++++++++
> drivers/clk/qcom/gdsc.h | 1 +
> 2 files changed, 9 insertions(+)
>
> diff --git a/drivers/clk/qcom/gdsc.c b/drivers/clk/qcom/gdsc.c
> index a4f3580587b7..15f4bb5efd68 100644
> --- a/drivers/clk/qcom/gdsc.c
> +++ b/drivers/clk/qcom/gdsc.c
> @@ -291,6 +291,14 @@ static int gdsc_init(struct gdsc *sc)
> if ((sc->flags & VOTABLE) && on)
> gdsc_enable(&sc->pd);
>
> + /* If ALWAYS_ON GDSCs are not ON, turn them ON */
> + if (sc->flags & ALWAYS_ON) {
> + if (!on)
> + gdsc_enable(&sc->pd);
> + on = true;
> + sc->pd.flags |= GENPD_FLAG_ALWAYS_ON;
> + }
> +
> if (on || (sc->pwrsts & PWRSTS_RET))
> gdsc_force_mem_on(sc);
> else
> diff --git a/drivers/clk/qcom/gdsc.h b/drivers/clk/qcom/gdsc.h
> index 39648348e5ec..7fd78cec7e5b 100644
> --- a/drivers/clk/qcom/gdsc.h
> +++ b/drivers/clk/qcom/gdsc.h
> @@ -53,6 +53,7 @@ struct gdsc {
> #define VOTABLE BIT(0)
> #define CLAMP_IO BIT(1)
> #define HW_CTRL BIT(2)
> +#define ALWAYS_ON BIT(3)
> struct reset_controller_dev *rcdev;
> unsigned int *resets;
> unsigned int reset_count;
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>
> --
> 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
next prev parent reply other threads:[~2018-05-25 18:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-23 8:26 [PATCH v2 0/3] clk: qcom: msm8996: handle mmagic gdscs and clocks Rajendra Nayak
2018-03-23 8:26 ` [PATCH v2 1/3] clk: qcom: gdsc: Add support for ALWAYS_ON gdscs Rajendra Nayak
2018-05-25 18:18 ` Bjorn Andersson [this message]
2018-05-25 18:20 ` Srinivas Kandagatla
2018-06-01 18:05 ` Stephen Boyd
2018-03-23 8:26 ` [PATCH v2 2/3] clk: qcom: Register the gdscs before the clocks Rajendra Nayak
2018-05-25 18:18 ` Bjorn Andersson
2018-05-25 18:20 ` Srinivas Kandagatla
2018-06-01 18:06 ` Stephen Boyd
2018-03-23 8:26 ` [PATCH v2 3/3] clk: qcom: mmcc-msm8996: leave all mmagic gdscs and clocks always enabled Rajendra Nayak
2018-05-25 18:23 ` Bjorn Andersson
2018-06-01 18:06 ` Stephen Boyd
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=20180525181815.GE14924@minitux \
--to=bjorn.andersson@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rnayak@codeaurora.org \
--cc=sboyd@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=stanimir.varbanov@linaro.org \
--cc=vivek.gautam@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.