[U-Boot] [PATCH 04/28] armv8/ls2085a: Fix generic timer clock source

York Sun yorksun at freescale.com
Thu Mar 19 19:16:25 CET 2015


On 03/19/2015 11:08 AM, Mark Rutland wrote:
>> +
>> +int timer_init(void)
>> +{
>> +	u32 __iomem *cntcr = (u32 *)CONFIG_SYS_FSL_TIMER_ADDR;
>> +	u32 __iomem *cltbenr = (u32 *)CONFIG_SYS_FSL_PMU_CLTBENR;
>> +#ifdef COUNTER_FREQUENCY_REAL
>> +	unsigned long cntfrq = COUNTER_FREQUENCY_REAL;
>> +
>> +	/* Update with accurate clock frequency */
>> +	asm volatile("msr cntfrq_el0, %0" : : "r" (cntfrq) : "memory");
>> +#endif
> 
> Is this executed on all CPUs, or do secondary CPUs have CNTFRQ
> programmed with the correct value elsewhere?
> 

Only the primary CPU runs here. The secondary CPU doesn't come here.

York


More information about the U-Boot mailing list