xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen/arm: copy cpu clock-frequency to CPU DT node.
@ 2013-11-01 20:58 Jon Fraser
  2013-11-04 17:12 ` Ian Campbell
  0 siblings, 1 reply; 9+ messages in thread
From: Jon Fraser @ 2013-11-01 20:58 UTC (permalink / raw)
  To: xen-devel; +Cc: Jon Fraser

When creating the CPU DT node, copy the clock-frequency if present.

Signed-off-by: Jon Fraser <jfraser@broadcom.com>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-11 16:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01 20:58 [PATCH] xen/arm: copy cpu clock-frequency to CPU DT node Jon Fraser
2013-11-04 17:12 ` Ian Campbell
2013-11-04 18:35   ` Jon Fraser
2013-11-05  9:56     ` Ian Campbell
2013-11-05 10:04       ` Ian Campbell
2013-11-05 19:54         ` Jon Fraser
2013-11-06 10:28           ` Ian Campbell
2013-11-07 23:50             ` [PATCH V2] xen/arm: Device Tree cpu clock-frequency Jon Fraser
2013-11-11 16:26               ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).