mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
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:
parent
fcb5629d3e
commit
b4ae3cfa57
4 changed files with 44 additions and 3 deletions
4
hw/ssi.h
4
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue