Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-22 Thread Arnd Bergmann
On Thursday 22 August 2013, Mike Turquette wrote: > Some timers need to know their clock rate for the timer setup. This > could be hard-coded (e.g. for some timer driven from a fixed 32Khz > source) but it could also be from a clock capable of different rates > that needs to be calculated. > > I

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-22 Thread Mike Turquette
Quoting Arnd Bergmann (2013-08-21 11:54:10) > On Tuesday 20 August 2013, Sebastian Hesselbarth wrote: > > Perhaps Tegra is the common case but other SoC haven't dug deep enough? > > IMHO from a HW point-of-view clocks are really among the essential > > things that need to be running before you can

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-22 Thread Mike Turquette
Quoting Arnd Bergmann (2013-08-21 11:54:10) On Tuesday 20 August 2013, Sebastian Hesselbarth wrote: Perhaps Tegra is the common case but other SoC haven't dug deep enough? IMHO from a HW point-of-view clocks are really among the essential things that need to be running before you can do

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-22 Thread Arnd Bergmann
On Thursday 22 August 2013, Mike Turquette wrote: Some timers need to know their clock rate for the timer setup. This could be hard-coded (e.g. for some timer driven from a fixed 32Khz source) but it could also be from a clock capable of different rates that needs to be calculated. I

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-21 Thread Arnd Bergmann
On Tuesday 20 August 2013, Sebastian Hesselbarth wrote: > Perhaps Tegra is the common case but other SoC haven't dug deep enough? > IMHO from a HW point-of-view clocks are really among the essential > things that need to be running before you can do anything useful. > > Just consider boot loaders

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-21 Thread Arnd Bergmann
On Tuesday 20 August 2013, Stephen Warren wrote: > On 08/20/2013 02:44 PM, Arnd Bergmann wrote: > > On Tuesday 20 August 2013, Stephen Warren wrote: > Hmm. This probably isn't too hard. I /think/ the only reason the clocks > are initialized early is: > > * The PMC HW block is involved in the

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-21 Thread Arnd Bergmann
On Tuesday 20 August 2013, Stephen Warren wrote: On 08/20/2013 02:44 PM, Arnd Bergmann wrote: On Tuesday 20 August 2013, Stephen Warren wrote: Hmm. This probably isn't too hard. I /think/ the only reason the clocks are initialized early is: * The PMC HW block is involved in the path of

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-21 Thread Arnd Bergmann
On Tuesday 20 August 2013, Sebastian Hesselbarth wrote: Perhaps Tegra is the common case but other SoC haven't dug deep enough? IMHO from a HW point-of-view clocks are really among the essential things that need to be running before you can do anything useful. Just consider boot loaders that

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Stephen Warren
On 08/20/2013 02:44 PM, Arnd Bergmann wrote: > On Tuesday 20 August 2013, Stephen Warren wrote: >> On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: >>> Most DT ARM machs require common clock providers initialized before timers. >>> Currently, arch/arm machs use .init_time to call clk_of_init

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Arnd Bergmann
On Tuesday 20 August 2013, Stephen Warren wrote: > On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: > > Most DT ARM machs require common clock providers initialized before timers. > > Currently, arch/arm machs use .init_time to call clk_of_init right before > > clocksource_of_init. This

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Sebastian Hesselbarth
On 08/20/2013 09:52 PM, Stephen Warren wrote: On 08/20/2013 01:47 PM, Sebastian Hesselbarth wrote: On 08/20/2013 05:46 PM, Stephen Warren wrote: Some SoCs call this function in .init_irq() rather than .init_time(). Perhaps we adjust this patch to do that instead. That way, we can presumably

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Stephen Warren
On 08/20/2013 01:47 PM, Sebastian Hesselbarth wrote: > On 08/20/2013 05:46 PM, Stephen Warren wrote: >> On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: >>> Most DT ARM machs require common clock providers initialized before >>> timers. >>> Currently, arch/arm machs use .init_time to call

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Sebastian Hesselbarth
On 08/20/2013 05:46 PM, Stephen Warren wrote: On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init right before clocksource_of_init. This prevents to remove

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Stephen Warren
On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: > Most DT ARM machs require common clock providers initialized before timers. > Currently, arch/arm machs use .init_time to call clk_of_init right before > clocksource_of_init. This prevents to remove that hook and use the default > hook

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Stephen Warren
On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init right before clocksource_of_init. This prevents to remove that hook and use the default hook instead.

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Sebastian Hesselbarth
On 08/20/2013 05:46 PM, Stephen Warren wrote: On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init right before clocksource_of_init. This prevents to remove

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Stephen Warren
On 08/20/2013 01:47 PM, Sebastian Hesselbarth wrote: On 08/20/2013 05:46 PM, Stephen Warren wrote: On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Sebastian Hesselbarth
On 08/20/2013 09:52 PM, Stephen Warren wrote: On 08/20/2013 01:47 PM, Sebastian Hesselbarth wrote: On 08/20/2013 05:46 PM, Stephen Warren wrote: Some SoCs call this function in .init_irq() rather than .init_time(). Perhaps we adjust this patch to do that instead. That way, we can presumably

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Arnd Bergmann
On Tuesday 20 August 2013, Stephen Warren wrote: On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init right before clocksource_of_init. This prevents to

Re: [RFC 02/17] ARM: call clk_of_init from time_init

2013-08-20 Thread Stephen Warren
On 08/20/2013 02:44 PM, Arnd Bergmann wrote: On Tuesday 20 August 2013, Stephen Warren wrote: On 08/19/2013 08:04 PM, Sebastian Hesselbarth wrote: Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init right

[RFC 02/17] ARM: call clk_of_init from time_init

2013-08-19 Thread Sebastian Hesselbarth
Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init right before clocksource_of_init. This prevents to remove that hook and use the default hook instead. clk_of_init now checks for multiple calls to it, so add the

[RFC 02/17] ARM: call clk_of_init from time_init

2013-08-19 Thread Sebastian Hesselbarth
Most DT ARM machs require common clock providers initialized before timers. Currently, arch/arm machs use .init_time to call clk_of_init right before clocksource_of_init. This prevents to remove that hook and use the default hook instead. clk_of_init now checks for multiple calls to it, so add the