qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Daniel Henrique Barboza" <danielhb413@gmail.com>,
	"Harsh Prateek Bora" <harshpb@linux.ibm.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	qemu-ppc@nongnu.org, "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Eduardo Habkost" <eduardo@habkost.net>
Subject: [PATCH 2/3] hw/ppc/mac_newworld: Only create default devices when requested
Date: Mon, 26 May 2025 15:00:05 +0200	[thread overview]
Message-ID: <20250526130006.49817-3-philmd@linaro.org> (raw)
In-Reply-To: <20250526130006.49817-1-philmd@linaro.org>

Only create default devices when requested, avoid have the
machine implementation to modify the generic 'usb' boolean
set from command line.

Fixes: 59a0419856c ("hw/ppc/mac_newworld: simplify usb controller creation logic")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/ppc/mac_newworld.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 0b6e096116a..7598d42cbc2 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -346,7 +346,6 @@ static void ppc_core99_init(MachineState *machine)
                                     sysbus_mmio_get_region(s, 3));
     }
 
-    machine->usb |= defaults_enabled() && !machine->usb_disabled;
     has_pmu = (core99_machine->via_config != CORE99_VIA_CONFIG_CUDA);
     has_adb = (core99_machine->via_config == CORE99_VIA_CONFIG_CUDA ||
                core99_machine->via_config == CORE99_VIA_CONFIG_PMU_ADB);
@@ -427,7 +426,7 @@ static void ppc_core99_init(MachineState *machine)
 
         /* U3 needs to use USB for input because Linux doesn't support via-cuda
         on PPC64 */
-        if (!has_adb || machine_arch == ARCH_MAC99_U3) {
+        if ((!has_adb || machine_arch == ARCH_MAC99_U3) && defaults_enabled()) {
             USBBus *usb_bus;
 
             usb_bus = USB_BUS(object_resolve_type_unambiguous(TYPE_USB_BUS,
-- 
2.47.1



  parent reply	other threads:[~2025-05-26 13:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-26 13:00 [PATCH 0/3] hw/boards: Remove MachineState::usb_disabled field Philippe Mathieu-Daudé
2025-05-26 13:00 ` [PATCH 1/3] hw/ppc/spapr: Only create default devices when requested Philippe Mathieu-Daudé
2025-05-26 13:00 ` Philippe Mathieu-Daudé [this message]
2025-05-26 13:00 ` [PATCH 3/3] hw/boards: Remove MachineState::usb_disabled field Philippe Mathieu-Daudé
2025-05-26 13:01 ` [PATCH 0/3] " Philippe Mathieu-Daudé
2025-05-26 13:18 ` BALATON Zoltan
2025-05-26 14:20   ` Philippe Mathieu-Daudé
2025-05-27 17:19     ` Paolo Bonzini
2025-05-27 19:59       ` [PATCH 0/3] hw/boards: Remove field Mark Cave-Ayland
2025-05-27 17:19     ` [PATCH 0/3] hw/boards: Remove MachineState::usb_disabled field Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250526130006.49817-3-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=clg@redhat.com \
    --cc=danielhb413@gmail.com \
    --cc=eduardo@habkost.net \
    --cc=harshpb@linux.ibm.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=npiggin@gmail.com \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=wangyanan55@huawei.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).