From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Sripathy, Vishwanath" <vishwanath.bs@ti.com>
Cc: "Reddy, Teerth" <teerth@ti.com>, "Dasgupta, Romit" <romit@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH] OMAP3: PM: Dynamic calculation of SDRC clock stabilization delay
Date: Tue, 22 Dec 2009 08:56:53 -0800 [thread overview]
Message-ID: <87vdfzq756.fsf@deeprootsystems.com> (raw)
In-Reply-To: <FCCFB4CDC6E5564B9182F639FC35608703001E1C26@dbde02.ent.ti.com> (Vishwanath Sripathy's message of "Tue\, 22 Dec 2009 21\:30\:18 +0530")
"Sripathy, Vishwanath" <vishwanath.bs@ti.com> writes:
> Kevin,
>
>> -----Original Message-----
>> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
>> owner@vger.kernel.org] On Behalf Of Kevin Hilman
>> Sent: Tuesday, December 22, 2009 9:26 PM
>> To: Reddy, Teerth
>> Cc: Dasgupta, Romit; linux-omap@vger.kernel.org
>> Subject: Re: [PATCH] OMAP3: PM: Dynamic calculation of SDRC clock stabilization
>> delay
>>
>> "Reddy, Teerth" <teerth@ti.com> writes:
>>
>> > Kevin,
>> >
>> >>
>> >> Here's an uncompiled, untested version of 'measure_sram_delay' using
>> >> the DM Timer API:
>> >>
>> >> unsigned int measure_sram_delay(unsigned int loop)
>> >> {
>> >> unsigned long start, end, flags;
>> >> void (*_omap3_sram_delay)(unsigned long);
>> >> _omap3_sram_delay = omap_sram_push(__sram_wait_delay,
>> >> __sram_wait_delay_sz);
>> >>
>> >> gpt = omap_dm_timer_request();
>> >> if (!gpt)
>> >> pr_err("foo");
>> >> omap_dm_timer_set_source(gpt, OMAP_TIMER_SRC_SYS_CLK);
>> >> omap_dm_timer_set_load_start(gptimer, 0, 0);
>> >>
>> >> local_irq_save(flags);
>> >> start = omap_dm_timer_read_counter(gpt);
>> >> _omap3_sram_delay(loop);
>> >> end = omap_dm_timer_read_counter(gpt);
>> >> local_irq_restore(flags);
>> >>
>> >> omap_dm_timer_stop(gpt);
>> >> omap_dm_timer_free(gpt);
>> >>
>> >> return end - start;
>> >> }
>> >>
>> >
>> > I see one shortcoming with this approach. The DVFS happens even
>> > before the gp timers are initialized, while the kernel boots.
>>
>> This is a bug. DVFS should be prevented until system is initialized.
>>
>
>
> I think DVFS is triggered when CPU Freq driver gets
> initialized. Depending on the default governor cpufreq tries to
> scale the frequency which triggers DVFS.
Correct.
> So do you mean to say that cpufreq initialization should be
> prevented till GPTimer is initialized?
Basically, yes.
You need to calibrate the delay before you can do DVFS, so what I mean
is that you need to request your GPtimer, and do your delay
measurements using the GPtimer before you enable DVFS (register
CPUfreq.)
Also, please be sure to stop/free the GPtimer when done, otherwise
it will prevent idle.
Kevin
next prev parent reply other threads:[~2009-12-22 16:56 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-11 12:05 [PATCH] OMAP3: PM: Dynamic calculation of SDRC clock stabilization delay Reddy, Teerth
2009-12-11 12:23 ` Menon, Nishanth
2009-12-11 12:31 ` Romit Dasgupta
2009-12-11 13:42 ` Nishanth Menon
2009-12-12 4:43 ` Nishanth Menon
2009-12-14 8:19 ` Romit Dasgupta
2009-12-11 13:14 ` Jean Pihet
2009-12-11 14:07 ` Romit Dasgupta
2009-12-11 16:38 ` Kevin Hilman
2009-12-12 0:49 ` Kevin Hilman
2009-12-14 9:01 ` Romit Dasgupta
2009-12-14 16:10 ` Kevin Hilman
2009-12-14 16:41 ` Dasgupta, Romit
2009-12-14 19:34 ` Kevin Hilman
2009-12-21 11:44 ` Reddy, Teerth
2009-12-22 15:56 ` Kevin Hilman
2009-12-22 16:00 ` Sripathy, Vishwanath
2009-12-22 16:56 ` Kevin Hilman [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-12-24 5:33 Reddy, Teerth
2009-12-24 10:31 ` Romit Dasgupta
2009-12-28 19:57 ` Tony Lindgren
2010-01-06 23:06 ` Kevin Hilman
2010-01-21 5:35 ` Paul Walmsley
2010-01-21 8:58 ` Reddy, Teerth
2010-02-08 22:52 ` Paul Walmsley
2009-12-23 13:56 Reddy, Teerth
2009-12-23 14:32 ` Romit Dasgupta
2009-12-24 5:31 ` Reddy, Teerth
2009-12-11 12:42 Romit Dasgupta
2009-12-11 10:35 Reddy, Teerth
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=87vdfzq756.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=romit@ti.com \
--cc=teerth@ti.com \
--cc=vishwanath.bs@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