On 5/23/19 12:05 PM, Wim Vervoorn wrote: > Hello Cédric, > > I have another question regarding the ASPEED Qemu support. This is regarding > the SPI support. > > I noticed that in general the fmc_model and the spi_model for the flash device > are different even though there is only one flash device connected.
The flash devices are created but not attached to a file backend unless you define it on the command line with -drive options : -drive file=$flashfile,format=raw,if=mtd The first mtd drive corresponds to the flash chip attached to the FMC controller (BMC Firmware), the second is the flash attached to the SPI1 controller (Host Firmware) > I would expect that in this case the models used would be identical. The flash device models are defined at the machine level in hw/arm/aspeed.c: }, { .name = MACHINE_TYPE_NAME("witherspoon-bmc"), .desc = "OpenPOWER Witherspoon BMC (ARM1176)", .soc_name = "ast2500-a1", .hw_strap1 = WITHERSPOON_BMC_HW_STRAP1, .fmc_model = "mx25l25635e", .spi_model = "mx66l1g45g", .num_cs = 2, .i2c_init = witherspoon_bmc_i2c_init, .ram = 512 * MiB, }, > Can you explain how this is works and how I select the correct model > for the fmc and for the spi controller. You need to define a new machine (board) if you want different flash models. C.