aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/hpet.h
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-03-12 13:19:34 +0000
committerJan Beulich <jbeulich@novell.com>2011-03-12 13:19:34 +0000
commitb927089900d45335c861e49cfb4e66a8d8c8ccea (patch)
tree788aefe3c1cd04e72a7c36a72a26d0d8c11fc909 /xen/include/asm-x86/hpet.h
parent8fb98708308bec25d9e80c7ebe0360cb95fc11f9 (diff)
downloadxen-b927089900d45335c861e49cfb4e66a8d8c8ccea.tar.gz
xen-b927089900d45335c861e49cfb4e66a8d8c8ccea.tar.bz2
xen-b927089900d45335c861e49cfb4e66a8d8c8ccea.zip
x86/HPET: cleanup
- separate init and resume code paths (so that the [larger] init parts can go init .init.* sections) - drop the separate legacy_hpet_event object, as we can easily re-use the first slot of hpet_events[] for that purpose (the whole array is otherwise unused when the legacy code is being used) - use section placement attributes where reasonable Signed-off-by: Jan Beulich <jbeulich@novell.com> Acked-by: Wei Gang <gang.wei@intel.com>
Diffstat (limited to 'xen/include/asm-x86/hpet.h')
-rw-r--r--xen/include/asm-x86/hpet.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/xen/include/asm-x86/hpet.h b/xen/include/asm-x86/hpet.h
index da08880f6c..702fd016f1 100644
--- a/xen/include/asm-x86/hpet.h
+++ b/xen/include/asm-x86/hpet.h
@@ -14,19 +14,9 @@
#define HPET_CFG 0x010
#define HPET_STATUS 0x020
#define HPET_COUNTER 0x0f0
-#define HPET_T0_CFG 0x100
-#define HPET_T0_CMP 0x108
-#define HPET_T0_ROUTE 0x110
-#define HPET_T1_CFG 0x120
-#define HPET_T1_CMP 0x128
-#define HPET_T1_ROUTE 0x130
-#define HPET_T2_CFG 0x140
-#define HPET_T2_CMP 0x148
-#define HPET_T2_ROUTE 0x150
-
-#define HPET_Tn_CFG(n) (HPET_T0_CFG + n * 0x20)
-#define HPET_Tn_CMP(n) (HPET_T0_CMP + n * 0x20)
-#define HPET_Tn_ROUTE(n) (HPET_T0_ROUTE + n * 0x20)
+#define HPET_Tn_CFG(n) (0x100 + (n) * 0x20)
+#define HPET_Tn_CMP(n) (0x108 + (n) * 0x20)
+#define HPET_Tn_ROUTE(n) (0x110 + (n) * 0x20)
#define HPET_ID_VENDOR 0xffff0000
#define HPET_ID_LEGSUP 0x00008000
@@ -65,6 +55,7 @@ extern unsigned long hpet_address;
* Return value is zero if HPET is unavailable.
*/
u64 hpet_setup(void);
+void hpet_resume(void);
/*
* Callback from legacy timer (PIT channel 0) IRQ handler.
@@ -77,6 +68,7 @@ int hpet_legacy_irq_tick(void);
* rather than using the LAPIC timer. Used for Cx state entry.
*/
void hpet_broadcast_init(void);
+void hpet_broadcast_resume(void);
void hpet_broadcast_enter(void);
void hpet_broadcast_exit(void);
int hpet_broadcast_is_available(void);