summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPeter Maydell2021-08-12 11:33:37 +0200
committerPeter Maydell2021-09-01 12:08:19 +0200
commitd5093d961585f02126191951ded9b90dbc52883b (patch)
tree86827f69a4692087434468375beb980222281101 /include
parenthw/timer/armv7m_systick: Add input clocks (diff)
downloadqemu-d5093d961585f02126191951ded9b90dbc52883b.tar.gz
qemu-d5093d961585f02126191951ded9b90dbc52883b.tar.xz
qemu-d5093d961585f02126191951ded9b90dbc52883b.zip
hw/arm/armv7m: Create input clocks
Create input clocks on the armv7m container object which pass through to the systick timers, so that users of the armv7m object can specify the clocks being used. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Luc Michel <luc@lmichel.fr> Message-id: 20210812093356.1946-7-peter.maydell@linaro.org
Diffstat (limited to 'include')
-rw-r--r--include/hw/arm/armv7m.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/hw/arm/armv7m.h b/include/hw/arm/armv7m.h
index fe8b248a6c..b7ba0ff409 100644
--- a/include/hw/arm/armv7m.h
+++ b/include/hw/arm/armv7m.h
@@ -15,6 +15,7 @@
#include "hw/misc/armv7m_ras.h"
#include "target/arm/idau.h"
#include "qom/object.h"
+#include "hw/clock.h"
#define TYPE_BITBAND "ARM-bitband-memory"
OBJECT_DECLARE_SIMPLE_TYPE(BitBandState, BITBAND)
@@ -51,6 +52,8 @@ OBJECT_DECLARE_SIMPLE_TYPE(ARMv7MState, ARMV7M)
* + Property "vfp": enable VFP (forwarded to CPU object)
* + Property "dsp": enable DSP (forwarded to CPU object)
* + Property "enable-bitband": expose bitbanded IO
+ * + Clock input "refclk" is the external reference clock for the systick timers
+ * + Clock input "cpuclk" is the main CPU clock
*/
struct ARMv7MState {
/*< private >*/
@@ -82,6 +85,9 @@ struct ARMv7MState {
/* MR providing default PPB behaviour */
MemoryRegion defaultmem;
+ Clock *refclk;
+ Clock *cpuclk;
+
/* Properties */
char *cpu_type;
/* MemoryRegion the board provides to us (with its devices, RAM, etc) */