17d0d268bSAndrew Thompson# 27d0d268bSAndrew Thompson# 37d0d268bSAndrew Thompson# Copyright (c) 2008 Hans Petter Selasky. All rights reserved. 47d0d268bSAndrew Thompson# 57d0d268bSAndrew Thompson# Redistribution and use in source and binary forms, with or without 67d0d268bSAndrew Thompson# modification, are permitted provided that the following conditions 77d0d268bSAndrew Thompson# are met: 87d0d268bSAndrew Thompson# 1. Redistributions of source code must retain the above copyright 97d0d268bSAndrew Thompson# notice, this list of conditions and the following disclaimer. 107d0d268bSAndrew Thompson# 2. Redistributions in binary form must reproduce the above copyright 117d0d268bSAndrew Thompson# notice, this list of conditions and the following disclaimer in the 127d0d268bSAndrew Thompson# documentation and/or other materials provided with the distribution. 137d0d268bSAndrew Thompson# 147d0d268bSAndrew Thompson# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 157d0d268bSAndrew Thompson# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 167d0d268bSAndrew Thompson# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 177d0d268bSAndrew Thompson# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 187d0d268bSAndrew Thompson# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 197d0d268bSAndrew Thompson# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 207d0d268bSAndrew Thompson# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 217d0d268bSAndrew Thompson# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 227d0d268bSAndrew Thompson# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 237d0d268bSAndrew Thompson# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 247d0d268bSAndrew Thompson# SUCH DAMAGE. 257d0d268bSAndrew Thompson# 267d0d268bSAndrew Thompson 27193d9e76SEnji CooperSYSDIR?=${SRCTOP}/sys 28df3394b3SWarner Losh.include "${SYSDIR}/conf/kern.opts.mk" 294a47892cSRobert Millan 305708bf48SHans Petter Selasky# 315708bf48SHans Petter Selasky# Check for common USB debug flags to pass when building the USB 325708bf48SHans Petter Selasky# modules in this directory: 335708bf48SHans Petter Selasky# 345708bf48SHans Petter Selasky.if defined(USB_DEBUG) 355708bf48SHans Petter SelaskyMAKE+=" DEBUG_FLAGS+=-DUSB_DEBUG" 365708bf48SHans Petter Selasky.endif 375708bf48SHans Petter Selasky 385708bf48SHans Petter Selasky.if defined(USB_DEBUG) && defined(USB_REQ_DEBUG) 395708bf48SHans Petter SelaskyMAKE+=" DEBUG_FLAGS+=-DUSB_REQ_DEBUG" 405708bf48SHans Petter Selasky.endif 415708bf48SHans Petter Selasky 424a47892cSRobert Millan# Modules that include binary-only blobs of microcode should be selectable by 434a47892cSRobert Millan# MK_SOURCELESS_UCODE option (see below). 444a47892cSRobert Millan 457d0d268bSAndrew ThompsonSUBDIR = usb 4658d5c511SWarner LoshSUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} \ 47ac83063dSLexi Winter ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} ${_bcm2838_xhci} 48*c14b0162SJesper Schmitz MouridsenSUBDIR += mtw ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} 4901f2e864SVladimir KondratyevSUBDIR += atp cfumass uhid uhid_snes ukbd ums udbp uep wmt wsp ugold uled \ 5001f2e864SVladimir Kondratyev usbhid 51b20adc2bSAndrew ThompsonSUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ 520f1bf1c2SAdrian Chadd umb umct umcs umodem umoscom uplcom uslcom uvisor uvscom 5354e231b3SDenis BodorSUBDIR += i2ctinyusb 54c178a7e7SAndriy GaponSUBDIR += cp2112 55faaf95e8SHans Petter SelaskySUBDIR += udl 5663722e52SEdward Tomasz NapieralaSUBDIR += uether aue axe axge cdce cdceem cue ${_kue} mos rue smsc udav uhso \ 5763722e52SEdward Tomasz Napierala ipheth 58c0134460SEd MasteSUBDIR += muge 59e1b74f21SKevin LoSUBDIR += ure urndis 607d0d268bSAndrew ThompsonSUBDIR += usfs umass urio 617fe671dcSHans Petter SelaskySUBDIR += ${_uacpi} 627d0d268bSAndrew ThompsonSUBDIR += quirk template 6346902503SHans Petter SelaskySUBDIR += ${_g_audio} ${_g_keyboard} ${_g_modem} ${_g_mouse} 6446902503SHans Petter Selasky 6546902503SHans Petter Selasky.if ${MK_USB_GADGET_EXAMPLES} == "yes" 6646902503SHans Petter Selasky_g_audio= g_audio 6746902503SHans Petter Selasky_g_keyboard= g_keyboard 6846902503SHans Petter Selasky_g_modem= g_modem 6946902503SHans Petter Selasky_g_mouse= g_mouse 7046902503SHans Petter Selasky.endif 717d0d268bSAndrew Thompson 724a47892cSRobert Millan.if ${MK_SOURCELESS_UCODE} != "no" 734a47892cSRobert Millan_rum= rum 744a47892cSRobert Millan_uath= uath 754a47892cSRobert Millan_zyd= zyd 764a47892cSRobert Millan_kue= kue 77a99fe630SRui Paulo_run= run 78a99fe630SRui Paulo_rsu= rsu 79a99fe630SRui Paulo_rsufw= rsufw 807b523f05SEd Maste_runfw= runfw 817b523f05SEd Maste.endif 824a47892cSRobert Millan 83c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "amd64" 8418b223feSWeongyo Jeong_urtw= urtw 8518b223feSWeongyo Jeong.endif 8618b223feSWeongyo Jeong 87c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "arm" 887d0d268bSAndrew Thompson_atmegadci= atmegadci 89e8052eb4SHans Petter Selasky_dwc_otg= dwc_otg 90e8052eb4SHans Petter Selasky_musb= musb 91e8052eb4SHans Petter Selasky_uss820dci= uss820dci 927d0d268bSAndrew Thompson.endif 937d0d268bSAndrew Thompson 94c09808d0SWarner Losh.if ${MACHINE_CPUARCH} == "i386" 9518b223feSWeongyo Jeong_urtw= urtw 9618b223feSWeongyo Jeong.endif 9718b223feSWeongyo Jeong 982e141748SHans Petter Selasky.if ${MACHINE_CPUARCH} == "avr32" 992e141748SHans Petter Selasky_avr32dci= avr32dci 1002e141748SHans Petter Selasky.endif 1012e141748SHans Petter Selasky 102ac83063dSLexi Winter.if ${MACHINE_CPUARCH} == "aarch64" 103ac83063dSLexi Winter# The bcm2838_xhci shim is specific to the Raspberry Pi 4 SoC. 104ac83063dSLexi Winter_bcm2838_xhci= bcm2838_xhci 105ac83063dSLexi Winter.endif 106ac83063dSLexi Winter 1077fe671dcSHans Petter Selasky.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ 1087fe671dcSHans Petter Selasky ${MACHINE_CPUARCH} == "i386" 1097fe671dcSHans Petter Selasky_uacpi= uacpi 1107fe671dcSHans Petter Selasky.endif 1117fe671dcSHans Petter Selasky 1127d0d268bSAndrew Thompson.include <bsd.subdir.mk> 113