From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jon Fraser" Subject: [PATCH] xen/arm: copy cpu clock-frequency to CPU DT node. Date: Fri, 1 Nov 2013 16:58:35 -0400 Message-ID: <1383339515-10472-1-git-send-email-jfraser@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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: Jon Fraser List-Id: xen-devel@lists.xenproject.org When creating the CPU DT node, copy the clock-frequency if present. Signed-off-by: Jon Fraser --- xen/arch/arm/domain_build.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index c644be2..b212627 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -391,6 +391,7 @@ static int make_cpus_node(const struct domain *d, void *fdt, u32 len; /* Placeholder for cpu@ + a 32-bit number + \0 */ char buf[15]; + u32 *clock_frequency; DPRINT("Create cpus node\n"); @@ -411,6 +412,7 @@ static int make_cpus_node(const struct domain *d, void *fdt, if ( dt_device_type_is_equal(npcpu, "cpu") ) { compatible = dt_get_property(npcpu, "compatible", &len); + clock_frequency = (u32 *)dt_get_property(npcpu, "clock-frequency", NULL); break; } } @@ -457,6 +459,12 @@ static int make_cpus_node(const struct domain *d, void *fdt, if ( res ) return res; + if (clock_frequency) { + res = fdt_property_cell(fdt, "clock-frequency", *(u32 *)clock_frequency); + if ( res ) + return res; + } + res = fdt_end_node(fdt); if ( res ) return res; -- 1.7.11.3