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

Arnd Bergmann arnd at arndb.de
Tue Aug 20 16:44:56 EDT 2013


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 remove that hook and use the default
> > hook instead. clk_of_init now checks for multiple calls to it, so add
> > the call to ARM arch time_init by default.
> 
> 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 get rid of patch 1/17 since we can eliminate any duplicate
> calls, and adjust patch 14/17 (Tegra board file) to remove its custom
> call to of_clock_init(NULL)?

I think we should do thinks as late as possible in general. We probably
need clocks running on most platforms before we can set up timers, so
it makes sense to do the clocks first, but very few platforms require
clocks to be running before the interrupt controller is set up.

A nicer solution would be to change the tegra code to not require this
to be called this early, if at all possible.

	Arnd



More information about the linux-arm-kernel mailing list