From: myungjoo.ham@samsung.com (MyungJoo Ham)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/5] ARM: S5PV210: Initial CPUFREQ Support
Date: Fri, 16 Jul 2010 18:01:51 +0900 [thread overview]
Message-ID: <AANLkTikNCOjOSVlcBv99DuJEdPtQHmKpC8Cs60rQz1r3@mail.gmail.com> (raw)
In-Reply-To: <20100716084231.GF9082@rakim.wolfsonmicro.main>
On Fri, Jul 16, 2010 at 5:42 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Fri, Jul 16, 2010 at 05:30:03PM +0900, MyungJoo Ham wrote:
>> On Fri, Jul 16, 2010 at 5:17 PM, Mark Brown
>
>> > ...the ramp times are usually vanishingly small so the overwhelming
>> > majority of consumers probably don't care anyway. ?If it's a problem we
>> > can add an interface which doesn't do the delay automatically but for
>> > most users it's going to be simpler to just deal with it transparently.
>
>> It's about 30us in this driver (100MHz -> 1GHz), where we lost about
>> 60000 instructions (2 instructions / cycle @ 100MHz, with default RAMP
>> UP of 10mV/us). However, let's assume that it's ok for now.
>
> Is the ramp actually required for systems? ?The obvious thought here is
> that if the ramp time can be reduced or eliminated by configuring the
> regulator it'd be better to do that.
>
It appears that the ramp is actually required. Without ramp, the
driver has no idea about the voltage change delay, which can be
hazardous when the supplied voltage is required to increase. For
example, when the CPU goes from 100MHz to 1GHz, the supplied voltage
goes from 0.95V to 1.25V. After setting the voltage to 1.25V from
0.95V, CPUFREQ sets the frequency to 1GHz. However, at 1GHz, CPU may
fail (and locks up) if the supplied voltage is lower than 1.25V
(regulator voltage is still climbing).
Yes, with RAMP off, the voltage goes up to 1.25V very fast (appears to
be less than 1mV/us in our hardware), but not fast enough to prevent
executing some (about a hundred or thousand?) instructions. Thus,
codes after setting the clock to 1GHz are executed while the supplied
voltage it not enough. Then, CPU may fail although the probability
wouldn't be high enough to be seen frequently.
RAMP feature makes this delay deterministic lets us predict the
behavior and prevent running at higher frequency when the voltage is
not stabilized.
>> > Ah, OK. ?If other people use that sort of clocking scheme we will need
>> > to come up with a reasonable way of coping with it, but let's save that
>> > for when the problem arises.
>
>> Such people may use cpufreq_notify_transition(freq,
>> CPUFREQ_PRECHANGE/POSTCHANGE). Some display drivers have been using
>> this feature to adjust clock settings when APLL clock speed changes.
>> Sound drivers with CLK_OUT should've used that, too.
>
> Depending on how the clocking is integrated it might need to be bound a
> bit tighter to the CPU management code, though. ?If it's supplying a
> clock for the CPU then it may need the CPU to be quiesced before you can
> alter the output.
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
MyungJoo Ham (???), Ph.D.
Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: 82-10-6714-2858
next prev parent reply other threads:[~2010-07-16 9:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-15 9:06 [PATCH 0/5] ARM: S5PV210: CPUFREQ Initial Support MyungJoo Ham
2010-07-15 9:06 ` [PATCH 1/5] ARM: Samsung SoC: added hclk/pclk info to s3c_freq for s5pv210 cpu-freq MyungJoo Ham
2010-07-15 9:06 ` [PATCH 2/5] ARM: S5P: Added default pll values for APLL 800/1000MHz MyungJoo Ham
2010-07-15 9:06 ` [PATCH 3/5] ARM: S5PV210: macros for clock registers at regs-clock.h MyungJoo Ham
2010-07-15 9:06 ` [PATCH 4/5] ARM: S5PV210: add DMCx access virtual address MyungJoo Ham
2010-07-15 9:06 ` [PATCH 5/5] ARM: S5PV210: Initial CPUFREQ Support MyungJoo Ham
2010-07-15 11:59 ` Mark Brown
2010-07-16 5:37 ` MyungJoo Ham
2010-07-16 5:42 ` Kyungmin Park
2010-07-16 6:23 ` MyungJoo Ham
2010-07-16 8:17 ` Mark Brown
2010-07-16 8:30 ` MyungJoo Ham
2010-07-16 8:42 ` Mark Brown
2010-07-16 9:01 ` MyungJoo Ham [this message]
2010-07-16 9:37 ` Mark Brown
2010-07-19 0:40 ` MyungJoo Ham
2010-07-19 9:09 ` Mark Brown
2010-07-19 10:57 ` MyungJoo Ham
2010-07-16 12:04 ` [PATCH 2/5] ARM: S5P: Added default pll values for APLL 800/1000MHz Kukjin Kim
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=AANLkTikNCOjOSVlcBv99DuJEdPtQHmKpC8Cs60rQz1r3@mail.gmail.com \
--to=myungjoo.ham@samsung.com \
--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).