diff options
Diffstat (limited to 'arch/x86/kernel/devicetree.c')
-rw-r--r-- | 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 2739d5613a38..dbb3bda40af9 100644 --- a/arch/x86/kernel/devicetree.c +++ b/arch/x86/kernel/devicetree.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/of_platform.h> | 11 | #include <linux/of_platform.h> |
12 | #include <linux/slab.h> | 12 | #include <linux/slab.h> |
13 | 13 | ||
14 | #include <asm/hpet.h> | ||
14 | #include <asm/irq_controller.h> | 15 | #include <asm/irq_controller.h> |
15 | #include <asm/apic.h> | 16 | #include <asm/apic.h> |
16 | 17 | ||
@@ -98,6 +99,23 @@ void __init add_dtb(u64 data) | |||
98 | initial_dtb = data + offsetof(struct setup_data, data); | 99 | initial_dtb = data + offsetof(struct setup_data, data); |
99 | } | 100 | } |
100 | 101 | ||
102 | static void __init dtb_setup_hpet(void) | ||
103 | { | ||
104 | struct device_node *dn; | ||
105 | struct resource r; | ||
106 | int ret; | ||
107 | |||
108 | dn = of_find_compatible_node(NULL, NULL, "intel,ce4100-hpet"); | ||
109 | if (!dn) | ||
110 | return; | ||
111 | ret = of_address_to_resource(dn, 0, &r); | ||
112 | if (ret) { | ||
113 | WARN_ON(1); | ||
114 | return; | ||
115 | } | ||
116 | hpet_address = r.start; | ||
117 | } | ||
118 | |||
101 | static void __init dtb_lapic_setup(void) | 119 | static void __init dtb_lapic_setup(void) |
102 | { | 120 | { |
103 | #ifdef CONFIG_X86_LOCAL_APIC | 121 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -197,5 +215,6 @@ void __init x86_dtb_get_config(unsigned int unused) | |||
197 | of_scan_flat_dt(early_init_dt_scan_root, NULL); | 215 | of_scan_flat_dt(early_init_dt_scan_root, NULL); |
198 | 216 | ||
199 | unflatten_device_tree(); | 217 | unflatten_device_tree(); |
218 | dtb_setup_hpet(); | ||
200 | dtb_apic_setup(); | 219 | dtb_apic_setup(); |
201 | } | 220 | } |