]>
Commit | Line | Data |
---|---|---|
06677ce1 PB |
1 | hw_usb_modules = {} |
2 | ||
3 | # usb subsystem core | |
4 | softmmu_ss.add(files( | |
5 | 'bus.c', | |
6 | 'combined-packet.c', | |
7 | 'core.c', | |
8 | 'libhw.c' | |
9 | )) | |
10 | ||
11 | softmmu_ss.add(when: 'CONFIG_USB', if_true: files( | |
12 | 'desc.c', | |
13 | 'desc-msos.c', | |
14 | )) | |
15 | ||
16 | # usb host adapters | |
17 | softmmu_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c')) | |
18 | softmmu_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c')) | |
19 | softmmu_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c')) | |
20 | softmmu_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c')) | |
21 | softmmu_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c')) | |
22 | softmmu_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci.c', 'hcd-ehci-sysbus.c')) | |
23 | softmmu_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c')) | |
755fba11 | 24 | softmmu_ss.add(when: 'CONFIG_USB_XHCI_PCI', if_true: files('hcd-xhci-pci.c')) |
f00ff136 | 25 | softmmu_ss.add(when: 'CONFIG_USB_XHCI_SYSBUS', if_true: files('hcd-xhci-sysbus.c')) |
06677ce1 PB |
26 | softmmu_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c')) |
27 | softmmu_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c')) | |
28 | softmmu_ss.add(when: 'CONFIG_USB_DWC2', if_true: files('hcd-dwc2.c')) | |
29 | ||
30 | softmmu_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c')) | |
31 | softmmu_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c')) | |
32 | softmmu_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c')) | |
33 | ||
34 | # emulated usb devices | |
35 | softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hub.c')) | |
36 | softmmu_ss.add(when: 'CONFIG_USB', if_true: files('dev-hid.c')) | |
37 | softmmu_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c')) | |
38 | softmmu_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage.c')) | |
39 | softmmu_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c')) | |
40 | softmmu_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c')) | |
41 | softmmu_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c')) | |
42 | softmmu_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c')) | |
43 | softmmu_ss.add(when: ['CONFIG_POSIX', 'CONFIG_USB_STORAGE_MTP'], if_true: files('dev-mtp.c')) | |
44 | ||
45 | # smartcard | |
46 | softmmu_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader.c')) | |
47 | ||
48 | if config_host.has_key('CONFIG_SMARTCARD') | |
49 | usbsmartcard_ss = ss.source_set() | |
50 | usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD', | |
51 | if_true: [cacard, files('ccid-card-emulated.c', 'ccid-card-passthru.c')]) | |
52 | hw_usb_modules += {'smartcard': usbsmartcard_ss} | |
53 | endif | |
54 | ||
0a40bcb7 CB |
55 | # U2F |
56 | softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c')) | |
d7c1523f | 57 | softmmu_ss.add(when: ['CONFIG_LINUX', 'CONFIG_USB_U2F'], if_true: [libudev, files('u2f-passthru.c')]) |
0a40bcb7 CB |
58 | if u2f.found() |
59 | softmmu_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulated.c')]) | |
60 | endif | |
61 | ||
06677ce1 PB |
62 | # usb redirect |
63 | if config_host.has_key('CONFIG_USB_REDIR') | |
64 | usbredir_ss = ss.source_set() | |
65 | usbredir_ss.add(when: 'CONFIG_USB', | |
66 | if_true: [usbredir, files('redirect.c', 'quirks.c')]) | |
67 | hw_usb_modules += {'redirect': usbredir_ss} | |
68 | endif | |
69 | ||
70 | # usb pass-through | |
71 | softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_USB_LIBUSB', libusb], | |
72 | if_true: files('host-libusb.c'), | |
73 | if_false: files('host-stub.c')) | |
74 | softmmu_ss.add(when: 'CONFIG_ALL', if_true: files('host-stub.c')) | |
75 | ||
76 | softmmu_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN', libusb], if_true: files('xen-usb.c')) | |
77 | ||
78 | modules += { 'hw-usb': hw_usb_modules } |