summary refs log tree commit diff stats
path: root/hw/misc/auxbus.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:32:21 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:05:28 +0200
commitb7a1b5483ee0179f0e5d31cf43678fa225227614 (patch)
tree85d76ecd34fda42f1f2f8871c30afbcac4c40945 /hw/misc/auxbus.c
parentdbe4070e59ab86f4a25de9cd12ed56f9eb68049b (diff)
downloadfocaccia-qemu-b7a1b5483ee0179f0e5d31cf43678fa225227614.tar.gz
focaccia-qemu-b7a1b5483ee0179f0e5d31cf43678fa225227614.zip
auxbus: New aux_bus_realize(), pairing with aux_bus_init()
aux_bus_init() encapsulates the creation of an aux-bus and its
aux-to-i2c-bridge device.

Create aux_bus_realize() to similarly encapsulate their realization.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20200610053247.1583243-33-armbru@redhat.com>
Diffstat (limited to 'hw/misc/auxbus.c')
-rw-r--r--hw/misc/auxbus.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/misc/auxbus.c b/hw/misc/auxbus.c
index e93a35dd0a..75b6de1c63 100644
--- a/hw/misc/auxbus.c
+++ b/hw/misc/auxbus.c
@@ -81,6 +81,11 @@ AUXBus *aux_bus_init(DeviceState *parent, const char *name)
     return bus;
 }
 
+void aux_bus_realize(AUXBus *bus)
+{
+    qdev_init_nofail(DEVICE(bus->bridge));
+}
+
 void aux_map_slave(AUXSlave *aux_dev, hwaddr addr)
 {
     DeviceState *dev = DEVICE(aux_dev);