[PATCH] clkdev: add support to lookup for early platform device
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Apr 28 06:07:19 EDT 2011
On Thu, Apr 28, 2011 at 11:26:13AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 09:35 Thu 28 Apr , Russell King - ARM Linux wrote:
> > On Thu, Apr 28, 2011 at 07:12:03AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > How did you manage to get the clock for the earlytimer?
> >
> > This is getting silly. "Let's move all our devices to early" is insane.
> > I can see someone then wanting an early-early-device because early has
> > become just too late in the initialization.
> >
> > Come on guys, keep it simple and stop trying to contort the interfaces
> > you're given into doing things they're not designed to do.
> I agress but I need to pass resources to the timer so early devices make
> sense
Again, you shouldn't be setting up the timer at map_io time - the kernel
just isn't ready for it.
map_io is meant just for setting up IO mappings. You can then use the
init_early callback to register tables, setting up sched_clock, getting
the timer running for sched_clock, etc. At this point, memblock must not
be used, but bootmem is active, but normal page allocation is not.
The clocksource/clockevent initialization should happen after that when
the system_timer->init function is called.
More information about the linux-arm-kernel
mailing list