All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: Tony Lindgren <tony@atomide.com>,
	Christoph Fritz <chf.fritz@googlemail.com>
Cc: bcousson@baylibre.com, Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Nishanth Menon <nm@ti.com>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
	Daniel Mack <zonque@gmail.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH v4 4/4] ARM: OMAP2+: Add pdata quirk for sys_clkout2 for omap3 DBB056
Date: Wed, 5 Mar 2014 15:07:01 +0200	[thread overview]
Message-ID: <53172175.5060603@ti.com> (raw)
In-Reply-To: <20140228223741.GM13624@atomide.com>

On 03/01/2014 12:37 AM, Tony Lindgren wrote:
> * Christoph Fritz <chf.fritz@googlemail.com> [140214 06:24]:
>> Full device tree support for clock control, especially to set frequencies,
>> is not yet accomplished. Until then, configure the 24Mhz of sys_clkout2 to
>> feed an USB-Hub here.
>
> Hmm would like to see Tero's comments on this, I wonder if we should
> wait on this to avoid extra churn?

Well, the set I posted that adds default clock parenting / default rate 
support to DT hasn't actually moved forward, so you might want to take 
this in as is now if it should be rushed. The clk-enable part isn't done 
currently by anything anyway. Just wondering though, should you create 
some sort of driver for your usb-hub which would control these clocks?

-Tero


>
> Regards,
>
> Tony
>
>> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
>> ---
>>   arch/arm/mach-omap2/pdata-quirks.c |   37 ++++++++++++++++++++++++++++++++++++
>>   1 file changed, 37 insertions(+)
>>
>> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
>> index 435a823..e36ac3f 100644
>> --- a/arch/arm/mach-omap2/pdata-quirks.c
>> +++ b/arch/arm/mach-omap2/pdata-quirks.c
>> @@ -172,6 +172,43 @@ static void __init am3517_evm_legacy_init(void)
>>
>>   static void __init omap3_dbb056_legacy_init(void)
>>   {
>> +	struct clk *clkout2;
>> +	struct clk *cm96fck;
>> +
>> +	/* Reparent clkout2 to 96M_FCK */
>> +	pr_info("%s: Late Reparent clkout2 to 96M_FCK\n", __func__);
>> +	clkout2 = clk_get(NULL, "clkout2_src_ck");
>> +	if (clkout2 < 0) {
>> +		pr_err("a83x-quirk: couldn't get clkout2_src_ck\n");
>> +		return;
>> +	}
>> +	cm96fck = clk_get(NULL, "cm_96m_fck");
>> +	if (cm96fck < 0) {
>> +		pr_err("a83x-quirk: couldn't get cm_96m_fck\n");
>> +		return;
>> +	}
>> +	if (clk_set_parent(clkout2, cm96fck) < 0) {
>> +		pr_err("a83x-quirk: couldn't reparent clkout2_src_ck\n");
>> +		return;
>> +	}
>> +
>> +	/* Set clkout2 to 24MHz for internal usb hub*/
>> +	pr_info("%s: Set clkout2 to 24MHz for internal usb hub\n", __func__);
>> +	clkout2 = clk_get(NULL, "sys_clkout2");
>> +	if (clkout2 < 0) {
>> +		pr_err("%s: couldn't get sys_clkout2\n", __func__);
>> +		return;
>> +	}
>> +	if (clk_set_rate(clkout2, 24000000) < 0) {
>> +		pr_err("%s: couldn't set sys_clkout2 rate\n", __func__);
>> +		return;
>> +	}
>> +	if (clk_prepare_enable(clkout2) < 0) {
>> +		pr_err("%s: couldn't enable sys_clkout2\n", __func__);
>> +		return;
>> +	}
>> +
>> +	/* Initialize display */
>>   	omap3_dbb056_display_init_of();
>>   }
>>   #endif /* CONFIG_ARCH_OMAP3 */
>> --
>> 1.7.10.4
>>


WARNING: multiple messages have this Message-ID (diff)
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 4/4] ARM: OMAP2+: Add pdata quirk for sys_clkout2 for omap3 DBB056
Date: Wed, 5 Mar 2014 15:07:01 +0200	[thread overview]
Message-ID: <53172175.5060603@ti.com> (raw)
In-Reply-To: <20140228223741.GM13624@atomide.com>

On 03/01/2014 12:37 AM, Tony Lindgren wrote:
> * Christoph Fritz <chf.fritz@googlemail.com> [140214 06:24]:
>> Full device tree support for clock control, especially to set frequencies,
>> is not yet accomplished. Until then, configure the 24Mhz of sys_clkout2 to
>> feed an USB-Hub here.
>
> Hmm would like to see Tero's comments on this, I wonder if we should
> wait on this to avoid extra churn?

Well, the set I posted that adds default clock parenting / default rate 
support to DT hasn't actually moved forward, so you might want to take 
this in as is now if it should be rushed. The clk-enable part isn't done 
currently by anything anyway. Just wondering though, should you create 
some sort of driver for your usb-hub which would control these clocks?

-Tero


>
> Regards,
>
> Tony
>
>> Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
>> ---
>>   arch/arm/mach-omap2/pdata-quirks.c |   37 ++++++++++++++++++++++++++++++++++++
>>   1 file changed, 37 insertions(+)
>>
>> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
>> index 435a823..e36ac3f 100644
>> --- a/arch/arm/mach-omap2/pdata-quirks.c
>> +++ b/arch/arm/mach-omap2/pdata-quirks.c
>> @@ -172,6 +172,43 @@ static void __init am3517_evm_legacy_init(void)
>>
>>   static void __init omap3_dbb056_legacy_init(void)
>>   {
>> +	struct clk *clkout2;
>> +	struct clk *cm96fck;
>> +
>> +	/* Reparent clkout2 to 96M_FCK */
>> +	pr_info("%s: Late Reparent clkout2 to 96M_FCK\n", __func__);
>> +	clkout2 = clk_get(NULL, "clkout2_src_ck");
>> +	if (clkout2 < 0) {
>> +		pr_err("a83x-quirk: couldn't get clkout2_src_ck\n");
>> +		return;
>> +	}
>> +	cm96fck = clk_get(NULL, "cm_96m_fck");
>> +	if (cm96fck < 0) {
>> +		pr_err("a83x-quirk: couldn't get cm_96m_fck\n");
>> +		return;
>> +	}
>> +	if (clk_set_parent(clkout2, cm96fck) < 0) {
>> +		pr_err("a83x-quirk: couldn't reparent clkout2_src_ck\n");
>> +		return;
>> +	}
>> +
>> +	/* Set clkout2 to 24MHz for internal usb hub*/
>> +	pr_info("%s: Set clkout2 to 24MHz for internal usb hub\n", __func__);
>> +	clkout2 = clk_get(NULL, "sys_clkout2");
>> +	if (clkout2 < 0) {
>> +		pr_err("%s: couldn't get sys_clkout2\n", __func__);
>> +		return;
>> +	}
>> +	if (clk_set_rate(clkout2, 24000000) < 0) {
>> +		pr_err("%s: couldn't set sys_clkout2 rate\n", __func__);
>> +		return;
>> +	}
>> +	if (clk_prepare_enable(clkout2) < 0) {
>> +		pr_err("%s: couldn't enable sys_clkout2\n", __func__);
>> +		return;
>> +	}
>> +
>> +	/* Initialize display */
>>   	omap3_dbb056_display_init_of();
>>   }
>>   #endif /* CONFIG_ARCH_OMAP3 */
>> --
>> 1.7.10.4
>>

  reply	other threads:[~2014-03-05 13:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 14:20 [PATCH v4 0/4] Christoph Fritz
2014-02-14 14:20 ` Christoph Fritz
2014-02-14 14:20 ` [PATCH v4 1/4] ARM: dts: omap3: Add support for INCOstartec a83x module Christoph Fritz
2014-02-14 14:20   ` Christoph Fritz
2014-02-14 14:20 ` [PATCH v4 2/4] ARM: dts: omap3: Add support for INCOstartec DBB056 baseboard Christoph Fritz
2014-02-14 14:20   ` Christoph Fritz
2014-02-14 14:20 ` [PATCH v4 3/4] ARM: OMAP2+: add legacy display for omap3 DBB056 Christoph Fritz
2014-02-14 14:20   ` Christoph Fritz
2014-02-14 14:35   ` Tomi Valkeinen
2014-02-14 14:35     ` Tomi Valkeinen
2014-02-28 22:38     ` Tony Lindgren
2014-02-28 22:38       ` Tony Lindgren
2014-03-01 20:07       ` Christoph Fritz
2014-03-01 20:07         ` Christoph Fritz
     [not found] ` <1392387656-15186-1-git-send-email-chf.fritz-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2014-02-14 14:20   ` [PATCH v4 4/4] ARM: OMAP2+: Add pdata quirk for sys_clkout2 " Christoph Fritz
2014-02-14 14:20     ` Christoph Fritz
2014-02-28 22:37     ` Tony Lindgren
2014-02-28 22:37       ` Tony Lindgren
2014-03-05 13:07       ` Tero Kristo [this message]
2014-03-05 13:07         ` Tero Kristo
2014-03-05 13:25         ` Christoph Fritz
2014-03-05 13:25           ` Christoph Fritz
2014-03-05 17:21           ` Tony Lindgren
2014-03-05 17:21             ` Tony Lindgren

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=53172175.5060603@ti.com \
    --to=t-kristo@ti.com \
    --cc=bcousson@baylibre.com \
    --cc=chf.fritz@googlemail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=javier.martinez@collabora.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.com \
    --cc=zonque@gmail.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.