mirror of https://gitee.com/openkylin/qemu.git
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
This commit is contained in:
parent
5dd85b4b48
commit
3d53904a68
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue