[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: Pass the timer "clock-frequency" to DOM0 in make_timer_node()
commit 94191dcee8ff9f8b925824e54741f28b954bf95e Author: Suriyan Ramasami <suriyan.r@xxxxxxxxx> AuthorDate: Mon Apr 14 01:14:00 2014 -0700 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Wed Apr 16 17:10:57 2014 +0100 xen/arm: Pass the timer "clock-frequency" to DOM0 in make_timer_node() If the DT representing the ARM generic timer mentions a clock-frequency, propragate it to the DT that is built for DOM0. This is necessary as a workaround for boards (Odroid-XU) where CNTFRQ is not set or returns a wrong value. Ideally CNTFRQ should be set by the boot loader. The bootloader should respect the ARM ARM (see B.8.1.1): "The CNTFRQ register is UNKNOWN at reset, and therefore the counter frequency must written to CNTFRQ as part of the system boot process." For the Odroid-XU the SPL BL2 code is entered in NS HYP mode which prevents the execution of the mcr call to set CNTFRQ. Signed-off-by: Suriyan Ramasami <suriyan.r@xxxxxxxxx> Reviewed-by: Julien Grall <julien.grall@xxxxxxxxxx> Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/arch/arm/domain_build.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index df34c6d..187e071 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -618,6 +618,8 @@ static int make_timer_node(const struct domain *d, void *fdt, int res; const struct dt_irq *irq; gic_interrupt_t intrs[3]; + u32 clock_frequency; + bool_t clock_valid; DPRINT("Create timer node\n"); @@ -659,6 +661,15 @@ static int make_timer_node(const struct domain *d, void *fdt, if ( res ) return res; + clock_valid = dt_property_read_u32(dev, "clock-frequency", + &clock_frequency); + if ( clock_valid ) + { + res = fdt_property_cell(fdt, "clock-frequency", clock_frequency); + if ( res ) + return res; + } + res = fdt_end_node(fdt); return res; -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |