Andrii Anisov
2013-Aug-07 10:27 UTC
[PATCH] xen/arm: Allow setup timer frequency from platform code.
Change-Id: I8b3871920e000afe7095b541cf83419c641f2ea2 Signed-off-by: Andrii Anisov <andrii.anisov@ti.com> --- xen/arch/arm/time.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/time.c b/xen/arch/arm/time.c index 4ed7882..9fa8b15 100644 --- a/xen/arch/arm/time.c +++ b/xen/arch/arm/time.c @@ -46,7 +46,7 @@ uint64_t __read_mostly boot_count; /* For fine-grained timekeeping, we use the ARM "Generic Timer", a * register-mapped time source in the SoC. */ -unsigned long __read_mostly cpu_khz; /* CPU clock frequency in kHz. */ +unsigned long __read_mostly cpu_khz = 0; /* CPU clock frequency in kHz. */ static struct dt_irq timer_irq[MAX_TIMER_PPI]; @@ -134,7 +134,8 @@ int __init init_xen_time(void) if ( !cpu_has_gentimer ) panic("CPU does not support the Generic Timer v1 interface.\n"); - cpu_khz = READ_SYSREG32(CNTFRQ_EL0) / 1000; + if ( cpu_khz == 0) + cpu_khz = READ_SYSREG32(CNTFRQ_EL0) / 1000; boot_count = READ_SYSREG64(CNTPCT_EL0); printk("Using generic timer at %lu KHz\n", cpu_khz); -- 1.7.9.5 *Sincerely,* *Andrii Anisov.* _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel