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>
This commit is contained in:
Peter Crosthwaite 2012-10-01 12:34:37 +10:00
parent fcb5629d3e
commit b4ae3cfa57
4 changed files with 44 additions and 3 deletions

View file

@ -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);