Re: [PATCH v3 2/3] hw/riscv: add DesignWare APB timer to K230 board

Philippe Mathieu-Daudé <[email protected]>
Newsgroups org.nongnu.qemu-riscv,org.nongnu.qemu-devel
Message-ID <[email protected]>
On 11/8/26 08:46, raoyi wrote:
> Wire up the DesignWare APB timer to the K230 SoC with
> num-timers=6 and a 6.25 MHz clock. Connect timer IRQs
> to the PLIC. Remove the previous unimplemented timer stub.
> 
> Signed-off-by: raoyi <[email protected]>
> ---
>   hw/riscv/Kconfig        |  1 +
>   hw/riscv/k230.c         | 32 +++++++++++++++++++++++++++++---
>   include/hw/riscv/k230.h | 12 ++++++++++++
>   3 files changed, 42 insertions(+), 3 deletions(-)


> diff --git a/include/hw/riscv/k230.h b/include/hw/riscv/k230.h
> index 592e1c26bf..0f872554c8 100644
> --- a/include/hw/riscv/k230.h
> +++ b/include/hw/riscv/k230.h
> @@ -18,9 +18,14 @@
>   #include "hw/core/boards.h"
>   #include "hw/riscv/riscv_hart.h"
>   #include "hw/watchdog/k230_wdt.h"
> +#include "hw/timer/dw-apb-timer.h"
>   
>   #define C908_CPU_HARTID   (0)
>   
> +#define K230_TIMER_NUM_CHANNELS 6
> +#define K230_TIMER_DEFAULT_FREQ 6250000
> +#define K230_TIMER_COMP_VERSION 0x3231312A

Keep these definitions private to hw/riscv/k230.c, otherwise:

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.