hpet: Convert to qdev

Register the HPET as a sysbus device and create it that way. As it can
route its IRQs to any ISA IRQ, we need to connect it to all 24 of them.
Once converted to qdev, we can move reset handler and vmstate
registration into its hands as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Jan Kiszka 2010-06-13 14:15:38 +02:00 committed by Blue Swirl
parent 7afbecc9ef
commit 822557eb8e
3 changed files with 38 additions and 15 deletions

View file

@ -19,6 +19,8 @@
#define FS_PER_NS 1000000
#define HPET_NUM_TIMERS 3
#define HPET_NUM_IRQ_ROUTES 32
#define HPET_CFG_ENABLE 0x001
#define HPET_CFG_LEGACY 0x002
@ -47,7 +49,6 @@
#if defined TARGET_I386
extern uint32_t hpet_in_legacy_mode(void);
extern void hpet_init(qemu_irq *irq);
#endif
#endif