diff options
author | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2012-10-01 12:34:37 +1000 |
---|---|---|
committer | Peter Crosthwaite <peter.crosthwaite@xilinx.com> | 2012-10-10 11:13:32 +1000 |
commit | b4ae3cfa57b8c1bdbbd7b7d420971e9171203ade (patch) | |
tree | 08fc675a0ce8db85b5096792f85d3bfc01daaade /hw/ssi.h | |
parent | fcb5629d3eb208d84c0fe9aa1ef64a6af7de0139 (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.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |