mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
3b1a222501
commit
1d3e65aa7a
2 changed files with 104 additions and 39 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue