[PATCH 09/14] at91: switch pit timer to early platform devices

Russell King - ARM Linux linux at arm.linux.org.uk
Sun May 8 06:08:41 EDT 2011


On Sat, Apr 30, 2011 at 03:36:58AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> yes we still need a calback to call the early probe
> but just a callback for the init no resume, suspend
> 
> if we want multiple timer early which I do not think is necessarly
> for really early one timer is enough if you need more you can initialise them
> later
> 
> so if we keep this constrain
> 
> in the arm timer init
> early_platform_driver_register_all("earlytimer");
> early_platform_driver_probe("earlytimer", 1 , 0);
> 
> and in the init_early you just need to do
> early_platform_add_devices(devices, nb);
> 
> so it's more generic

I'm still not convinced.  What it seems to be doing is moving from this:

time_init() ->
	system_timer->init() ->
		platform code

to this:

setup_arch() ->
	init_early() ->
		platform code ->
			early_platform_add_devices()
time_init() ->
	early_platform_driver_register_all(),
	early_platform_driver_probe() ->
		early timer probe function (platform code)

which to me just looks a whole lot more complex without benefit.

Platform code still has to make the decision at some point about which
timers are added - in the former case via the system_timer->init()
callback or in the latter case by the init_early() callback.

I can't see how this results in something better, either by simplifing
the code or resulting in any kind of consolidation.  That's backed up
by this patch adding around 230 lines of code.



More information about the linux-arm-kernel mailing list