diff options
author | Marcel Apfelbaum <marcel@redhat.com> | 2015-01-06 15:29:17 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2015-01-07 16:16:29 +0100 |
commit | 75c74ccbe1d4175edb79c6f810c2207dcf5edb22 (patch) | |
tree | 52776efc5a23f7251c198ae1b4d16b953046d901 /hw | |
parent | 4ee9ced979e68522ee38ea759e7630ac70f15fa8 (diff) | |
download | qemu-75c74ccbe1d4175edb79c6f810c2207dcf5edb22.zip qemu-75c74ccbe1d4175edb79c6f810c2207dcf5edb22.tar.gz qemu-75c74ccbe1d4175edb79c6f810c2207dcf5edb22.tar.bz2 |
hw/ppc/mac_newworld: simplify usb controller creation logic
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/ppc/mac_newworld.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c index b54f94a..c377012 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 */ |