linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC][PATCH 1/2] ARM: OMAP4: clock: Add device tree support for AUXCLKs
Date: Thu, 21 Mar 2013 19:34:51 +0530	[thread overview]
Message-ID: <514B1383.1070102@ti.com> (raw)
In-Reply-To: <514B10FE.1000805@ti.com>

On Thursday 21 March 2013 07:24 PM, Roger Quadros wrote:
> On 03/21/2013 03:08 PM, Rajendra Nayak wrote:
>> []..
>>
>>> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
>>> index 0274ff7..23f2064 100644
>>> --- a/arch/arm/mach-omap2/board-generic.c
>>> +++ b/arch/arm/mach-omap2/board-generic.c
>>> @@ -158,7 +158,7 @@ DT_MACHINE_START(OMAP4_DT, "Generic OMAP4 (Flattened Device Tree)")
>>>  	.init_irq	= omap_gic_of_init,
>>>  	.init_machine	= omap_generic_init,
>>>  	.init_late	= omap4430_init_late,
>>> -	.init_time	= omap4_local_timer_init,
>>> +	.init_time	= omap4_init_time,
>>>  	.dt_compat	= omap4_boards_compat,
>>>  	.restart	= omap44xx_restart,
>>>  MACHINE_END
>>
>> []..
>>> +#ifdef CONFIG_OF
>>> +int __init omap4_clk_init_dt(void)
>>> +{
>>> +	struct device_node *np;
>>> +
>>> +	np = of_find_compatible_node(NULL, NULL, "ti,omap4-scrm");
>>> +	if (np) {
>>> +		scrm_data.clks = scrm_clks;
>>> +		scrm_data.clk_num = ARRAY_SIZE(scrm_clks);
>>> +		of_clk_add_provider(np, of_clk_src_onecell_get,	&scrm_data);
>>> +	}
>>> +
>>> +	return 0;
>>> +}
>>
>> []..
>>> +
>>> +void __init omap4_init_time(void)
>>> +{
>>> +	omap4_clk_init_dt();
>>> +	omap4_local_timer_init();
>>> +}
>>
>> I guess you did all this because of_clk_add_provider() needs
>> slab to be initialized. With the below patch[1], now clk inits
>> happen within .init_timer already, so none of this would
>> be needed.
>>
>> [1] http://www.spinics.net/lists/arm-kernel/msg231288.html
>>
> 
> Right. I can then call omap4_clk_init_dt() from within omap4xxx_clk_init().
> 
> Any comments about the main subject? Does the approach look fine?

It looks fine, except for the fact that I was wondering if the clock
provider needs to restrict itself to SCRM.
Nishant Menon brought up a need for specifying the mpu clock source
from within DT, to be able to use a generic cpufreq driver.
It could be a provider (not specific to scrm, but having only scrm
clocks for now) which we could add clocks as and when we see a need for
them to be specified from DT.

Btw, you need to copy Paul Walmsley for any clock related patches as
he is the OMAP clock maintainer.

> 
> cheers,
> -roger
> 

  reply	other threads:[~2013-03-21 14:04 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 14:26 [RFC][PATCH 0/2] Device tree support for OMAP4 SCRM clocks Roger Quadros
2013-03-19 14:26 ` [RFC][PATCH 1/2] ARM: OMAP4: clock: Add device tree support for AUXCLKs Roger Quadros
2013-03-19 14:30   ` Roger Quadros
2013-03-21 13:08   ` Rajendra Nayak
2013-03-21 13:54     ` Roger Quadros
2013-03-21 14:04       ` Rajendra Nayak [this message]
2013-03-21 14:11         ` Roger Quadros
2013-03-21 14:07   ` Roger Quadros
2013-03-26 10:23   ` [PATCH v2] " Roger Quadros
2013-04-02  8:23     ` Roger Quadros
2013-04-05  8:47       ` Roger Quadros
2013-04-05  8:48         ` Nishanth Menon
2013-04-05  8:50           ` Roger Quadros
2013-04-03 23:42   ` [RFC][PATCH 1/2] " Tony Lindgren
2013-04-04  5:20     ` Rajendra Nayak
2013-04-04 16:33       ` Tony Lindgren
2013-04-04  7:35     ` Roger Quadros
2013-04-04 16:41       ` Tony Lindgren
2013-04-05 10:39         ` Roger Quadros
2013-04-05 15:58           ` Tony Lindgren
2013-04-09  9:55             ` Roger Quadros
2013-04-09 16:49               ` Tony Lindgren
2013-04-09 17:43                 ` Tony Lindgren
2013-04-09 20:49                   ` Nishanth Menon
2013-04-09 21:54                     ` Nishanth Menon
2013-04-10 11:04                       ` Roger Quadros
2013-04-09 22:22                     ` Tony Lindgren
2013-04-10  8:06                     ` Mike Turquette
2013-04-10 10:55                       ` Roger Quadros
2013-04-10 17:39                         ` Nishanth Menon
2013-04-10 18:49                           ` Tony Lindgren
2013-04-10 19:19                             ` Nishanth Menon
2013-04-10 20:21                               ` Tony Lindgren
2013-04-11  7:48                           ` Roger Quadros
2013-04-11  9:04                             ` Grygorii Strashko
2013-04-11 22:45                             ` Nishanth Menon
2013-04-11 18:46                           ` Mike Turquette
2013-04-11 22:40                             ` Nishanth Menon
2013-04-05 17:56         ` Grygorii Strashko
2013-04-09 10:16           ` Roger Quadros
2013-03-19 14:27 ` [PATCH 2/2] ARM: dts: omap4-panda: Provide PHY clock information Roger Quadros
2013-03-19 14:28 ` [RFC][PATCH 0/2] Device tree support for OMAP4 SCRM clocks Roger Quadros

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=514B1383.1070102@ti.com \
    --to=rnayak@ti.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).