[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/arm: Device Tree cpu clock-frequency



commit 0220338fc9360b9bc741f975f00d7ff8ae6242f9
Author:     Jon Fraser <jfraser@xxxxxxxxxxxx>
AuthorDate: Thu Nov 7 18:50:28 2013 -0500
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Mon Nov 11 16:05:15 2013 +0000

    xen/arm: Device Tree cpu clock-frequency
    
    When creating CPU device tree properties, copy the
    clock-frequency if present.
    
    Quiets annoying messages from linux kernel:
    "/cpus/cpu@0 missing clock-frequency property"
    
    Signed-off-by: Jon Fraser <jfraser@xxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index c644be2..186746c 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -391,6 +391,8 @@ 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;
+    bool_t clock_valid;
 
     DPRINT("Create cpus node\n");
 
@@ -411,6 +413,8 @@ 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_valid = dt_property_read_u32(npcpu, "clock-frequency",
+                                            &clock_frequency);
             break;
         }
     }
@@ -457,6 +461,12 @@ static int make_cpus_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);
         if ( res )
             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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.