[U-Boot] [PATCH] Tegra114: Initialize System Counter (TSC) with osc frequency

Tom Warren TWarren at nvidia.com
Thu Apr 4 01:31:17 CEST 2013



> -----Original Message-----
> From: Stephen Warren [mailto:swarren at wwwdotorg.org]
> Sent: Wednesday, April 03, 2013 4:26 PM
> To: Tom Warren
> Cc: u-boot at lists.denx.de; Stephen Warren; Tom Warren
> Subject: Re: [U-Boot] [PATCH] Tegra114: Initialize System Counter (TSC) with
> osc frequency
> 
> On 04/03/2013 05:12 PM, Tom Warren wrote:
> > T114 needs the SYSCTR0 counter initialized so the TSC can be read by
> > the kernel. Do it in the bootloader since it's a write-once deal
> > (secure/non-secure mode dependent).
> 
> > diff --git a/arch/arm/cpu/tegra-common/clock.c
> > b/arch/arm/cpu/tegra-common/clock.c
> 
> > @@ -557,4 +557,7 @@ void clock_init(void)
> ...
> > +	/* Do any special system timer/TSC setup */
> > +	arch_timer_init();
> 
> I wonder if we shouldn't ifdef that, so that ...
> 
> > diff --git a/arch/arm/cpu/tegra20-common/clock.c
> > b/arch/arm/cpu/tegra20-common/clock.c
> 
> > +void arch_timer_init(void)
> > +{
> > +}
> 
> We don't need those stubs on the chips that don't support this. (I imagine
> that for future chips, the implementation will be common and will move out
> of the chip-specific file into some arch-timers file).
I had an ifdef in there originally, but I don't like to add #ifdefs if they can be avoided, and I wasn't sure if there might not be some T20/T30-specific TSC/HPT init needed later.

> 
> Either way though,
> Reviewed-by: Stephen Warren <swarren at nvidia.com>
Thanks

--
nvpublic



More information about the U-Boot mailing list