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