mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
hw/hppa: do not require CONFIG_USB
With --without-default-devices it is possible to build a binary that does not include any USB host controller and therefore that does not include the code guarded by CONFIG_USB. While the simpler creation functions such as usb_create_simple can be inlined, this is not true of usb_bus_find(). Remove it, replacing it with a search of the single USB bus on the machine. Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240223124406.234509-6-pbonzini@redhat.com> [PMD: Fixed style] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
b98948a902
commit
82523f4add
@ -2,6 +2,7 @@ config HPPA_B160L
|
|||||||
bool
|
bool
|
||||||
imply PCI_DEVICES
|
imply PCI_DEVICES
|
||||||
imply E1000_PCI
|
imply E1000_PCI
|
||||||
|
imply USB_OHCI_PCI
|
||||||
imply VIRTIO_VGA
|
imply VIRTIO_VGA
|
||||||
select ASTRO
|
select ASTRO
|
||||||
select DINO
|
select DINO
|
||||||
@ -17,4 +18,3 @@ config HPPA_B160L
|
|||||||
select LASIPS2
|
select LASIPS2
|
||||||
select PARALLEL
|
select PARALLEL
|
||||||
select ARTIST
|
select ARTIST
|
||||||
select USB_OHCI_PCI
|
|
||||||
|
@ -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 */
|
/* 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");
|
pci_create_simple(pci_bus, -1, "pci-ohci");
|
||||||
usb_create_simple(usb_bus_find(-1), "usb-kbd");
|
usb_bus = USB_BUS(object_resolve_type_unambiguous(TYPE_USB_BUS,
|
||||||
usb_create_simple(usb_bus_find(-1), "usb-mouse");
|
&error_abort));
|
||||||
|
usb_create_simple(usb_bus, "usb-kbd");
|
||||||
|
usb_create_simple(usb_bus, "usb-mouse");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* register power switch emulation */
|
/* register power switch emulation */
|
||||||
|
Reference in New Issue
Block a user