summaryrefslogtreecommitdiffstats
path: root/hw/ppc/mac_newworld.c
diff options
context:
space:
mode:
authorMarcel Apfelbaum2015-01-06 14:29:17 +0100
committerPeter Maydell2015-01-08 18:32:27 +0100
commit59a0419856c9ed24e9ecd033db092b2e8f81a728 (patch)
tree9f475ed1d995001f5aa40711e178b44d32e72a9f /hw/ppc/mac_newworld.c
parenthw/ppc/spapr: simplify usb controller creation logic (diff)
downloadqemu-59a0419856c9ed24e9ecd033db092b2e8f81a728.tar.gz
qemu-59a0419856c9ed24e9ecd033db092b2e8f81a728.tar.xz
qemu-59a0419856c9ed24e9ecd033db092b2e8f81a728.zip
hw/ppc/mac_newworld: simplify usb controller creation logic
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Alexander Graf <agraf@suse.de> Message-id: 1420550957-22337-7-git-send-email-marcel@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ppc/mac_newworld.c')
-rw-r--r--hw/ppc/mac_newworld.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index b54f94ad53..c3770121e2 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -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 */