]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - stand/usb/usbcore.mk
Optionally bind ktls threads to NUMA domains
[FreeBSD/FreeBSD.git] / stand / usb / usbcore.mk
1 #
2 # $FreeBSD$
3 #
4 # Copyright (c) 2013-2020 Hans Petter Selasky.
5 # Copyright (c) 2014 SRI International
6 # All rights reserved.
7 #
8 # This software was developed by SRI International and the University of
9 # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
10 # ("CTSRD"), as part of the DARPA CRASH research programme.
11 #
12 # Redistribution and use in source and binary forms, with or without
13 # modification, are permitted provided that the following conditions
14 # are met:
15 # 1. Redistributions of source code must retain the above copyright
16 #    notice, this list of conditions and the following disclaimer.
17 # 2. Redistributions in binary form must reproduce the above copyright
18 #    notice, this list of conditions and the following disclaimer in the
19 #    documentation and/or other materials provided with the distribution.
20 #
21 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
22 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 # ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
25 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 # SUCH DAMAGE.
32 #
33
34 USBCOREDIR:=    ${.PARSEDIR}
35 S=${USBCOREDIR}/../../sys
36
37 MACHDEP_DIRS=
38
39 .if defined(HAVE_EXYNOS_EHCI)
40 MACHDEP_DIRS+=  ${S}/arm/samsung/exynos
41 .endif
42
43 .PATH: \
44         ${USBCOREDIR} \
45         ${USBCOREDIR}/storage \
46         ${S}/dev/usb \
47         ${S}/dev/usb/controller \
48         ${S}/dev/usb/serial \
49         ${S}/dev/usb/storage \
50         ${S}/dev/usb/template \
51         ${MACHDEP_DIRS}
52 .undef S
53
54 USB_POOL_SIZE?= 131072
55
56 CFLAGS+=        -DUSB_MSCTEST_BULK_SIZE=65536
57 CFLAGS+=        -DUSB_POOL_SIZE=${USB_POOL_SIZE}
58
59
60 #
61 # BUSDMA implementation
62 #
63 SRCS+=  usb_busdma_loader.c
64
65 #
66 # USB controller drivers
67 #
68
69 KSRCS+= usb_controller.c
70
71 .if defined(HAVE_AT91DCI)
72 CFLAGS += -DUSB_PCI_PROBE_LIST="\"at91dci\""
73 KSRCS+= at91dci.c
74 .endif
75
76 .if defined(HAVE_ATMEGADCI)
77 CFLAGS += -DUSB_PCI_PROBE_LIST="\"atmegadci\""
78 KSRCS+= atmegadci.c
79 .endif
80
81 .if defined(HAVE_AVR32DCI)
82 CFLAGS += -DUSB_PCI_PROBE_LIST="\"avr32dci\""
83 KSRCS+= avr32dci.c
84 .endif
85
86 .if defined(HAVE_DWCOTG)
87 CFLAGS += -DUSB_PCI_PROBE_LIST="\"dwcotg\""
88 KSRCS+= dwcotg.c
89 .endif
90
91 .if defined(HAVE_MUSBOTG)
92 CFLAGS += -DUSB_PCI_PROBE_LIST="\"musbotg\""
93 KSRCS+= musbotg.c
94 .endif
95
96 .if defined(HAVE_EHCI)
97 CFLAGS += -DUSB_PCI_PROBE_LIST="\"ehci\""
98 KSRCS+= ehci.c
99 .endif
100
101 .if defined(HAVE_EXYNOS_EHCI)
102 CFLAGS += -DUSB_PCI_PROBE_LIST="\"combiner\", \"pad\", \"ehci\""
103 KSRCS+= ehci.c
104 KSRCS+= exynos5_combiner.c
105 KSRCS+= exynos5_pad.c
106 KSRCS+= exynos5_ehci.c
107 .endif
108
109 .if defined(HAVE_OHCI)
110 CFLAGS += -DUSB_PCI_PROBE_LIST="\"ohci\""
111 KSRCS+= ohci.c
112 .endif
113
114 .if defined(HAVE_UHCI)
115 CFLAGS += -DUSB_PCI_PROBE_LIST="\"uhci\""
116 KSRCS+= uhci.c
117 .endif
118
119 .if defined(HAVE_XHCI)
120 CFLAGS += -DUSB_PCI_PROBE_LIST="\"xhci\""
121 KSRCS+= xhci.c
122 .endif
123
124 .if defined(HAVE_USS820DCI)
125 CFLAGS += -DUSB_PCI_PROBE_LIST="\"uss820dci\""
126 KSRCS+= uss820dci.c
127 .endif
128
129 .if defined(HAVE_SAF1761OTG)
130 CFLAGS += -DUSB_PCI_PROBE_LIST="\"saf1761otg\""
131 CFLAGS += -DUSB_PCI_MEMORY_ADDRESS=0x900000007f100000ULL
132 CFLAGS += -DUSB_PCI_MEMORY_SIZE=0x40000U
133 KSRCS+= saf1761_otg.c
134 KSRCS+= saf1761_otg_boot.c
135 .endif
136
137 #
138 # USB core and templates
139 #
140 KSRCS+= usb_core.c
141 KSRCS+= usb_debug.c
142 KSRCS+= usb_device.c
143 KSRCS+= usb_dynamic.c
144 KSRCS+= usb_error.c
145 KSRCS+= usb_handle_request.c
146 KSRCS+= usb_hid.c
147 KSRCS+= usb_hub.c
148 KSRCS+= usb_lookup.c
149 KSRCS+= usb_msctest.c
150 KSRCS+= usb_parse.c
151 KSRCS+= usb_request.c
152 KSRCS+= usb_transfer.c
153 KSRCS+= usb_util.c
154 KSRCS+= usb_template.c
155 KSRCS+= usb_template_cdce.c
156 KSRCS+= usb_template_msc.c
157 KSRCS+= usb_template_mtp.c
158 KSRCS+= usb_template_modem.c
159 KSRCS+= usb_template_mouse.c
160 KSRCS+= usb_template_kbd.c
161 KSRCS+= usb_template_audio.c
162 KSRCS+= usb_template_phone.c
163 KSRCS+= usb_template_serialnet.c
164 KSRCS+= usb_template_midi.c
165 KSRCS+= usb_template_multi.c
166 KSRCS+= usb_template_cdceem.c
167
168 #
169 # USB mass storage support
170 #
171 SRCS+=  umass_common.c
172
173 .if defined(HAVE_UMASS_LOADER)
174 CFLAGS+=        -I${.CURDIR}/../common
175 SRCS+=  umass_loader.c
176 .endif
177