From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/5] imx: gpt: Add 24Mhz OSC clock source support for GPT
Date: Mon, 27 Oct 2014 15:23:00 +0100 [thread overview]
Message-ID: <544E5544.9000005@denx.de> (raw)
In-Reply-To: <544E4F95.3040805@freescale.com>
Hi Ye,
On 27/10/2014 14:58, Li Ye-B37916 wrote:
> Hi Stefano,
>
> On 10/27/2014 7:18 PM, Stefano Babic wrote:
>> Hi Ye,
>>
>> On 27/10/2014 05:10, Li Ye-B37916 wrote:
>>> The patch is used to add a choice for GPT clock source to provide high frequency clock. The configuration "CONFIG_MXC_GPT_HCLK" is not dependent on the chip version. Even it is i.MX28, it is ok to set the configuration.
>> Ok, thanks for clarification.
>>
>>> The implementation has handled the differences between the chips.
>>> Most of i.MX6 series supports to use 24Mhz OSC as its high clock source (except MX6Q/D Rev 1.0 and MX6SL). So for i.MX6, the implementation uses the 24Mhz OSC.
>>> For others (the time.c only compiles for i.MX5 and i.MX6, so the other is i.MX5), they don't have 24Mhz OSC source for GPT. When the configuration is set, we use perclk instead.
>> It should be not bad if you check for MX5 and CONFIG_MXC_GPT_HCLK and
>> raise an error at compile time. This configuration is wrong and the
>> error should be reported and not hidden at runtime.
>
> No, this configuration is not wrong for MX5. When it is set on MX5, the implementation uses preclk as the clock source to generate a high frequency GPT.
I see - in this case you defined GPTCR_CLKSOURCE_PRE. Ok, got it.
>
>>> I feel the patch subject need to modify, like "add HCLK clock source for GPT", then people may not confuse.
>> Agree, do it.
>>
>>>>> MX6Q/D Rev 1.0 and MX6SL can't use the 24Mhz OSC clock source option,
>>>>> so select the perclk for them. For MX6SL, we will set the OSC 24Mhz to
>>>>> perclk in CCM, so eventually the clock comes from OSC 24Mhz.
>>>>>
>>>> I am trying to understand. The explanation here does not reflect in the
>>>> implementation. From the implementation, it is possible to set it even
>>>> with wrong revision.
>>> As explained above, the implementation has handled the differences. Users does not need to care the revision. For example, when the image runs on a MX6Q/D Rev 1.0 chip, the perclk will be selected not the 24Mhz OSC.
>>>
>>>> Anyway, I do not think it is correct to put it as a configuration
>>>> option. This makes that we need different binaries for different
>>>> revisions of the SOC. It should be checked at runtime if the revision is
>>>> correct to set this clock as source. gpt_has_clk_source_osc has a check,
>>>> but does it make sense that CONFIG_MXC_GPT_HCLK can be set in any case ?
>>> Only i.MX5 and i.MX6 uses the GPT driver. I think the CONFIG_MXC_GPT_HCLK can be set in any case.
>> Well, but if does not make sense for i.MX5, why do we have to accept it ?
>
> The MX5 can also have a high frequency GPT. The difference is it uses another clock source "preclk" than the "24Mhz OSC" used for iMX6.
Fine.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2014-10-27 14:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 12:32 [U-Boot] [PATCH 1/5] imx: gpt: Add 24Mhz OSC clock source support for GPT Ye.Li
2014-10-24 12:33 ` [U-Boot] [PATCH 2/5] imx: mx6sl: Add perclk_clk_sel bit define in CCM Ye.Li
2014-10-24 12:33 ` [U-Boot] [PATCH 3/5] imx: mx6: Change the get_ipg_per_clk for OSC 24Mhz source Ye.Li
2014-10-24 12:33 ` [U-Boot] [PATCH 4/5] imx: mx6sl: Set the preclk clock source to OSC 24Mhz Ye.Li
2014-10-24 12:33 ` [U-Boot] [PATCH 5/5] imx: mx6: Enable 24Mhz OSC for GPT clock source Ye.Li
2014-10-24 13:18 ` [U-Boot] [PATCH 1/5] imx: gpt: Add 24Mhz OSC clock source support for GPT Stefano Babic
2014-10-27 4:10 ` Li Ye-B37916
2014-10-27 11:18 ` Stefano Babic
2014-10-27 13:58 ` Li Ye-B37916
2014-10-27 14:23 ` Stefano Babic [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-10-24 7:44 Ye.Li
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=544E5544.9000005@denx.de \
--to=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
/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