Message ID | 1309427865-17531-2-git-send-email-weisserm@arcor.de |
---|---|
State | Accepted |
Commit | a7f39e7c222e0266a1ea7495adb7ed39076960a7 |
Headers | show |
On 06/30/2011 11:57 AM, Matthias Weisser wrote: > Need this function for autoboot keyd > Hi Matthias, > +/* > + * This function is derived from PowerPC code (timebase clock frequency). > + * On ARM it returns the number of timer ticks per second. > + */ > +ulong get_tbclk(void) > +{ > + ulong tbclk; > + > + tbclk = CONFIG_MX25_CLK32; > + return tbclk; > +} Which is the advantage to add this function instead using directly CONFIG_MX25_CLK32 in the caller ? It is not me so clear.. Best regards, Stefano Babic
Hi Stefano Am 30.06.2011 17:38, schrieb Stefano Babic: > On 06/30/2011 11:57 AM, Matthias Weisser wrote: >> Need this function for autoboot keyd >> > > Hi Matthias, > >> +/* >> + * This function is derived from PowerPC code (timebase clock frequency). >> + * On ARM it returns the number of timer ticks per second. >> + */ >> +ulong get_tbclk(void) >> +{ >> + ulong tbclk; >> + >> + tbclk = CONFIG_MX25_CLK32; >> + return tbclk; >> +} > > Which is the advantage to add this function instead using directly > CONFIG_MX25_CLK32 in the caller ? It is not me so clear.. The caller is in common code (see common/main.c line 76 -> 97). I think if I add CONFIG_MX25_CLK32 there whis will break a couple of boards which I don't want to. ;-) Also, we will have all this stuff cleaned up when the timer redesign comes in. Regards, Matthias
diff --git a/arch/arm/cpu/arm926ejs/mx25/timer.c b/arch/arm/cpu/arm926ejs/mx25/timer.c index 14f0c2d..7c8a71b 100644 --- a/arch/arm/cpu/arm926ejs/mx25/timer.c +++ b/arch/arm/cpu/arm926ejs/mx25/timer.c @@ -187,3 +187,15 @@ void __udelay (unsigned long usec) while (get_ticks() < tmp) /* loop till event */ /*NOP*/; } + +/* + * This function is derived from PowerPC code (timebase clock frequency). + * On ARM it returns the number of timer ticks per second. + */ +ulong get_tbclk(void) +{ + ulong tbclk; + + tbclk = CONFIG_MX25_CLK32; + return tbclk; +}
Need this function for autoboot keyd Signed-off-by: Matthias Weisser <weisserm@arcor.de> --- arch/arm/cpu/arm926ejs/mx25/timer.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)