diff options
author | Cédric Le Goater <clg@kaod.org> | 2023-06-07 06:39:38 +0200 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2023-09-01 11:40:04 +0200 |
commit | a617e65f43788e08dd390aa41798b0e57b936c6d (patch) | |
tree | 4f1e6dd5c664fb182ea54162b66c2f0f75290fc5 /hw/arm/xlnx-versal-virt.c | |
parent | 27a2c66c92ec1f7a1e6456c8b274ae538d68ae7f (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index 1ee2b8697f..88c561ff63 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); |