]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
hw/arm/aspeed: Add second SPI chip to Aspeed model
authorEd Tanous <etanous@nvidia.com>
Thu, 3 Jul 2025 14:42:46 +0000 (07:42 -0700)
committerCédric Le Goater <clg@redhat.com>
Thu, 3 Jul 2025 15:36:45 +0000 (17:36 +0200)
Aspeed2600 has two spi lanes;  Add a new struct that can mount the
second SPI.

Signed-off-by: Ed Tanous <etanous@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250703144249.3348879-2-etanous@nvidia.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
hw/arm/aspeed.c
include/hw/arm/aspeed.h

index 94897505f8e31ace1f58a5d3b9fa791adbb4abe7..8d7757e11f1cb9eedf7a6679c9daf47f6487edae 100644 (file)
@@ -465,6 +465,8 @@ static void aspeed_machine_init(MachineState *machine)
         aspeed_board_init_flashes(&bmc->soc->spi[0],
                               bmc->spi_model ? bmc->spi_model : amc->spi_model,
                               1, amc->num_cs);
+        aspeed_board_init_flashes(&bmc->soc->spi[1],
+                                  amc->spi2_model, 1, amc->num_cs2);
     }
 
     if (machine->kernel_filename && sc->num_cpus > 1) {
index 973277bea65572655f07fe11a2bbafe03e1eebe2..6c364556565a48048bc3beda75ec3b0232980af5 100644 (file)
@@ -35,7 +35,9 @@ struct AspeedMachineClass {
     uint32_t hw_strap2;
     const char *fmc_model;
     const char *spi_model;
+    const char *spi2_model;
     uint32_t num_cs;
+    uint32_t num_cs2;
     uint32_t macs_mask;
     void (*i2c_init)(AspeedMachineState *bmc);
     uint32_t uart_default;