From 8e34dc4b2c36c85624756e2444d1604acbb6db8d Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 21 Jun 2010 17:06:34 +0300 Subject: [PATCH] Make hpet/pit interface close to upstream Signed-off-by: Avi Kivity --- hw/hpet.c | 8 ++++---- hw/i8254.c | 4 ++-- hw/pc.h | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/hpet.c b/hw/hpet.c index 8859b21ca8..0643e1850f 100644 --- a/hw/hpet.c +++ b/hw/hpet.c @@ -195,7 +195,7 @@ static int hpet_post_load(void *opaque, int version_id) s->hpet_offset = ticks_to_ns(s->hpet_counter) - qemu_get_clock(vm_clock); if (hpet_in_legacy_mode()) { - hpet_disable_pit(); + hpet_pit_disable(); } return 0; @@ -512,9 +512,9 @@ static void hpet_ram_writel(void *opaque, target_phys_addr_t addr, } /* i8254 and RTC are disabled when HPET is in legacy mode */ if (activating_bit(old_val, new_val, HPET_CFG_LEGACY)) { - hpet_disable_pit(); + hpet_pit_disable(); } else if (deactivating_bit(old_val, new_val, HPET_CFG_LEGACY)) { - hpet_enable_pit(); + hpet_pit_enable(); } break; case HPET_CFG + 4: @@ -602,7 +602,7 @@ static void hpet_reset(void *opaque) * hpet_reset is called due to system reset. At this point control must * be returned to pit until SW reenables hpet. */ - hpet_enable_pit(); + hpet_pit_enable(); } count = 1; } diff --git a/hw/i8254.c b/hw/i8254.c index 1add08e8da..d202350897 100644 --- a/hw/i8254.c +++ b/hw/i8254.c @@ -487,7 +487,7 @@ void pit_reset(void *opaque) #ifdef TARGET_I386 /* When HPET is operating in legacy mode, i8254 timer0 is disabled */ -void hpet_disable_pit(void) +void hpet_pit_disable(void) { PITChannelState *s = &pit_state.channels[0]; @@ -510,7 +510,7 @@ void hpet_disable_pit(void) * timer 0 */ -void hpet_enable_pit(void) +void hpet_pit_enable(void) { PITState *pit = &pit_state; PITChannelState *s = &pit->channels[0]; diff --git a/hw/pc.h b/hw/pc.h index eafc21fcad..dbce20794f 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -64,8 +64,8 @@ int pit_get_out(PITState *pit, int channel, int64_t current_time); PITState *kvm_pit_init(int base, qemu_irq irq); -void hpet_disable_pit(void); -void hpet_enable_pit(void); +void hpet_pit_disable(void); +void hpet_pit_enable(void); /* vmport.c */ void vmport_init(void); -- 2.11.4.GIT