From: Tero Kristo <t-kristo@ti.com>
To: Stefan Roese <stefan.roese@gmail.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>,
linux-omap <linux-omap@vger.kernel.org>,
Paul Walmsley <paul@pwsan.com>,
Mike Turquette <mturquette@linaro.org>
Subject: Re: Odd behavior with dpll4_m4x2_ck on omap3 + DT
Date: Tue, 10 Sep 2013 15:12:55 +0300 [thread overview]
Message-ID: <522F0CC7.50501@ti.com> (raw)
In-Reply-To: <522F0390.9050802@gmail.com>
On 09/10/2013 02:33 PM, Stefan Roese wrote:
> On 28.08.2013 13:40, Tero Kristo wrote:
>> On 08/28/2013 01:14 PM, Tomi Valkeinen wrote:
>>> On 28/08/13 12:48, Tero Kristo wrote:
>>>> On 08/28/2013 12:22 PM, Tomi Valkeinen wrote:
>>>>> Hi,
>>>>>
>>>>> I'm seeing odd clock behavior with Beagle, booting with DT. I'm using
>>>>> v3.11-rc7 + DSS DT patches.
>>>>
>>>> I guess you are not using the clock DT patches? Just making sure I
>>>> didn't break anything. :)
>>>
>>> No, plain rc7 with my DSS DT patches.
>>>
>>>>> So, for some reason, the first clk_set_rate goes wrong. Any ideas?
>>>>
>>>> Hmm, strange. I am not seeing similar behavior, but I am calling
>>>> clk_set_rate in different location.... also I am using clock DT patches
>>>> (don't try the current version though, as I am reworking them.)
>>>>
>>>> [ 0.000000] dpll4_ck: 432000000
>>>> [ 0.000000] dpll4_m4_ck: 72000000
>>>> [ 0.000000] dpll4_m4x2_ck: 144000000
>>>> [ 0.000000] dss1_alwon_fck_3430es2: 144000000
>>>> [ 0.000000] dpll4_ck: 432000000
>>>> [ 0.000000] dpll4_m4_ck: 86400000
>>>> [ 0.000000] dpll4_m4x2_ck: 172800000
>>>> [ 0.000000] dss1_alwon_fck_3430es2: 172800000
>>>>
>>>> Do you see the error only when setting to some specific rate (86400000)
>>>> or it doesn't matter?
>>>
>>> I also tried setting to 72000000, with the same result.
>>>
>>> Do you know if I can somehow easily get debug prints from the clock
>>> framework, that could lighten up the issue?
>>
>> There isn't any good config option for that, I would suggest add prints
>> to the clk_set_rate and then for the clocks you are interested in, print
>> results for the recalc_rate / set_rate ops also.
>
> I debugged this a bit and found that this issue (dpll4_m4x2_ck clock is
> not 2 times dpll4_m4_ck) results from this code:
>
> arch/arm/mach-omap2/dpll3xxx.c:
>
> unsigned long omap3_clkoutx2_recalc(struct clk_hw *hw,
> unsigned long parent_rate)
> {
> ...
> if ((v != OMAP3XXX_EN_DPLL_LOCKED) || (dd->flags & DPLL_J_TYPE))
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> rate = parent_rate;
> else
> rate = parent_rate * 2;
> return rate;
> }
>
> As marked above, v is at that early time 0x1 (unmasked value of this
> register is 0x38310037). So the DPLL4 is not locked but in low power top
> mode (OMAP3XXX_EN_DPLL_LOCKED = 0x7).
>
> Any hint whats missing here?
If it claims it is not locked, it means the DPLL itself is disabled. You
could try clk_enable for the clock before doing clk_set_rate.
-Tero
next prev parent reply other threads:[~2013-09-10 12:13 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 9:22 Odd behavior with dpll4_m4x2_ck on omap3 + DT Tomi Valkeinen
2013-08-28 9:48 ` Tero Kristo
2013-08-28 10:14 ` Tomi Valkeinen
2013-08-28 11:40 ` Tero Kristo
2013-09-10 11:33 ` Stefan Roese
2013-09-10 12:12 ` Tero Kristo [this message]
2013-09-10 12:19 ` Tomi Valkeinen
2013-09-10 12:24 ` Tero Kristo
2013-09-10 12:40 ` Tomi Valkeinen
2013-09-10 13:17 ` Tero Kristo
2013-09-10 21:17 ` Mike Turquette
2013-09-10 21:57 ` Mike Turquette
2013-09-11 7:21 ` Tomi Valkeinen
2013-09-13 7:51 ` Stefan Roese
2013-09-13 11:34 ` Tero Kristo
2013-09-16 19:45 ` Mike Turquette
2013-09-27 8:41 ` Tomi Valkeinen
2013-09-27 11:24 ` Tero Kristo
2013-09-30 7:56 ` Tomi Valkeinen
2013-10-07 8:21 ` Paul Walmsley
2013-10-08 1:35 ` Mike Turquette
2013-10-13 20:17 ` Paul Walmsley
2013-09-10 12:25 ` Stefan Roese
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=522F0CC7.50501@ti.com \
--to=t-kristo@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=mturquette@linaro.org \
--cc=paul@pwsan.com \
--cc=stefan.roese@gmail.com \
--cc=tomi.valkeinen@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.