From: Suriyan Ramasami Subject: [ARM:PATCH v1 1/1] Pass the timer clock-frequency to DOM0 Date: Wed, 26 Mar 2014 11:42:30 -0700 Message-ID: <1395859350-27681-1-git-send-email-suriyan.r@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7016915284866544305==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: Suriyan Ramasami , julien.grall@linaro.org, ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org --===============7016915284866544305== Content-Type: text/plain 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. --- xen/arch/arm/domain_build.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index c9dda0e..bd3c985 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -622,6 +622,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"); @@ -639,6 +641,9 @@ static int make_timer_node(const struct domain *d, void *fdt, return -FDT_ERR_XEN(ENOENT); } + clock_valid = dt_property_read_u32(dev, "clock-frequency", + &clock_frequency); + res = fdt_begin_node(fdt, "timer"); if ( res ) return res; @@ -663,6 +668,13 @@ static int make_timer_node(const struct domain *d, void *fdt, if ( res ) return res; + if ( clock_valid ) + { + res = fdt_property_cell(fdt, “clock-frequency”, clock_frequency); + if ( res ) + return res; + } + res = fdt_end_node(fdt); return res; -- 1.7.1 --===============7016915284866544305== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============7016915284866544305==--