aboutsummaryrefslogtreecommitdiff
path: root/hw/arm/xlnx-versal-virt.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2023-06-07 06:39:38 +0200
committerCédric Le Goater <clg@kaod.org>2023-09-01 11:40:04 +0200
commita617e65f43788e08dd390aa41798b0e57b936c6d (patch)
tree4f1e6dd5c664fb182ea54162b66c2f0f75290fc5 /hw/arm/xlnx-versal-virt.c
parent27a2c66c92ec1f7a1e6456c8b274ae538d68ae7f (diff)
downloadqemu-a617e65f43788e08dd390aa41798b0e57b936c6d.zip
qemu-a617e65f43788e08dd390aa41798b0e57b936c6d.tar.gz
qemu-a617e65f43788e08dd390aa41798b0e57b936c6d.tar.bz2
hw/ssi: Check for duplicate CS indexes
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" <edgar.iglesias@gmail.com> Cc: Alistair Francis <alistair@alistair23.me> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw/arm/xlnx-versal-virt.c')
-rw-r--r--hw/arm/xlnx-versal-virt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c
index 1ee2b86..88c561f 100644
--- a/hw/arm/xlnx-versal-virt.c
+++ b/hw/arm/xlnx-versal-virt.c
@@ -740,6 +740,7 @@ static void versal_virt_init(MachineState *machine)
qdev_prop_set_drive_err(flash_dev, "drive",
blk_by_legacy_dinfo(dinfo), &error_fatal);
}
+ qdev_prop_set_uint8(flash_dev, "cs", i);
qdev_realize_and_unref(flash_dev, spi_bus, &error_fatal);
cs_line = qdev_get_gpio_in_named(flash_dev, SSI_GPIO_CS, 0);