]> Git Repo - qemu.git/commitdiff
hw/ppc/mac_newworld: simplify usb controller creation logic
authorMarcel Apfelbaum <[email protected]>
Tue, 6 Jan 2015 13:29:17 +0000 (15:29 +0200)
committerPeter Maydell <[email protected]>
Thu, 8 Jan 2015 17:32:27 +0000 (17:32 +0000)
Signed-off-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Alexander Graf <[email protected]>
Message-id: 1420550957[email protected]
Signed-off-by: Peter Maydell <[email protected]>
hw/ppc/mac_newworld.c

index b54f94ad532a31720d5f20b90dda9f925643d54b..c3770121e2abbe92e3af0e5758f4864f39bed017 100644 (file)
@@ -371,6 +371,7 @@ static void ppc_core99_init(MachineState *machine)
         /* 970 gets a U3 bus */
         pci_bus = pci_pmac_u3_init(pic, get_system_memory(), get_system_io());
         machine_arch = ARCH_MAC99_U3;
+        machine->usb |= defaults_enabled();
     } else {
         pci_bus = pci_pmac_init(pic, get_system_memory(), get_system_io());
         machine_arch = ARCH_MAC99;
@@ -417,8 +418,7 @@ static void ppc_core99_init(MachineState *machine)
     dev = qdev_create(adb_bus, TYPE_ADB_MOUSE);
     qdev_init_nofail(dev);
 
-    if ((machine_arch == ARCH_MAC99_U3 && defaults_enabled()) ||
-        usb_enabled()) {
+    if (machine->usb) {
         pci_create_simple(pci_bus, -1, "pci-ohci");
         /* U3 needs to use USB for input because Linux doesn't support via-cuda
         on PPC64 */
This page took 0.026269 seconds and 4 git commands to generate.