target/arm: Update find_last_active for PREDDESC
[qemu/ar7.git] / hw / usb / meson.build
blob653192cff6faaa49fa2f69ca8096007923f08d8b
1 hw_usb_modules = {}
3 # usb subsystem core
4 softmmu_ss.add(files(
5   'bus.c',
6   'combined-packet.c',
7   'core.c',
8   'pcap.c',
9   'libhw.c'
12 softmmu_ss.add(when: 'CONFIG_USB', if_true: files(
13   'desc.c',
14   'desc-msos.c',
17 # usb host adapters
18 softmmu_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c'))
19 softmmu_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c'))
20 softmmu_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c'))
21 softmmu_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c'))
22 softmmu_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c'))
23 softmmu_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci.c', 'hcd-ehci-sysbus.c'))
24 softmmu_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c'))
25 softmmu_ss.add(when: 'CONFIG_USB_XHCI_PCI', if_true: files('hcd-xhci-pci.c'))
26 softmmu_ss.add(when: 'CONFIG_USB_XHCI_SYSBUS', if_true: files('hcd-xhci-sysbus.c'))
27 softmmu_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c'))
28 softmmu_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c'))
29 softmmu_ss.add(when: 'CONFIG_USB_DWC2', if_true: files('hcd-dwc2.c'))
30 softmmu_ss.add(when: 'CONFIG_USB_DWC3', if_true: files('hcd-dwc3.c'))
32 softmmu_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c'))
33 softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c'))
34 softmmu_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c'))
35 specific_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl-regs.c'))
36 specific_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c'))
38 # emulated usb devices
39 softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c'))
40 softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c'))
41 softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c'))
42 softmmu_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage.c'))
43 softmmu_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c'))
44 softmmu_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c'))
45 softmmu_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c'))
46 softmmu_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c'))
47 softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE_MTP'], if_true: files('dev-mtp.c'))
49 # smartcard
50 softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader.c'))
52 if config_host.has_key('CONFIG_SMARTCARD')
53   usbsmartcard_ss = ss.source_set()
54   usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD',
55                       if_true: [cacard, files('ccid-card-emulated.c', 'ccid-card-passthru.c')])
56   hw_usb_modules += {'smartcard': usbsmartcard_ss}
57 endif
59 # U2F
60 softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c'))
61 softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: [libudev, files('u2f-passthru.c')])
62 if u2f.found()
63   softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulated.c')])
64 endif
66 # usb redirect
67 if config_host.has_key('CONFIG_USB_REDIR')
68   usbredir_ss = ss.source_set()
69   usbredir_ss.add(when: 'CONFIG_USB',
70                   if_true: [usbredir, files('redirect.c', 'quirks.c')])
71   hw_usb_modules += {'redirect': usbredir_ss}
72 endif
74 # usb pass-through
75 softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_USB_LIBUSB', libusb],
76                if_true: files('host-libusb.c'),
77                if_false: files('host-stub.c'))
78 softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('host-stub.c'))
80 softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true: files('xen-usb.c'))
82 modules += { 'hw-usb': hw_usb_modules }