From: "Jon Fraser" <jfraser@broadcom.com>
To: xen-devel@lists.xen.org
Cc: julien.grall@linaro.org, ian.campbell@citrix.com,
Jon Fraser <jfraser@broadcom.com>
Subject: [PATCH V2] xen/arm: Device Tree cpu clock-frequency
Date: Thu, 7 Nov 2013 18:50:28 -0500 [thread overview]
Message-ID: <1383868228-30709-1-git-send-email-jfraser@broadcom.com> (raw)
In-Reply-To: <1383733729.26213.50.camel@kazak.uk.xensource.com>
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@broadcom.com>
---
xen/arch/arm/domain_build.c | 10 ++++++++++
1 file changed, 10 insertions(+)
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;
--
1.7.11.3
next prev parent reply other threads:[~2013-11-07 23:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Jon Fraser [this message]
2013-11-11 16:26 ` [PATCH V2] xen/arm: Device Tree cpu clock-frequency Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383868228-30709-1-git-send-email-jfraser@broadcom.com \
--to=jfraser@broadcom.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).