From a617e65f43788e08dd390aa41798b0e57b936c6d Mon Sep 17 00:00:00 2001 From: Cédric Le Goater Date: Wed, 7 Jun 2023 06:39:38 +0200 Subject: hw/ssi: Check for duplicate CS indexes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This to avoid indexes conflicts on the same SSI bus. Adapt machines using multiple devices on the same bus to avoid breakage. Cc: "Edgar E. Iglesias" Cc: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Joel Stanley Signed-off-by: Cédric Le Goater --- hw/arm/stellaris.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/arm/stellaris.c') diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index f7e99baf62..5a3106e009 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -1242,7 +1242,9 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) qdev_get_child_bus(sddev, "sd-bus"), &error_fatal); - ssddev = ssi_create_peripheral(bus, "ssd0323"); + ssddev = qdev_new("ssd0323"); + qdev_prop_set_uint8(ssddev, "cs", 1); + qdev_realize_and_unref(ssddev, bus, &error_fatal); gpio_d_splitter = qdev_new(TYPE_SPLIT_IRQ); qdev_prop_set_uint32(gpio_d_splitter, "num-lines", 2); -- cgit 1.4.1