diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-07-17 13:36:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-07-17 13:36:08 +0100 |
commit | 3d53904a68ff0532a056e799d7bea6c625ade9ce (patch) | |
tree | edfb0115069a7652ced07ca273a2ae8256213d4a /hw | |
parent | 5dd85b4b48653993335ca20d6e4d7b80129cca97 (diff) | |
download | qemu-3d53904a68ff0532a056e799d7bea6c625ade9ce.zip |
hw/arm/mps2: Add timers
Add the CMSDK APB timers to the MPS2 board.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1500029487-14822-6-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw')
-rw-r--r-- | hw/arm/mps2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 9c8fa7729c..412181614b 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -33,6 +33,7 @@ #include "sysemu/sysemu.h" #include "hw/misc/unimp.h" #include "hw/char/cmsdk-apb-uart.h" +#include "hw/timer/cmsdk-apb-timer.h" typedef enum MPS2FPGAType { FPGA_AN385, @@ -293,6 +294,9 @@ static void mps2_common_init(MachineState *machine) g_assert_not_reached(); } + cmsdk_apb_timer_create(0x40000000, qdev_get_gpio_in(armv7m, 8), SYSCLK_FRQ); + cmsdk_apb_timer_create(0x40001000, qdev_get_gpio_in(armv7m, 9), SYSCLK_FRQ); + system_clock_scale = NANOSECONDS_PER_SECOND / SYSCLK_FRQ; armv7m_load_kernel(ARM_CPU(first_cpu), machine->kernel_filename, |