2020-08-06 14:07:39 +03:00
|
|
|
hw_usb_modules = {}
|
|
|
|
|
|
|
|
# usb subsystem core
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB', if_true: files(
|
2020-08-06 14:07:39 +03:00
|
|
|
'bus.c',
|
|
|
|
'combined-packet.c',
|
|
|
|
'core.c',
|
|
|
|
'desc.c',
|
|
|
|
'desc-msos.c',
|
2021-04-25 01:41:10 +03:00
|
|
|
'libhw.c',
|
|
|
|
'pcap.c',
|
2024-04-08 18:53:22 +03:00
|
|
|
), if_false: files('bus-stub.c'))
|
2020-08-06 14:07:39 +03:00
|
|
|
|
|
|
|
# usb host adapters
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_UHCI', if_true: files('hcd-uhci.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_OHCI', if_true: files('hcd-ohci.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_OHCI_PCI', if_true: files('hcd-ohci-pci.c'))
|
2024-02-23 15:44:05 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_OHCI_SYSBUS', if_true: files('hcd-ohci-sysbus.c'))
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_EHCI', if_true: files('hcd-ehci.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_EHCI_PCI', if_true: files('hcd-ehci-pci.c'))
|
2024-02-23 15:44:06 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_EHCI_SYSBUS', if_true: files('hcd-ehci-sysbus.c'))
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_XHCI', if_true: files('hcd-xhci.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_XHCI_PCI', if_true: files('hcd-xhci-pci.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_XHCI_SYSBUS', if_true: files('hcd-xhci-sysbus.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_XHCI_NEC', if_true: files('hcd-xhci-nec.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_MUSB', if_true: files('hcd-musb.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_DWC2', if_true: files('hcd-dwc2.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_DWC3', if_true: files('hcd-dwc3.c'))
|
2020-08-06 14:07:39 +03:00
|
|
|
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_TUSB6010', if_true: files('tusb6010.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_IMX', if_true: files('chipidea.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_IMX_USBPHY', if_true: files('imx-usb-phy.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_VT82C686', if_true: files('vt82c686-uhci-pci.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_XLNX_VERSAL', if_true: files('xlnx-versal-usb2-ctrl-regs.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_XLNX_USB_SUBSYS', if_true: files('xlnx-usb-subsystem.c'))
|
2020-08-06 14:07:39 +03:00
|
|
|
|
|
|
|
# emulated usb devices
|
2024-05-30 14:27:15 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_HUB', if_true: files('dev-hub.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_HID', if_true: files('dev-hid.c'))
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_TABLET_WACOM', if_true: files('dev-wacom.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_STORAGE_CORE', if_true: files('dev-storage.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_STORAGE_BOT', if_true: files('dev-storage-bot.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_STORAGE_CLASSIC', if_true: files('dev-storage-classic.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_STORAGE_UAS', if_true: files('dev-uas.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_AUDIO', if_true: files('dev-audio.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_SERIAL', if_true: files('dev-serial.c'))
|
|
|
|
system_ss.add(when: 'CONFIG_USB_NETWORK', if_true: files('dev-network.c'))
|
2023-11-03 11:17:48 +03:00
|
|
|
if host_os != 'windows'
|
2023-08-30 12:29:54 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_STORAGE_MTP', if_true: files('dev-mtp.c'))
|
|
|
|
endif
|
2020-08-06 14:07:39 +03:00
|
|
|
|
|
|
|
# smartcard
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_SMARTCARD', if_true: files('dev-smartcard-reader.c'))
|
2020-08-06 14:07:39 +03:00
|
|
|
|
2021-06-03 12:15:26 +03:00
|
|
|
if cacard.found()
|
2020-08-06 14:07:39 +03:00
|
|
|
usbsmartcard_ss = ss.source_set()
|
|
|
|
usbsmartcard_ss.add(when: 'CONFIG_USB_SMARTCARD',
|
|
|
|
if_true: [cacard, files('ccid-card-emulated.c', 'ccid-card-passthru.c')])
|
|
|
|
hw_usb_modules += {'smartcard': usbsmartcard_ss}
|
|
|
|
endif
|
|
|
|
|
2020-08-26 14:42:04 +03:00
|
|
|
# U2F
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_U2F', if_true: files('u2f.c'))
|
2023-11-03 11:17:48 +03:00
|
|
|
if host_os == 'linux'
|
2023-05-26 13:20:39 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_U2F', if_true: [libudev, files('u2f-passthru.c')])
|
|
|
|
endif
|
2020-08-26 14:42:04 +03:00
|
|
|
if u2f.found()
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_U2F', if_true: [u2f, files('u2f-emulated.c')])
|
2020-08-26 14:42:04 +03:00
|
|
|
endif
|
|
|
|
|
2022-05-19 15:38:57 +03:00
|
|
|
# CanoKey
|
|
|
|
if canokey.found()
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: 'CONFIG_USB_CANOKEY', if_true: [canokey, files('canokey.c')])
|
2022-05-19 15:38:57 +03:00
|
|
|
endif
|
|
|
|
|
2020-08-06 14:07:39 +03:00
|
|
|
# usb redirect
|
2021-06-03 12:15:26 +03:00
|
|
|
if usbredir.found()
|
2020-08-06 14:07:39 +03:00
|
|
|
usbredir_ss = ss.source_set()
|
|
|
|
usbredir_ss.add(when: 'CONFIG_USB',
|
|
|
|
if_true: [usbredir, files('redirect.c', 'quirks.c')])
|
|
|
|
hw_usb_modules += {'redirect': usbredir_ss}
|
|
|
|
endif
|
|
|
|
|
|
|
|
# usb pass-through
|
2021-07-21 11:17:18 +03:00
|
|
|
if libusb.found()
|
2021-06-24 13:38:35 +03:00
|
|
|
usbhost_ss = ss.source_set()
|
|
|
|
usbhost_ss.add(when: ['CONFIG_USB', libusb],
|
|
|
|
if_true: files('host-libusb.c'))
|
|
|
|
hw_usb_modules += {'host': usbhost_ss}
|
|
|
|
endif
|
2020-08-06 14:07:39 +03:00
|
|
|
|
2023-06-13 16:33:47 +03:00
|
|
|
system_ss.add(when: ['CONFIG_USB', 'CONFIG_XEN_BUS', libusb], if_true: files('xen-usb.c'))
|
2020-08-06 14:07:39 +03:00
|
|
|
|
|
|
|
modules += { 'hw-usb': hw_usb_modules }
|