From: Philipp Zabel <p.zabel@pengutronix.de>
To: Tomasz Figa <tomasz.figa@gmail.com>
Cc: linux-pm@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
Russell King <linux@arm.linux.org.uk>,
Pawel Moll <pawel.moll@arm.com>, Len Brown <len.brown@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Tomasz Figa <t.figa@samsung.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Kukjin Kim <kgene.kim@samsung.com>, Pavel Machek <pavel@ucw.cz>,
Kumar Gala <galak@codeaurora.org>,
Stephen Warren <swarren@wwwdotorg.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 04/10] base: power: Add generic OF-based power domain look-up
Date: Mon, 24 Feb 2014 11:56:19 +0100 [thread overview]
Message-ID: <1393239379.3091.26.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <530A2ADF.902@gmail.com>
Hi Tomasz,
Am Sonntag, den 23.02.2014, 18:07 +0100 schrieb Tomasz Figa:
> Hi Philipp,
>
> On 19.02.2014 17:53, Philipp Zabel wrote:
> > Am Samstag, den 11.01.2014, 20:42 +0100 schrieb Tomasz Figa:
>
> [snip]
>
> >> + pd = of_genpd_get_from_provider(&pd_args);
> >> + if (IS_ERR(pd))
> >> + return PTR_ERR(pd);
> >> +
> >> + dev_dbg(dev, "adding to power domain %s\n", pd->name);
> >> +
> >> + while (1) {
> >> + ret = pm_genpd_add_device(pd, dev);
> >
> > Since pm_genpd_add_device is used here, no gpd_timing_data can be
> > provided. Do you have a plan to solve this? Should the timing data be
> > provided from the device tree?
>
> Hmm, a quick grep over kernel sources for genpd_.*_add_device
> gives just a single user of __pm_genpd_name_add_device(), with custom
> timing data:
I had added this to my work progress i.MX patches to silence the noisy
"... latency exceeded, new value ..." warnings emitted by the power
domain framework: http://patchwork.ozlabs.org/patch/320084/
[...]
> Moreover the timings used there are just defaults, which makes me wonder
> if there is any reason to specify them explicitly. Even more interesting
> is the fact that genpd code can measure those latencies itself.
>
> Do you have a particular use case for those timing data or just
> wondering? I don't think we need to implement support for them right
> away, if there is no real need to do so. The code and bindings can be
> extended later to handle them, if needed.
You are right, this is just superficial.
> As for whether DT is appropriate place to define them, I'm not quite
> sure. Stop and start latencies look like hardware parameters, but state
> save and restore are likely to be driver-specific, as it depends on
> driver code how much time it takes to save and restore needed state
> (e.g. driver with register cache will not need to do any state save), if
> I understand these timing data correctly.
I have one more, on i.MX6 I manually need to enable the clocks of
devices in the power domain during the power-up sequence so that the
reset signals can propagate.
So far, I have implemented this by registering the device clocks of
devices in the power domain with pm_clk_add and then let the genpd
power_on callback temporarily enable them using pm_clk_resume:
http://patchwork.ozlabs.org/patch/320085/
Whether this is needed seems to me to be a property of the power domain.
Do you think this is something we could add to of_genpd_add_to_domain,
depending on some flag set in struct generic_pm_domain?
I'd like to avoid having to register my own bus notifier and to deal
with ordering issues between that and of_genpd_notifier_call.
regards
Philipp
next prev parent reply other threads:[~2014-02-24 10:56 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-11 19:42 [PATCH RFC 00/10] Generic Device Tree based power domain look-up Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 01/10] ARM: s3c64xx: pm: Use name field of generic_pm_domain Tomasz Figa
2014-01-12 11:47 ` Pavel Machek
2014-01-12 12:16 ` Tomasz Figa
2014-01-12 18:53 ` Pavel Machek
2014-01-12 19:03 ` Tomasz Figa
2014-01-12 19:24 ` Mark Brown
2014-01-12 19:20 ` Mark Brown
2014-01-12 19:25 ` Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 02/10] ARM: s3c64xx: pm: Add always_on field to s3c64xx_pm_domain struct Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 03/10] ARM: s3c64xx: pm: Add pwr_stat bit for domain G Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 04/10] base: power: Add generic OF-based power domain look-up Tomasz Figa
2014-01-14 15:42 ` Kevin Hilman
[not found] ` <87r48a8t99.fsf-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-01-20 16:24 ` Tomasz Figa
2014-01-23 0:32 ` Stephen Boyd
2014-01-16 16:34 ` Lorenzo Pieralisi
2014-01-20 17:32 ` Tomasz Figa
2014-01-22 11:00 ` Lorenzo Pieralisi
2014-01-23 0:18 ` Stephen Boyd
[not found] ` <20140123001802.GF13785-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2014-01-23 0:31 ` Tomasz Figa
2014-02-24 12:11 ` Ulf Hansson
2014-02-19 16:53 ` Philipp Zabel
2014-02-23 17:07 ` Tomasz Figa
2014-02-24 10:56 ` Philipp Zabel [this message]
2014-01-11 19:42 ` [PATCH RFC 05/10] ARM: exynos: Move to generic power domain bindings Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 06/10] ARM: s3c64xx: pm: Add device tree based power domain instantiation Tomasz Figa
2014-01-12 19:29 ` Mark Brown
[not found] ` <20140112192910.GW29039-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-01-12 19:34 ` Tomasz Figa
2014-01-13 11:09 ` Mark Brown
2014-01-13 12:13 ` Tomasz Figa
2014-01-13 12:17 ` Mark Brown
2014-01-11 19:42 ` [PATCH RFC 07/10] ARM: s3c64xx: dt: Enable SoC-level power management Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 08/10] ARM: dts: s3c64xx: Add nodes for power domains Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 09/10] ARM: dts: s3c64xx: Add node for display controller Tomasz Figa
2014-01-11 19:42 ` [PATCH RFC 10/10] ARM: dts: s3c6410-mini6410: Add support for LCD screen Tomasz Figa
2014-01-11 19:52 ` [PATCH RFC 00/10] Generic Device Tree based power domain look-up Tomasz Figa
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=1393239379.3091.26.camel@pizza.hi.pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=b.zolnierkie@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kgene.kim@samsung.com \
--cc=len.brown@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=pawel.moll@arm.com \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=swarren@wwwdotorg.org \
--cc=t.figa@samsung.com \
--cc=tomasz.figa@gmail.com \
/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).