aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/arm/armsse.c13
-rw-r--r--include/hw/arm/armsse.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
index b316fe6957..4cfb2602b1 100644
--- a/hw/arm/armsse.c
+++ b/hw/arm/armsse.c
@@ -575,6 +575,11 @@ static void armsse_init(Object *obj)
assert(devinfo->index == 0);
object_initialize_child(obj, devinfo->name, &s->dualtimer,
TYPE_CMSDK_APB_DUALTIMER);
+ } else if (!strcmp(devinfo->type, TYPE_SSE_TIMER)) {
+ assert(devinfo->index < ARRAY_SIZE(s->sse_timer));
+ object_initialize_child(obj, devinfo->name,
+ &s->sse_timer[devinfo->index],
+ TYPE_SSE_TIMER);
} else if (!strcmp(devinfo->type, TYPE_CMSDK_APB_WATCHDOG)) {
assert(devinfo->index < ARRAY_SIZE(s->cmsdk_watchdog));
object_initialize_child(obj, devinfo->name,
@@ -1031,6 +1036,14 @@ static void armsse_realize(DeviceState *dev, Error **errp)
return;
}
mr = sysbus_mmio_get_region(sbd, 0);
+ } else if (!strcmp(devinfo->type, TYPE_SSE_TIMER)) {
+ sbd = SYS_BUS_DEVICE(&s->sse_timer[devinfo->index]);
+
+ qdev_connect_clock_in(DEVICE(sbd), "CLK", s->mainclk);
+ if (!sysbus_realize(sbd, errp)) {
+ return;
+ }
+ mr = sysbus_mmio_get_region(sbd, 0);
} else if (!strcmp(devinfo->type, TYPE_CMSDK_APB_WATCHDOG)) {
sbd = SYS_BUS_DEVICE(&s->cmsdk_watchdog[devinfo->index]);
diff --git a/include/hw/arm/armsse.h b/include/hw/arm/armsse.h
index 104ba8d26e..533ce329f6 100644
--- a/include/hw/arm/armsse.h
+++ b/include/hw/arm/armsse.h
@@ -97,6 +97,7 @@
#include "hw/misc/tz-mpc.h"
#include "hw/timer/cmsdk-apb-timer.h"
#include "hw/timer/cmsdk-apb-dualtimer.h"
+#include "hw/timer/sse-timer.h"
#include "hw/watchdog/cmsdk-apb-watchdog.h"
#include "hw/misc/iotkit-sysctl.h"
#include "hw/misc/iotkit-sysinfo.h"
@@ -164,6 +165,8 @@ struct ARMSSE {
CMSDKAPBWatchdog cmsdk_watchdog[3];
+ SSETimer sse_timer[4];
+
IoTKitSysCtl sysctl;
IoTKitSysCtl sysinfo;