@@ -396,10 +396,14 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
}
/* create USB OHCI controller for USB keyboard & mouse on Astro machines */
- if (!lasi_dev && machine->enable_graphics) {
+ if (!lasi_dev && machine->enable_graphics && defaults_enabled()) {
+ USBBus *usb_bus;
+
pci_create_simple(pci_bus, -1, "pci-ohci");
- usb_create_simple(usb_bus_find(-1), "usb-kbd");
- usb_create_simple(usb_bus_find(-1), "usb-mouse");
+ usb_bus = USB_BUS(object_resolve_type_unambiguous(TYPE_USB_BUS,
+ &error_abort));
+ usb_create_simple(usb_bus, "usb-kbd");
+ usb_create_simple(usb_bus, "usb-mouse");
}
/* register power switch emulation */
@@ -2,6 +2,7 @@ config HPPA_B160L
bool
imply PCI_DEVICES
imply E1000_PCI
+ imply USB_OHCI_PCI
imply VIRTIO_VGA
select ASTRO
select DINO
@@ -17,4 +18,3 @@ config HPPA_B160L
select LASIPS2
select PARALLEL
select ARTIST
- select USB_OHCI_PCI