qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] aspeed: Add blockdev support for flash device definition
@ 2023-08-31 12:39 Cédric Le Goater
  2023-08-31 12:39 ` [PATCH v3 1/7] hw/ssi: Add a "cs" property to SSIPeripheral Cédric Le Goater
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Cédric Le Goater @ 2023-08-31 12:39 UTC (permalink / raw)
  To: qemu-arm
  Cc: qemu-devel, Peter Maydell, Joel Stanley, Andrew Jeffery,
	Philippe Mathieu-Daudé, Cédric Le Goater

Hello,

This is a respin of series [1] without the patches merged in 8.1.
Since I renamed a property as suggested, I though people might want to
see the result before the next aspeed PR.

It offers the capability to define all CS of all SPI controllers
without introducing new machine types, using blockdev on the command
line :

    -blockdev node-name=fmc0,driver=file,filename=./flash-ast2600-evb \
    -device mx66u51235f,bus=ssi.0,cs=0x0,drive=fmc0 \
    -blockdev node-name=fmc1,driver=file,filename=./flash-ast2600-evb-alt \
    -device mx66u51235f,bus=ssi.0,cs=0x1,drive=fmc1 \
    -blockdev node-name=spi1,driver=file,filename=./ast2600-evb.pnor \
    -device mx66u51235f,cs=0x0,bus=ssi.1,drive=spi1 \

With these changes, it is now possible :

 - to define block backends out of order instead relying on the command
   line order when using drives.
   
 - to define *all* devices backends. Some machines support up to 8.
 
 - to use different flash models without adding new boards. Machine
   options "spi-model" and "fmc-model" could be deprecated.
   
 - to start the machine with -nodefaults to let it fetch instructions
   from the FMC0 device, as HW does. Machine option "execute-in-place"
   could be deprecated.

Ultimately, we will get rid of drive_get(IF_MTD, ...) but we are not
there yet.

Thanks,

C.

[1] https://lore.kernel.org/qemu-devel/20230607043943.1837186-1-clg@kaod.org/

Changes in v3:

  - renamed "addr" property to "cs"

Changes in v2:

  - changed "addr" property to a uint8_t
  - renamed "uart" machine option to "bmc-console" 

Cédric Le Goater (7):
  hw/ssi: Add a "cs" property to SSIPeripheral
  hw/ssi: Introduce a ssi_get_cs() helper
  aspeed/smc: Wire CS lines at reset
  hw/ssi: Check for duplicate CS indexes
  aspeed: Create flash devices only when defaults are enabled
  m25p80: Introduce an helper to retrieve the BlockBackend of a device
  aspeed: Get the BlockBackend of FMC0 from the flash device

 include/hw/block/flash.h            |  4 +++
 include/hw/ssi/ssi.h                |  5 ++++
 hw/arm/aspeed.c                     | 19 +++++++------
 hw/arm/stellaris.c                  |  4 ++-
 hw/arm/xilinx_zynq.c                |  1 +
 hw/arm/xlnx-versal-virt.c           |  1 +
 hw/arm/xlnx-zcu102.c                |  2 ++
 hw/block/m25p80.c                   |  6 ++++
 hw/microblaze/petalogix_ml605_mmu.c |  1 +
 hw/ssi/aspeed_smc.c                 |  8 ++++++
 hw/ssi/ssi.c                        | 43 +++++++++++++++++++++++++++++
 11 files changed, 84 insertions(+), 10 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-09-01  8:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 12:39 [PATCH v3 0/7] aspeed: Add blockdev support for flash device definition Cédric Le Goater
2023-08-31 12:39 ` [PATCH v3 1/7] hw/ssi: Add a "cs" property to SSIPeripheral Cédric Le Goater
2023-08-31 12:39 ` [PATCH v3 2/7] hw/ssi: Introduce a ssi_get_cs() helper Cédric Le Goater
2023-08-31 12:39 ` [PATCH v3 3/7] aspeed/smc: Wire CS lines at reset Cédric Le Goater
2023-08-31 12:39 ` [PATCH v3 4/7] hw/ssi: Check for duplicate CS indexes Cédric Le Goater
2023-08-31 12:39 ` [PATCH v3 5/7] aspeed: Create flash devices only when defaults are enabled Cédric Le Goater
2023-08-31 13:00   ` Joel Stanley
2023-08-31 13:22     ` Cédric Le Goater
2023-08-31 13:42       ` Joel Stanley
2023-08-31 16:55         ` Cédric Le Goater
2023-08-31 21:13   ` [PATCH v3.2 " Cédric Le Goater
2023-09-01  8:44     ` Joel Stanley
2023-08-31 12:39 ` [PATCH v3 6/7] m25p80: Introduce an helper to retrieve the BlockBackend of a device Cédric Le Goater
2023-08-31 12:39 ` [PATCH v3 7/7] aspeed: Get the BlockBackend of FMC0 from the flash device Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).