mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
hw/timer: Refactor NPCM7XX Timer to use CLK clock
This patch makes NPCM7XX Timer to use a the timer clock generated by the CLK module instead of the magic number TIMER_REF_HZ. Reviewed-by: Havard Skinnemoen <hskinnemoen@google.com> Reviewed-by: Tyrone Ting <kfting@nuvoton.com> Signed-off-by: Hao Wu <wuhaotsh@google.com> Message-id: 20210108190945.949196-3-wuhaotsh@google.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
bcda710f6c
commit
0be12dc76a
4 changed files with 24 additions and 27 deletions
|
@ -20,12 +20,6 @@
|
|||
#include "hw/clock.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
||||
/*
|
||||
* The reference clock frequency for the timer modules, and the SECCNT and
|
||||
* CNTR25M registers in this module, is always 25 MHz.
|
||||
*/
|
||||
#define NPCM7XX_TIMER_REF_HZ (25000000)
|
||||
|
||||
/*
|
||||
* Number of registers in our device state structure. Don't change this without
|
||||
* incrementing the version_id in the vmstate.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue