1 # ====================================================================
5 # USB device driver for the Philips PDIUSBD12 Full Speed USB
8 # ====================================================================
9 #####ECOSGPLCOPYRIGHTBEGIN####
10 ## -------------------------------------------
11 ## This file is part of eCos, the Embedded Configurable Operating System.
12 ## Copyright (C) 2003, 2004 eCosCentric Limited
13 ## Copyright (C) 2006 eCosCentric Ltd
15 ## eCos is free software; you can redistribute it and/or modify it under
16 ## the terms of the GNU General Public License as published by the Free
17 ## Software Foundation; either version 2 or (at your option) any later version.
19 ## eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 ## WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 ## FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 ## You should have received a copy of the GNU General Public License along
25 ## with eCos; if not, write to the Free Software Foundation, Inc.,
26 ## 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 ## As a special exception, if other files instantiate templates or use macros
29 ## or inline functions from this file, or you compile this file and link it
30 ## with other works to produce a work based on this file, this file does not
31 ## by itself cause the resulting work to be covered by the GNU General Public
32 ## License. However the source code for this file must still be made available
33 ## in accordance with section (3) of the GNU General Public License.
35 ## This exception does not invalidate any other reasons why a work based on
36 ## this file might be covered by the GNU General Public License.
37 ## -------------------------------------------
38 #####ECOSGPLCOPYRIGHTEND####
39 # ====================================================================
40 ######DESCRIPTIONBEGIN####
42 # Author(s): Frank M. Pagliughi (fmp), SoRo Systems, Inc.
46 #####DESCRIPTIONEND####
47 # ====================================================================
49 cdl_package CYGPKG_DEVS_USB_D12 {
50 display "Philips D12 USB Device Driver"
51 include_dir "cyg/io/usb"
53 implements CYGHWR_IO_USB_SLAVE
54 doc ref/devs-usb-philips-pdiusbd12.html
57 The Philips PDIUSBD12 is a USB peripheral controller (slave)
58 chip that can connect to a microcontroller or microprocessor
59 through an 8-bit parallel bus. The SoRo Systems USB-D12-104 is
60 a slave board for the PC's ISA or PC/104 bus that contains a
61 D12 chip placed in the PC's I/O space with jumpered selections
62 for IRQ and DMA settings. This package provides an eCos device
65 requires CYGIMP_DEVS_USB_D12_HW_ACCESS_HEADER
67 cdl_option CYGIMP_DEVS_USB_D12_HW_ACCESS_HEADER {
68 display "Inline file implementing hardware access"
72 This option should contain the header file which
73 implements basic access to the D12 registers"
76 cdl_component CYGFUN_DEVS_USB_D12_EP0 {
77 display "Support the Control Endpoint 0"
78 default_value CYGINT_IO_USB_SLAVE_CLIENTS
79 requires CYGPKG_IO_USB CYGPKG_IO_USB_SLAVE
81 compile -library=libextras.a usbs_d12_data.cxx
83 Enable support for endpoint 0. If this support is disabled
84 then the entire USB port is unusable."
86 cdl_option CYGVAR_DEVS_USB_D12_EP0_DEVTAB_ENTRY {
87 display "Provide a devtab entry for endpoint 0"
88 default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
91 If endpoint 0 will only be accessed via the low-level
92 USB-specific calls then there is no need for an entry
93 in the device table, saving some memory. If the
94 application intends to access the endpoint by means
95 of open and ioctl calls then a devtab entry is needed.
98 cdl_option CYGNUM_DEVS_USB_D12_EP0_TXBUFSIZE {
99 display "Size of statically-allocated endpoint 0 transmit buffer"
102 requires { CYGNUM_DEVS_USB_D12_EP0_TXBUFSIZE >=
103 CYGNUM_DEVS_USB_D12_EP0_PKTSIZE }
105 The implementation of the support for endpoint 0 uses
106 a single static buffer to hold the response to the
107 current control message. Typically this buffer can be
108 fairly small since replies to control messages tend to
109 be small: typically some tens of bytes for the enumeration
110 data, perhaps a bit more for unicode-encoded string
111 descriptors. However if some application-specific protocol
112 depends on larger control messages then this buffer
113 size may need to be increased."
117 cdl_option CYGNUM_DEVS_USB_D12_BASEADDR {
118 display "Base Address of D12 chip"
120 active_if CYGFUN_DEVS_USB_D12_EP0
122 The base memory or I/O address where the USB chip resides.
123 The value is set by the hardware specific driver's CDL."
126 cdl_option CYGNUM_DEVS_USB_D12_IRQ {
127 display "IRQ for the D12 chip"
128 active_if CYGFUN_DEVS_USB_D12_EP0
131 The IRQ assigned to the D12 chip. The value
132 is set by the hardware specific drivers's CDL."
135 cdl_option CYGNUM_DEVS_USB_D12_INT {
136 display "INT for the D12 chip"
137 active_if CYGFUN_DEVS_USB_D12_EP0
139 default_value { CYGNUM_DEVS_USB_D12_IRQ + 32 }
141 The interrupt vector assigned to the D12 chip."
144 cdl_component CYGPKG_DEVS_USB_D12_THREAD {
145 display "Use a thread to service D12 chip"
146 active_if CYGFUN_DEVS_USB_D12_EP0
149 Services the D12 USB chip with a thread, rather than at
150 the DSR level. This allows for increased debug support,
151 like TRACE output from the driver at the expense of some
152 throughput & reaction time. The service thread MUST be at
153 a higher priority than any application thread that uses
156 cdl_option CYGNUM_DEVS_USB_D12_THREAD_PRIORITY {
157 display "Thread Priority"
162 The priority of the D12 device driver thread."
165 cdl_option CYGNUM_DEVS_USB_D12_THREAD_STACK_SIZE {
166 display "USB Thread Stack Size"
170 The stack size for the D12 device driver thread."
174 cdl_component CYGFUN_DEVS_USB_D12_DEBUG {
175 display "Debug output from the D12 Device Driver"
176 requires CYGPKG_DEVS_USB_D12_THREAD
179 Provide debugging output from the D12 Device Driver"
181 cdl_option CYGSEM_DEVS_USB_D12_DEBUG_DUMP_EP0_BUFS {
182 display "Dump the contents of EP0 buffers"
187 Dump the contents of the packages going through
188 EP0. This allows you to see things like device
189 requests and responses."
192 cdl_option CYGSEM_DEVS_USB_D12_DEBUG_DUMP_BUFS {
193 display "Dump the contents of data buffers"
197 Dump the contents of the packages going through the generic
198 endpoints. This allow you to see all of the data going through
203 cdl_component CYGPKG_DEVS_USB_D12_TX_EP1 {
204 display "Endpoint 1 Interrupt IN, (tx_ep1)"
205 implements CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS
206 requires CYGFUN_DEVS_USB_D12_EP0
207 default_value CYGFUN_DEVS_USB_D12_EP0
209 On the D12, Endpoint 1 IN can be used for Interrupt,
210 Bulk, or Control packages. This driver currently only supports
211 Interrupt packages on Endpoint 1 (slave -> host) transfers."
213 cdl_option CYGVAR_DEVS_USB_D12_TX_EP1_DEVTAB_ENTRY {
214 display "Provide a devtab entry for Endpoint 1 IN"
215 default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
218 If Endpoint 1 IN will only be accessed via the low-level
219 USB-specific calls then there is no need for an entry
220 in the device table, saving some memory. If the
221 application intends to access the endpoint by means
222 of open and write calls then a devtab entry is needed."
226 cdl_component CYGPKG_DEVS_USB_D12_RX_EP1 {
227 display "Endpoint 1 Interrupt OUT, (rx_ep1)"
228 implements CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS
229 requires CYGFUN_DEVS_USB_D12_EP0
230 default_value CYGFUN_DEVS_USB_D12_EP0
232 In the D12, Endpoint 1 OUT can be used for Interrupt,
233 Bulk, or Control packages. This driver currently only supports
234 Interrupt packages on Endpoint 1 for (host -> slave) transfers"
236 cdl_option CYGVAR_DEVS_USB_D12_RX_EP1_DEVTAB_ENTRY {
237 display "Provide a devtab entry for Endpoint 1 OUT"
238 default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
241 If Endpoint 1 OUT will only be accessed via the low-level
242 USB-specific calls then there is no need for an entry
243 in the device table, saving some memory. If the
244 application intends to access the endpoint by means
245 of open and write calls then a devtab entry is needed."
249 cdl_component CYGPKG_DEVS_USB_D12_TX_EP2 {
250 display "Endpoint 2 Bulk IN, (tx_ep2)"
251 implements CYGHWR_IO_USB_SLAVE_IN_ENDPOINTS
252 requires CYGFUN_DEVS_USB_D12_EP0
253 default_value CYGFUN_DEVS_USB_D12_EP0
255 In the D12, Endpoint 2 IN can be used for Bulk, Interrupt,
256 or Control packages. This driver currently only supports
257 Bulk packages on Endpoint 2 for (slave -> host) transfers."
259 cdl_option CYGVAR_DEVS_USB_D12_TX_EP2_DEVTAB_ENTRY {
260 display "Provide a devtab entry for Endpoint 2 IN"
261 default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
264 If Endpoint 2 IN will only be accessed via the low-level
265 USB-specific calls then there is no need for an entry
266 in the device table, saving some memory. If the
267 application intends to access the endpoint by means
268 of open and write calls then a devtab entry is needed."
272 cdl_component CYGPKG_DEVS_USB_D12_RX_EP2 {
273 display "Endpoint 2 Bulk OUT, (rx_ep2)"
274 implements CYGHWR_IO_USB_SLAVE_OUT_ENDPOINTS
275 requires CYGFUN_DEVS_USB_D12_EP0
276 default_value CYGFUN_DEVS_USB_D12_EP0
278 In the D12, Endpoint 2 OUT can be used for Bulk, Interrupt,
279 Control packages. This driver currently only supports
280 Bulk packages on Endpoint 2 for (host -> slave) transfers."
282 cdl_option CYGVAR_DEVS_USB_D12_RX_EP2_DEVTAB_ENTRY {
283 display "Provide a devtab entry for Endpoint 2 OUT"
284 default_value CYGGLO_IO_USB_SLAVE_PROVIDE_DEVTAB_ENTRIES
287 If Endpoint 2 OUT will only be accessed via the low-level
288 USB-specific calls then there is no need for an entry
289 in the device table, saving some memory. If the
290 application intends to access the endpoint by means
291 of open and write calls then a devtab entry is needed."
295 cdl_option CYGDAT_DEVS_USB_D12_DEVTAB_BASENAME {
296 display "Base name for devtab entries"
298 active_if { CYGVAR_DEVS_USB_D12_EP0_DEVTAB_ENTRY ||
299 CYGVAR_DEVS_USB_D12_TX_EP1_DEVTAB_ENTRY ||
300 CYGVAR_DEVS_USB_D12_RX_EP1_DEVTAB_ENTRY ||
301 CYGVAR_DEVS_USB_D12_TX_EP2_DEVTAB_ENTRY ||
302 CYGVAR_DEVS_USB_D12_RX_EP2_DEVTAB_ENTRY }
303 default_value { "\"/dev/usbs\"" }
305 If the D12 USB device driver package provides devtab entries
306 for any of the endpoints then this option gives
307 control over the names of these entries. By default the
308 endpoints will be called \"/dev/usbs0c\", \"/dev/usbs1r\"
309 \"/dev/usbs1w\", \"/dev/usbs2r\", \"/dev/usbs2w\"
310 (assuming those endpoints are all enabled. The common
311 part \"/dev/usbs\" is determined by this configuration
312 option. It may be necessary to change this if there are
313 multiple USB slave-side devices on the target hardware to
314 prevent a name clash."