qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 6/8] hw/arm: Remove all invalid uses of auto_create_sdcard


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 6/8] hw/arm: Remove all invalid uses of auto_create_sdcard=true
Date: Tue, 4 Feb 2025 20:10:48 +0100
User-agent: Mozilla Thunderbird

On 4/2/25 19:44, Thomas Huth wrote:
On 04/02/2025 19.07, Philippe Mathieu-Daudé wrote:
MachineClass::auto_create_sdcard is only useful to automatically
create a SD card, attach a IF_SD block drive to it and plug the
card onto a SD bus. None of the ARM machines modified by this
commit try to use the IF_SD interface.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
...
diff --git a/hw/arm/bananapi_m2u.c b/hw/arm/bananapi_m2u.c
index 4d84d10d24c..0a4b6f29b1c 100644
--- a/hw/arm/bananapi_m2u.c
+++ b/hw/arm/bananapi_m2u.c
@@ -141,7 +141,6 @@ static void bpim2u_machine_init(MachineClass *mc)
      mc->valid_cpu_types = valid_cpu_types;
      mc->default_ram_size = 1 * GiB;
      mc->default_ram_id = "bpim2u.ram";
-    mc->auto_create_sdcard = true;
  }

The bananapi seems to use IF_SD ... could you please double-check whether this is the right change here?

Hmm I think I missed all these cases because in the last patch I
neglected to check ambiguous sd-bus with the object_resolve_path_type
call, which only matched machines with a single sd-bus 🤦🏻

diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c
index 43dc89d902e..2410e2a28e8 100644
--- a/hw/arm/exynos4_boards.c
+++ b/hw/arm/exynos4_boards.c
@@ -165,7 +165,6 @@ static void nuri_class_init(ObjectClass *oc, void *data)
      mc->min_cpus = EXYNOS4210_NCPUS;
      mc->default_cpus = EXYNOS4210_NCPUS;
      mc->ignore_memory_transaction_failures = true;
-    mc->auto_create_sdcard = true;
  }
  static const TypeInfo nuri_type = {
@@ -185,7 +184,6 @@ static void smdkc210_class_init(ObjectClass *oc, void *data)
      mc->min_cpus = EXYNOS4210_NCPUS;
      mc->default_cpus = EXYNOS4210_NCPUS;
      mc->ignore_memory_transaction_failures = true;
-    mc->auto_create_sdcard = true;
  }
  static const TypeInfo smdkc210_type = {

I think this is likely wrong, too - they use IF_SD via exynos4210.c, don't they?

diff --git a/hw/arm/imx25_pdk.c b/hw/arm/imx25_pdk.c
index e95ea5e4e18..c9c2e5dd3b1 100644
--- a/hw/arm/imx25_pdk.c
+++ b/hw/arm/imx25_pdk.c
@@ -147,7 +147,6 @@ static void imx25_pdk_machine_init(MachineClass *mc)
      mc->init = imx25_pdk_init;
      mc->ignore_memory_transaction_failures = true;
      mc->default_ram_id = "imx25.ram";
-    mc->auto_create_sdcard = true;
  }

This machine seems to use IF_SD, too?

diff --git a/hw/arm/mcimx6ul-evk.c b/hw/arm/mcimx6ul-evk.c
index 86982cb0772..690cb64ef36 100644
--- a/hw/arm/mcimx6ul-evk.c
+++ b/hw/arm/mcimx6ul-evk.c
@@ -74,6 +74,5 @@ static void mcimx6ul_evk_machine_init(MachineClass *mc)
      mc->init = mcimx6ul_evk_init;
      mc->max_cpus = FSL_IMX6UL_NUM_CPUS;
      mc->default_ram_id = "mcimx6ul-evk.ram";
-    mc->auto_create_sdcard = true;
  }
  DEFINE_MACHINE("mcimx6ul-evk", mcimx6ul_evk_machine_init)

dito?

[...]



reply via email to

[Prev in Thread] Current Thread [Next in Thread]