Add a generic DesignWare APB timer device model, and wire it
up for the K230 machine with num-timers=6 and a 6.25 MHz clock.
Changes since v3 (address review comments from Philippe Mathieu-Daude):
- Drop Clock framework mention from the commit message
- Cover the device in MAINTAINERS (device files in patch 1/3,
test file in patch 3/3)
- Move trace calls to function entry
- Drop the addr mask; the MMIO region stays at 0x100 (the IP
register implementation range; the SoC aperture is board-level)
- Hard-code comp-version (0x3231312A, "211*", IP component version)
- Use the Resettable API (phases.hold) instead of legacy reset
- Add unrealize to free per-channel ptimers
- Keep register offsets and bit definitions in the C file
- Drop private/public comments in the header
- Move K230 timer macros into k230.c
raoyi (3):
hw/timer: add DesignWare APB timer model
hw/riscv: add DesignWare APB timer to K230 board
tests/qtest: add k230 dwapb timer test
MAINTAINERS | 3 +
hw/riscv/Kconfig | 1 +
hw/riscv/k230.c | 33 ++-
hw/timer/Kconfig | 4 +
hw/timer/dw-apb-timer.c | 376 ++++++++++++++++++++++++++++
hw/timer/meson.build | 1 +
hw/timer/trace-events | 8 +
include/hw/riscv/k230.h | 8 +
include/hw/timer/dw-apb-timer.h | 40 +++
tests/qtest/k230-dwapb-timer-test.c | 274 ++++++++++++++++++++
tests/qtest/meson.build | 4 +-
11 files changed, 748 insertions(+), 4 deletions(-)
create mode 100644 hw/timer/dw-apb-timer.c
create mode 100644 include/hw/timer/dw-apb-timer.h
create mode 100644 tests/qtest/k230-dwapb-timer-test.c
--
2.53.0