diff options
author | Fam Zheng <famz@redhat.com> | 2017-09-07 13:54:51 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-09-07 13:54:51 +0100 |
commit | e2ff1215b0b150929ff45ff9b14186110629d8bf (patch) | |
tree | 0aa210114c3343ebf8826d5f5c1846e13190758f /hw/arm | |
parent | 5f486f9713aae854e4bc0a0ce8c5a11a9f6f15c1 (diff) | |
download | qemu-e2ff1215b0b150929ff45ff9b14186110629d8bf.zip qemu-e2ff1215b0b150929ff45ff9b14186110629d8bf.tar.gz qemu-e2ff1215b0b150929ff45ff9b14186110629d8bf.tar.bz2 |
armv7m: Convert armv7m.memory to DEFINE_PROP_LINK
Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170905131149.10669-3-famz@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/armv7m.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 4c560dd..b64a409 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -132,12 +132,6 @@ static void armv7m_instance_init(Object *obj) /* Can't init the cpu here, we don't yet know which model to use */ - object_property_add_link(obj, "memory", - TYPE_MEMORY_REGION, - (Object **)&s->board_memory, - qdev_prop_allow_set_link_before_realize, - OBJ_PROP_LINK_UNREF_ON_RELEASE, - &error_abort); memory_region_init(&s->container, obj, "armv7m-container", UINT64_MAX); object_initialize(&s->nvic, sizeof(s->nvic), TYPE_NVIC); @@ -248,6 +242,8 @@ static void armv7m_realize(DeviceState *dev, Error **errp) static Property armv7m_properties[] = { DEFINE_PROP_STRING("cpu-model", ARMv7MState, cpu_model), + DEFINE_PROP_LINK("memory", ARMv7MState, board_memory, TYPE_MEMORY_REGION, + MemoryRegion *), DEFINE_PROP_END_OF_LIST(), }; |