From: Kevin Hilman <khilman@ti.com>
To: "Menon, Nishanth" <nm@ti.com>
Cc: linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [pm-wip/cpufreq][PATCH 3/3] OMAP2+: cpufreq: do lateinit
Date: Wed, 08 Jun 2011 11:51:07 -0700 [thread overview]
Message-ID: <87ei34i2ck.fsf@ti.com> (raw)
In-Reply-To: <BANLkTikUiOV6rYFbrULVMWkOS23Msy3hXg@mail.gmail.com> (Nishanth Menon's message of "Tue, 7 Jun 2011 19:28:32 -0500")
"Menon, Nishanth" <nm@ti.com> writes:
> On Tue, Jun 7, 2011 at 16:49, Kevin Hilman <khilman@ti.com> wrote:
>> Nishanth Menon <nm@ti.com> writes:
>>
>>> Since we do module_init, cpufreq initializes before power late_init
>>> where many of the required data structures are registered.
>>
>> What exactly are the dependencies here? The only thing I see is the
>> dependency on omap2_get_mpuss_device(), and those devices should be
>> created as a postcore_initcall.
>>
>> If there are other dependencies, they're probably created a side effect
>> of your earlier patches where you moved stuff from the ->init hook
>> (which happens much later) into the initcall function. Maybe that needs
>> a rethink?
>>
>>> Move cpufreq init to late_initcall instead. Further CONFIG_CPU_FREQ on
>>> which the build depends is bool and does'nt support modules yet.
>>>
>>> Signed-off-by: Nishanth Menon <nm@ti.com>
>>
>> If this works, it's only because of the link order defined by the
>> Makefile ordering since both are the same level of initcall.
>>
>> When I move this driver to drivers/cpufreq, then the link order is less
>> obvious.
>
> the issue is as follows:
> currently we dont do voltage transitions. when we do that
> eventually(and my current code has an forked implementation of dvfs,
> the following steps happen):
> late_initcall(omap2_common_pm_late_init);
> does pmic inits, omap_voltage_late_init, init_voltages and SR dev initialization
>
> without these, there is no way to transition MPU to proper voltage,
> frequency combination. The requirement will have to be that
> omap2-cpufreq.c allows for cpufreq transitions only after voltage and
> clk layers are ready for transitions - if we ever want to do dvfs -
> which we will eventually need to.
Yes, I understand.
But $SUBJECT patch is fixing this as an _init_ time ordering problem,
What you're describing is a runtime requirement that doesn't exist until
a DVFS transition is done. IOW, the requirement is that the voltage
etc. layers have to be init'd before the first transition.
So, rather than fix this with initcall ordering (which will have to be
redone as things git moved and converted to modules), just create a type
of late init function in this driver, which gets called on the first
transition.
Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" 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:[~2011-06-08 18:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 2:05 [pm-wip/cpufreq][PATCH 0/3] OMAP2+: cpufreq: fixes Nishanth Menon
2011-06-07 2:05 ` [pm-wip/cpufreq][PATCH 1/3] OMAP2+: cpufreq: minor flow beautification Nishanth Menon
2011-06-07 19:07 ` Kevin Hilman
2011-06-07 2:05 ` [pm-wip/cpufreq][PATCH 2/3] OMAP2+: cpufreq: notify even with bad boot frequency Nishanth Menon
2011-06-07 2:05 ` [pm-wip/cpufreq][PATCH 3/3] OMAP2+: cpufreq: do lateinit Nishanth Menon
2011-06-07 8:15 ` Santosh Shilimkar
2011-06-07 12:38 ` Menon, Nishanth
2011-06-07 21:49 ` Kevin Hilman
2011-06-08 0:28 ` Menon, Nishanth
2011-06-08 18:51 ` Kevin Hilman [this message]
2011-06-08 18:59 ` Menon, Nishanth
2011-06-08 21:03 ` Kevin Hilman
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=87ei34i2ck.fsf@ti.com \
--to=khilman@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=nm@ti.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