From: "Jon Fraser" <jfraser@broadcom.com>
To: xen-devel@lists.xen.org
Cc: Jon Fraser <jfraser@broadcom.com>
Subject: [PATCH] xen/arm: copy cpu clock-frequency to CPU DT node.
Date: Fri, 1 Nov 2013 16:58:35 -0400 [thread overview]
Message-ID: <1383339515-10472-1-git-send-email-jfraser@broadcom.com> (raw)
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
next reply other threads:[~2013-11-01 20:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 20:58 Jon Fraser [this message]
2013-11-04 17:12 ` [PATCH] xen/arm: copy cpu clock-frequency to CPU DT node 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
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=1383339515-10472-1-git-send-email-jfraser@broadcom.com \
--to=jfraser@broadcom.com \
--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).