[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 03/14] ssi: Added create_slave_no_init()
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [PATCH 03/14] ssi: Added create_slave_no_init() |
Date: |
Fri, 5 Oct 2012 10:08:48 +1000 |
From: Peter A. G. Crosthwaite <address@hidden>
Slave creation function that can be used to create an SSI slave without
qdev_init() being called. This give machine models a chance to set properties.
Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
---
hw/ssi.c | 9 +++++++--
hw/ssi.h | 1 +
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/hw/ssi.c b/hw/ssi.c
index 2e4f2fe..c47419d 100644
--- a/hw/ssi.c
+++ b/hw/ssi.c
@@ -86,10 +86,15 @@ static TypeInfo ssi_slave_info = {
.abstract = true,
};
+DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name)
+{
+ return qdev_create(&bus->qbus, name);
+}
+
DeviceState *ssi_create_slave(SSIBus *bus, const char *name)
{
- DeviceState *dev;
- dev = qdev_create(&bus->qbus, name);
+ DeviceState *dev = ssi_create_slave_no_init(bus, name);
+
qdev_init_nofail(dev);
return dev;
}
diff --git a/hw/ssi.h b/hw/ssi.h
index 65b159d..2bde9f5 100644
--- a/hw/ssi.h
+++ b/hw/ssi.h
@@ -76,6 +76,7 @@ extern const VMStateDescription vmstate_ssi_slave;
}
DeviceState *ssi_create_slave(SSIBus *bus, const char *name);
+DeviceState *ssi_create_slave_no_init(SSIBus *bus, const char *name);
/* Master interface. */
SSIBus *ssi_create_bus(DeviceState *parent, const char *name);
--
1.7.0.4
- [Qemu-devel] [PULL 0/14] Ehnahced SSI bus support + M25P80 SPI flash + Xilinx SPI controller, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 01/14] ssi: Support for multiple attached devices, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 02/14] ssi: Implemented CS behaviour, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 03/14] ssi: Added create_slave_no_init(),
Peter Crosthwaite <=
- [Qemu-devel] [PATCH 04/14] qdev: allow multiple qdev_init_gpio_in() calls, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 05/14] hw/stellaris: Removed gpio_out init array., Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 06/14] stellaris: Removed SSI mux, Peter Crosthwaite, 2012/10/04
- [Qemu-devel] [PATCH 07/14] hw: Added generic FIFO API., Peter Crosthwaite, 2012/10/04