aboutsummaryrefslogtreecommitdiff
path: root/hw/ssi.h
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2012-10-01 12:34:37 +1000
committerPeter Crosthwaite <peter.crosthwaite@xilinx.com>2012-10-10 11:13:32 +1000
commitb4ae3cfa57b8c1bdbbd7b7d420971e9171203ade (patch)
tree08fc675a0ce8db85b5096792f85d3bfc01daaade /hw/ssi.h
parentfcb5629d3eb208d84c0fe9aa1ef64a6af7de0139 (diff)
ssi: Add slave autoconnect helper
Added helper function to automatically connect SPI slaves based on the QOM child nodes of a device. A SSI master device can call this routine to automatically hook-up all child nodes to its SPI bus. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ssi.h')
-rw-r--r--hw/ssi.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ssi.h b/hw/ssi.h
index 2bde9f5b44..a05d60beb4 100644
--- a/hw/ssi.h
+++ b/hw/ssi.h
@@ -83,6 +83,10 @@ SSIBus *ssi_create_bus(DeviceState *parent, const char *name);
uint32_t ssi_transfer(SSIBus *bus, uint32_t val);
+/* Automatically connect all children nodes a spi controller as slaves */
+void ssi_auto_connect_slaves(DeviceState *parent, qemu_irq *cs_lines,
+ SSIBus *bus);
+
/* max111x.c */
void max111x_set_input(DeviceState *dev, int line, uint8_t value);