From: khilman@kernel.org (Kevin Hilman)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/4] ARM: keystone: pm: switch to use generic pm domains
Date: Thu, 25 Sep 2014 15:23:10 -0700 [thread overview]
Message-ID: <7hlhp79w6p.fsf@deeprootsystems.com> (raw)
In-Reply-To: <1411657537-25238-3-git-send-email-grygorii.strashko@ti.com> (Grygorii Strashko's message of "Thu, 25 Sep 2014 18:05:35 +0300")
Grygorii Strashko <grygorii.strashko@ti.com> writes:
> This patch switches Keystone 2 PM code to use Generic PM domains
> instead of PM clock domains because of the lack of DT support
> for the last.
>
> Keystone 2 PM domain should be specified per device for which
> Runtime PM has to be enabled and handles the list of functional clocks
> to enable/disable device.
>
> Example:
> qmss_domain: qmss_pm_controller {
> compatible = "ti,keystone-pm-controller";
> clocks = <&chipclk13>;
> #power-domain-cells = <0>;
> };
>
> qmss: qmss at 2a40000 {
> compatible = "ti,keystone-navigator-qmss";
> ...
> power-domains = <&qmss_domain>;
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
[...]
> +static int keystone_pm_domain_power_off(struct generic_pm_domain *genpd)
> +{
> + int ret;
> + struct keystone_domain *dm = container_of(genpd,
> + struct keystone_domain,
> + base);
> +
> + /* Enable reset clocks for all devices in the PU domain */
This says enable clocks...
> + ret = pm_clk_suspend(dm->dev);
...but this calls clk_disable().
> + if (ret)
> + dev_err(dm->dev, "can't turn off clocks %d\n", ret);
> +
> + return ret;
> +}
> +
> +static int keystone_pm_domain_power_on(struct generic_pm_domain *genpd)
> +{
> + int ret;
> + struct keystone_domain *dm = container_of(genpd,
> + struct keystone_domain,
> + base);
> +
> + /* Disable reset clocks for all devices in the PU domain */
And this says disable clocks...
> + ret = pm_clk_resume(dm->dev);
...but this calls clk_enable().
-ECONFUSED.
Kevin
next prev parent reply other threads:[~2014-09-25 22:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-25 15:05 [RFC PATCH 0/4] ARM: keystone: pm: switch to use generic pm domains Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 1/4] PM / clock_ops: Add pm_clk_add_clk() Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 2/4] ARM: keystone: pm: switch to use generic pm domains Grygorii Strashko
2014-09-25 22:23 ` Kevin Hilman [this message]
2014-09-26 16:40 ` Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 3/4] ARM: keystone: pm: remove unused clk pm domain code Grygorii Strashko
2014-09-25 15:05 ` [RFC PATCH 4/4] ARM: dts: k2hk-evm: add pm domains for net, qmss and knav_dmas Grygorii Strashko
2014-09-25 22:27 ` Kevin Hilman
2014-09-26 16:39 ` Grygorii Strashko
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=7hlhp79w6p.fsf@deeprootsystems.com \
--to=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.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).