Skip to content

Commit

Permalink
hw/ppc/mac_newworld: simplify usb controller creation logic
Browse files Browse the repository at this point in the history
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: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
  • Loading branch information
marcel-apf authored and pm215 committed Jan 8, 2015
1 parent d941fba commit 59a0419
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/ppc/mac_newworld.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */
Expand Down

0 comments on commit 59a0419

Please sign in to comment.