mbox series

[PATCH-for-10.0,0/3] hw/boards: Try to make sense of MachineClass::no_sdcard flag

Message ID 20241125181420.24424-1-philmd@linaro.org
Headers show
Series hw/boards: Try to make sense of MachineClass::no_sdcard flag | expand

Message

Philippe Mathieu-Daudé Nov. 25, 2024, 6:14 p.m. UTC
Invert MachineClass 'no_sdcard' flag logic and rename it
to 'create_default_sdcard_drive' to make sense of this
default value applied to all machines. No logical change
intended.

Philippe Mathieu-Daudé (3):
  hw/boards: Convert no_sdcard flag to OnOffAuto tri-state
  hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF
  hw/boards: Rename no_sdcard -> create_default_sdcard_drive

 include/hw/boards.h                      | 2 +-
 hw/alpha/dp264.c                         | 1 +
 hw/arm/aspeed.c                          | 2 ++
 hw/arm/b-l475e-iot01a.c                  | 1 +
 hw/arm/bananapi_m2u.c                    | 1 +
 hw/arm/collie.c                          | 1 +
 hw/arm/cubieboard.c                      | 1 +
 hw/arm/digic_boards.c                    | 1 +
 hw/arm/exynos4_boards.c                  | 2 ++
 hw/arm/fby35.c                           | 1 +
 hw/arm/highbank.c                        | 2 ++
 hw/arm/imx25_pdk.c                       | 1 +
 hw/arm/integratorcp.c                    | 1 +
 hw/arm/kzm.c                             | 1 +
 hw/arm/mcimx6ul-evk.c                    | 1 +
 hw/arm/mcimx7d-sabre.c                   | 1 +
 hw/arm/microbit.c                        | 1 +
 hw/arm/mps2-tz.c                         | 1 +
 hw/arm/mps2.c                            | 1 +
 hw/arm/mps3r.c                           | 1 +
 hw/arm/msf2-som.c                        | 1 +
 hw/arm/musca.c                           | 1 +
 hw/arm/musicpal.c                        | 1 +
 hw/arm/netduino2.c                       | 1 +
 hw/arm/netduinoplus2.c                   | 1 +
 hw/arm/npcm7xx_boards.c                  | 1 +
 hw/arm/olimex-stm32-h405.c               | 1 +
 hw/arm/omap_sx1.c                        | 2 ++
 hw/arm/orangepi.c                        | 1 +
 hw/arm/raspi.c                           | 1 +
 hw/arm/realview.c                        | 4 ++++
 hw/arm/sabrelite.c                       | 1 +
 hw/arm/sbsa-ref.c                        | 1 +
 hw/arm/stellaris.c                       | 2 ++
 hw/arm/stm32vldiscovery.c                | 1 +
 hw/arm/versatilepb.c                     | 2 ++
 hw/arm/vexpress.c                        | 1 +
 hw/arm/virt.c                            | 1 +
 hw/arm/xen-pvh.c                         | 1 +
 hw/arm/xilinx_zynq.c                     | 3 ++-
 hw/arm/xlnx-versal-virt.c                | 1 +
 hw/arm/xlnx-zcu102.c                     | 1 +
 hw/avr/arduino.c                         | 1 +
 hw/core/null-machine.c                   | 2 +-
 hw/hppa/machine.c                        | 2 ++
 hw/i386/pc.c                             | 1 +
 hw/i386/x86.c                            | 1 +
 hw/i386/xen/xen-pvh.c                    | 1 +
 hw/loongarch/virt.c                      | 1 +
 hw/m68k/an5206.c                         | 1 +
 hw/m68k/mcf5208.c                        | 1 +
 hw/m68k/next-cube.c                      | 1 +
 hw/m68k/q800.c                           | 1 +
 hw/m68k/virt.c                           | 1 +
 hw/microblaze/petalogix_ml605_mmu.c      | 1 +
 hw/microblaze/petalogix_s3adsp1800_mmu.c | 1 +
 hw/microblaze/xlnx-zynqmp-pmu.c          | 1 +
 hw/mips/boston.c                         | 1 +
 hw/mips/fuloong2e.c                      | 1 +
 hw/mips/jazz.c                           | 2 ++
 hw/mips/loongson3_virt.c                 | 1 +
 hw/mips/malta.c                          | 1 +
 hw/mips/mipssim.c                        | 1 +
 hw/openrisc/openrisc_sim.c               | 1 +
 hw/openrisc/virt.c                       | 1 +
 hw/ppc/amigaone.c                        | 1 +
 hw/ppc/e500.c                            | 8 ++++++++
 hw/ppc/e500plat.c                        | 1 +
 hw/ppc/mac_newworld.c                    | 1 +
 hw/ppc/mac_oldworld.c                    | 1 +
 hw/ppc/mpc8544ds.c                       | 1 +
 hw/ppc/pegasos2.c                        | 1 +
 hw/ppc/pnv.c                             | 1 +
 hw/ppc/ppc405_boards.c                   | 1 +
 hw/ppc/ppc440_bamboo.c                   | 1 +
 hw/ppc/prep.c                            | 1 +
 hw/ppc/sam460ex.c                        | 1 +
 hw/ppc/spapr.c                           | 1 +
 hw/ppc/virtex_ml507.c                    | 1 +
 hw/remote/machine.c                      | 1 +
 hw/riscv/microchip_pfsoc.c               | 1 +
 hw/riscv/opentitan.c                     | 1 +
 hw/riscv/shakti_c.c                      | 1 +
 hw/riscv/sifive_e.c                      | 1 +
 hw/riscv/sifive_u.c                      | 1 +
 hw/riscv/spike.c                         | 1 +
 hw/riscv/virt.c                          | 1 +
 hw/rx/rx-gdbsim.c                        | 1 +
 hw/s390x/s390-virtio-ccw.c               | 2 +-
 hw/sh4/r2d.c                             | 1 +
 hw/sparc/leon3.c                         | 1 +
 hw/sparc/sun4m.c                         | 1 +
 hw/sparc64/niagara.c                     | 1 +
 hw/sparc64/sun4u.c                       | 2 ++
 hw/tricore/triboard.c                    | 1 +
 hw/tricore/tricore_testboard.c           | 1 +
 hw/xen/xen-pvh-common.c                  | 1 +
 hw/xenpv/xen_machine_pv.c                | 1 +
 hw/xtensa/sim.c                          | 1 +
 hw/xtensa/virt.c                         | 1 +
 hw/xtensa/xtfpga.c                       | 8 ++++++++
 system/vl.c                              | 2 +-
 102 files changed, 129 insertions(+), 5 deletions(-)

Comments

Philippe Mathieu-Daudé Nov. 26, 2024, 5:24 a.m. UTC | #1
On 25/11/24 19:14, Philippe Mathieu-Daudé wrote:
> Invert MachineClass 'no_sdcard' flag logic and rename it
> to 'create_default_sdcard_drive' to make sense of this
> default value applied to all machines. No logical change
> intended.
> 
> Philippe Mathieu-Daudé (3):
>    hw/boards: Convert no_sdcard flag to OnOffAuto tri-state
>    hw/boards: Explicit no_sdcard=false as ON_OFF_AUTO_OFF
>    hw/boards: Rename no_sdcard -> create_default_sdcard_drive

I expect next steps to be:

  - Remove nonsense create_default_sdcard_drive (where
    machines don't have SDHCI devices)
  - When drive uses IF_SD, assert machine expose a SDBus
  - Explicitly create default drives for SDCards in
    each machine_init?
  - Remove MachineClass::create_default_sdcard_drive field
    and code handling default in system/vl.c