aboutsummaryrefslogtreecommitdiff
path: root/include/hw/timer/aspeed_timer.h
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2016-06-17 15:23:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-17 15:23:51 +0100
commit1d3e65aa7ac5afb6798c222abd923eff49ac55f0 (patch)
treee977e23db17df84c988f2f0dca5c2d893b270b2f /include/hw/timer/aspeed_timer.h
parent3b1a2225010b1f25745ed6e934cb4c25eb28282e (diff)
hw/timer: Add value matching support to aspeed_timer
Value matching allows Linux to boot with CONFIG_NO_HZ_IDLE=y on the palmetto-bmc machine. Two match registers are provided for each timer. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Message-id: 1465974248-20434-1-git-send-email-andrew@aj.id.au Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/hw/timer/aspeed_timer.h')
-rw-r--r--include/hw/timer/aspeed_timer.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/hw/timer/aspeed_timer.h b/include/hw/timer/aspeed_timer.h
index 44dc2f89d5..bd6c1a7f96 100644
--- a/include/hw/timer/aspeed_timer.h
+++ b/include/hw/timer/aspeed_timer.h
@@ -22,7 +22,7 @@
#ifndef ASPEED_TIMER_H
#define ASPEED_TIMER_H
-#include "hw/ptimer.h"
+#include "qemu/timer.h"
#define ASPEED_TIMER(obj) \
OBJECT_CHECK(AspeedTimerCtrlState, (obj), TYPE_ASPEED_TIMER);
@@ -33,15 +33,16 @@ typedef struct AspeedTimer {
qemu_irq irq;
uint8_t id;
+ QEMUTimer timer;
/**
* Track the line level as the ASPEED timers implement edge triggered
* interrupts, signalling with both the rising and falling edge.
*/
int32_t level;
- ptimer_state *timer;
uint32_t reload;
uint32_t match[2];
+ uint64_t start;
} AspeedTimer;
typedef struct AspeedTimerCtrlState {