mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
d941fba0b5
commit
59a0419856
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue