[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ffb9fc68dff38f811eeb24c15aba0418b6a8ee53@git.kernel.org>
Date: Wed, 23 Feb 2011 21:51:12 GMT
From: tip-bot for Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, grant.likely@...retlab.ca,
hpa@...or.com, mingo@...hat.com, dirk.brandewie@...il.com,
bigeasy@...utronix.de, tglx@...utronix.de
Subject: [tip:x86/platform] x86: dtb: Add device tree support for HPET
Commit-ID: ffb9fc68dff38f811eeb24c15aba0418b6a8ee53
Gitweb: http://git.kernel.org/tip/ffb9fc68dff38f811eeb24c15aba0418b6a8ee53
Author: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
AuthorDate: Tue, 22 Feb 2011 21:07:41 +0100
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 23 Feb 2011 22:27:53 +0100
x86: dtb: Add device tree support for HPET
Set hpet_address based on information provied form DTB
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Acked-by: Grant Likely <grant.likely@...retlab.ca>
Cc: sodaville@...utronix.de
Cc: devicetree-discuss@...ts.ozlabs.org
Cc: Dirk Brandewie <dirk.brandewie@...il.com>
LKML-Reference: <1298405266-1624-7-git-send-email-bigeasy@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
arch/x86/kernel/devicetree.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 2739d56..dbb3bda 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -11,6 +11,7 @@
#include <linux/of_platform.h>
#include <linux/slab.h>
+#include <asm/hpet.h>
#include <asm/irq_controller.h>
#include <asm/apic.h>
@@ -98,6 +99,23 @@ void __init add_dtb(u64 data)
initial_dtb = data + offsetof(struct setup_data, data);
}
+static void __init dtb_setup_hpet(void)
+{
+ struct device_node *dn;
+ struct resource r;
+ int ret;
+
+ dn = of_find_compatible_node(NULL, NULL, "intel,ce4100-hpet");
+ if (!dn)
+ return;
+ ret = of_address_to_resource(dn, 0, &r);
+ if (ret) {
+ WARN_ON(1);
+ return;
+ }
+ hpet_address = r.start;
+}
+
static void __init dtb_lapic_setup(void)
{
#ifdef CONFIG_X86_LOCAL_APIC
@@ -197,5 +215,6 @@ void __init x86_dtb_get_config(unsigned int unused)
of_scan_flat_dt(early_init_dt_scan_root, NULL);
unflatten_device_tree();
+ dtb_setup_hpet();
dtb_apic_setup();
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists