All of lore.kernel.org
 help / color / mirror / Atom feed
* QUERY: How to call board specific initialization function before  map_io or timer_init
@ 2010-02-25 13:07 ` viresh kumar
  0 siblings, 0 replies; 6+ messages in thread
From: viresh kumar @ 2010-02-25 13:07 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: viresh.kumar

Hello,

I need to call my board specific initialization routine before
timer_init or map_io is called.
I tried to see that in earlier architectures and found most of
architecture call machine
specific init function from map_io or init_irq or init_machine.

Situation: I need to register my clock framework with
arch/arm/common/clkdev framework
before actually initializing timer. So i can't do this in
"init_machine" as timer_init is called
before that.

Can anybody please help.

regards,
viresh kumar
ST Microelectronics
India

^ permalink raw reply	[flat|nested] 6+ messages in thread

* QUERY: How to call board specific initialization function before map_io or timer_init
@ 2010-02-25 13:07 ` viresh kumar
  0 siblings, 0 replies; 6+ messages in thread
From: viresh kumar @ 2010-02-25 13:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I need to call my board specific initialization routine before
timer_init or map_io is called.
I tried to see that in earlier architectures and found most of
architecture call machine
specific init function from map_io or init_irq or init_machine.

Situation: I need to register my clock framework with
arch/arm/common/clkdev framework
before actually initializing timer. So i can't do this in
"init_machine" as timer_init is called
before that.

Can anybody please help.

regards,
viresh kumar
ST Microelectronics
India

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: QUERY: How to call board specific initialization function before map_io or timer_init
  2010-02-25 13:07 ` viresh kumar
@ 2010-02-25 16:03   ` Ben Dooks
  -1 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2010-02-25 16:03 UTC (permalink / raw)
  To: viresh kumar; +Cc: linux-kernel, linux-arm-kernel, viresh.kumar

On Thu, Feb 25, 2010 at 06:37:37PM +0530, viresh kumar wrote:
> Hello,
> 
> I need to call my board specific initialization routine before
> timer_init or map_io is called.
> I tried to see that in earlier architectures and found most of
> architecture call machine
> specific init function from map_io or init_irq or init_machine.
> 
> Situation: I need to register my clock framework with
> arch/arm/common/clkdev framework
> before actually initializing timer. So i can't do this in
> "init_machine" as timer_init is called
> before that.

One method would be to use an init call from <linux/init.h> which is
called before these are done (you'll have to work out which one is
suitable for yourself).

Either that or ensure that your boards always call a specific
routine in their init sequence to ensure clocks are registered before
the timer needs them.

If I remeber correctly, map_io() is actually called before the timers
are initialised, so you could add your clocks there.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* QUERY: How to call board specific initialization function before map_io or timer_init
@ 2010-02-25 16:03   ` Ben Dooks
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Dooks @ 2010-02-25 16:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 25, 2010 at 06:37:37PM +0530, viresh kumar wrote:
> Hello,
> 
> I need to call my board specific initialization routine before
> timer_init or map_io is called.
> I tried to see that in earlier architectures and found most of
> architecture call machine
> specific init function from map_io or init_irq or init_machine.
> 
> Situation: I need to register my clock framework with
> arch/arm/common/clkdev framework
> before actually initializing timer. So i can't do this in
> "init_machine" as timer_init is called
> before that.

One method would be to use an init call from <linux/init.h> which is
called before these are done (you'll have to work out which one is
suitable for yourself).

Either that or ensure that your boards always call a specific
routine in their init sequence to ensure clocks are registered before
the timer needs them.

If I remeber correctly, map_io() is actually called before the timers
are initialised, so you could add your clocks there.

-- 
Ben

Q:      What's a light-year?
A:      One-third less calories than a regular year.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: QUERY: How to call board specific initialization function before  map_io or timer_init
  2010-02-25 16:03   ` Ben Dooks
@ 2010-02-26  4:29     ` viresh kumar
  -1 siblings, 0 replies; 6+ messages in thread
From: viresh kumar @ 2010-02-26  4:29 UTC (permalink / raw)
  To: Ben Dooks; +Cc: linux-kernel, linux-arm-kernel, viresh.kumar

>> Situation: I need to register my clock framework with
>> arch/arm/common/clkdev framework
>> before actually initializing timer. So i can't do this in
>> "init_machine" as timer_init is called
>> before that.
>
> One method would be to use an init call from <linux/init.h> which is
> called before these are done (you'll have to work out which one is
> suitable for yourself).
>

I tried few of them but timer_init or map_io are getting called before my
routine is called.

> Either that or ensure that your boards always call a specific
> routine in their init sequence to ensure clocks are registered before
> the timer needs them.
>
> If I remeber correctly, map_io() is actually called before the timers
> are initialised, so you could add your clocks there.

I can add my init routine to map_io's implementation, but i think
map_io is not supposed to be implemented that way. map_io should
be called to statically map devices memory. It is not for hardware
specific initializations.

Is my understanding correct?


regards,
viresh kumar

^ permalink raw reply	[flat|nested] 6+ messages in thread

* QUERY: How to call board specific initialization function before map_io or timer_init
@ 2010-02-26  4:29     ` viresh kumar
  0 siblings, 0 replies; 6+ messages in thread
From: viresh kumar @ 2010-02-26  4:29 UTC (permalink / raw)
  To: linux-arm-kernel

>> Situation: I need to register my clock framework with
>> arch/arm/common/clkdev framework
>> before actually initializing timer. So i can't do this in
>> "init_machine" as timer_init is called
>> before that.
>
> One method would be to use an init call from <linux/init.h> which is
> called before these are done (you'll have to work out which one is
> suitable for yourself).
>

I tried few of them but timer_init or map_io are getting called before my
routine is called.

> Either that or ensure that your boards always call a specific
> routine in their init sequence to ensure clocks are registered before
> the timer needs them.
>
> If I remeber correctly, map_io() is actually called before the timers
> are initialised, so you could add your clocks there.

I can add my init routine to map_io's implementation, but i think
map_io is not supposed to be implemented that way. map_io should
be called to statically map devices memory. It is not for hardware
specific initializations.

Is my understanding correct?


regards,
viresh kumar

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-26  4:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-25 13:07 QUERY: How to call board specific initialization function before map_io or timer_init viresh kumar
2010-02-25 13:07 ` viresh kumar
2010-02-25 16:03 ` Ben Dooks
2010-02-25 16:03   ` Ben Dooks
2010-02-26  4:29   ` viresh kumar
2010-02-26  4:29     ` viresh kumar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.