1 /*****************************************************************************
2 ** FILE NAME : ifxusb_driver.c
3 ** PROJECT : IFX USB sub-system V3
4 ** MODULES : IFX USB sub-system Host and Device driver
7 ** AUTHOR : Chen, Howard
8 ** DESCRIPTION : The provides the initialization and cleanup entry
9 ** points for the IFX USB driver. This module can be
10 ** dynamically loaded with insmod command or built-in
11 ** with kernel. When loaded or executed the ifxusb_driver_init
12 ** function is called. When the module is removed (using rmmod),
13 ** the ifxusb_driver_cleanup function is called.
16 ** REFERENCE : Synopsys DWC-OTG Driver 2.7
17 ** COPYRIGHT : Copyright (c) 2010
18 ** LANTIQ DEUTSCHLAND GMBH,
19 ** Am Campeon 3, 85579 Neubiberg, Germany
21 ** This program is free software; you can redistribute it and/or modify
22 ** it under the terms of the GNU General Public License as published by
23 ** the Free Software Foundation; either version 2 of the License, or
24 ** (at your option) any later version.
26 ** Version Control Section **
30 ** $Log$ Revision history
31 *****************************************************************************/
34 * This file contains code fragments from Synopsys HS OTG Linux Software Driver.
35 * For this code the following notice is applicable:
37 * ==========================================================================
39 * Synopsys HS OTG Linux Software Driver and documentation (hereinafter,
40 * "Software") is an Unsupported proprietary work of Synopsys, Inc. unless
41 * otherwise expressly agreed to in writing between Synopsys and you.
43 * The Software IS NOT an item of Licensed Software or Licensed Product under
44 * any End User Software License Agreement or Agreement for Licensed Product
45 * with Synopsys or any supplement thereto. You are permitted to use and
46 * redistribute this Software in source and binary forms, with or without
47 * modification, provided that redistributions of source code must retain this
48 * notice. You may not view, use, disclose, copy or distribute this file or
49 * any information contained herein except pursuant to this license grant from
50 * Synopsys. If you do not agree with this notice, including the disclaimer
51 * below, then you are not authorized to use the Software.
53 * THIS SOFTWARE IS BEING DISTRIBUTED BY SYNOPSYS SOLELY ON AN "AS IS" BASIS
54 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
55 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
56 * ARE HEREBY DISCLAIMED. IN NO EVENT SHALL SYNOPSYS BE LIABLE FOR ANY DIRECT,
57 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
58 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
59 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
60 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
61 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
62 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
64 * ========================================================================== */
68 \brief This file contains the loading/unloading interface to the Linux driver.
71 #include <linux/version.h>
72 #include "ifxusb_version.h"
74 #include <linux/kernel.h>
75 #include <linux/module.h>
76 #include <linux/moduleparam.h>
77 #include <linux/init.h>
79 #include <linux/device.h>
80 #include <linux/of_platform.h>
81 #include <linux/of_gpio.h>
83 #include <linux/errno.h>
84 #include <linux/types.h>
85 #include <linux/stat.h> /* permission constants */
87 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
88 #include <linux/irq.h>
93 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
97 #include "ifxusb_plat.h"
99 #include "ifxusb_cif.h"
104 #define USB_DRIVER_DESC "IFX USB HCD driver"
105 const char ifxusb_hcd_driver_name
[] = "ifxusb_hcd";
107 ifxhcd_hcd_t ifxusb_hcd_1
;
108 ifxhcd_hcd_t ifxusb_hcd_2
;
109 const char ifxusb_hcd_name_1
[] = "ifxusb_hcd_1";
110 const char ifxusb_hcd_name_2
[] = "ifxusb_hcd_2";
112 ifxhcd_hcd_t ifxusb_hcd
;
113 const char ifxusb_hcd_name
[] = "ifxusb_hcd";
116 #if defined(__DO_OC_INT__)
117 ifxhcd_hcd_t
*oc_int_id
=NULL
;
119 ifxhcd_hcd_t
*oc_int_id_1
=NULL
;
120 ifxhcd_hcd_t
*oc_int_id_2
=NULL
;
128 #define USB_DRIVER_DESC "IFX USB PCD driver"
129 const char ifxusb_pcd_driver_name
[] = "ifxusb_pcd";
130 ifxpcd_pcd_t ifxusb_pcd
;
131 const char ifxusb_pcd_name
[] = "ifxusb_pcd";
134 /* Global Debug Level Mask. */
136 uint32_t h_dbg_lvl
= 0xff;
140 uint32_t d_dbg_lvl
= 0x00;
144 ifxusb_params_t ifxusb_module_params_h
;
146 ifxusb_params_t ifxusb_module_params_d
;
149 static void parse_parms(void);
152 #if defined(__IS_TWINPASS__)
153 #warning "Compiled as TWINPASS"
154 #elif defined(__IS_DANUBE__)
155 #warning "Compiled as DANUBE"
156 #elif defined(__IS_AMAZON_SE__)
157 #warning "Compiled as AMAZON_SE"
158 #elif defined(__IS_AR9__)
159 #warning "Compiled as AR9"
160 #elif defined(__IS_VR9__)
161 #warning "Compiled as VR9"
162 #elif defined(__IS_AR10__)
163 #warning "Compiled as AR10"
165 #error "No Platform defined"
169 /* Function to setup the structures to control one usb core running as host*/
172 \brief inlined by ifxusb_driver_probe(), handling host mode probing. Run at each host core.
174 static inline int ifxusb_driver_probe_h(ifxhcd_hcd_t
*_hcd
,
183 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
185 ifxusb_power_on_h (&_hcd
->core_if
);
187 ifxusb_phy_power_on_h (&_hcd
->core_if
); // Test
189 ifxusb_hard_reset_h(&_hcd
->core_if
);
190 retval
=ifxusb_core_if_init_h(&_hcd
->core_if
,
198 ifxusb_host_core_init(&_hcd
->core_if
,&ifxusb_module_params_h
);
200 ifxusb_disable_global_interrupts_h( &_hcd
->core_if
);
202 /* The driver is now initialized and need to be registered into Linux USB sub-system */
204 retval
= ifxhcd_init(_hcd
); // hook the hcd into usb ss
208 IFX_ERROR("_hcd_init failed\n");
212 //ifxusb_enable_global_interrupts_h( _hcd->core_if ); // this should be done at hcd_start , including hcd_interrupt
219 \brief inlined by ifxusb_driver_probe(), handling device mode probing.
221 static inline int ifxusb_driver_probe_d(ifxpcd_pcd_t
*_pcd
,
230 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
231 ifxusb_power_on_d (&_pcd
->core_if
);
233 ifxusb_phy_power_on_d (&_pcd
->core_if
); // Test
235 ifxusb_hard_reset_d(&_pcd
->core_if
);
236 retval
=ifxusb_core_if_init_d(&_pcd
->core_if
,
244 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
245 ifxusb_dev_core_init(&_pcd
->core_if
,&ifxusb_module_params_d
);
247 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
248 ifxusb_disable_global_interrupts_d( &_pcd
->core_if
);
250 /* The driver is now initialized and need to be registered into
251 Linux USB Gadget sub-system
253 retval
= ifxpcd_init();
254 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
258 IFX_ERROR("_pcd_init failed\n");
261 //ifxusb_enable_global_interrupts_d( _pcd->core_if ); // this should be done at gadget bind or start
264 #endif //__IS_DEVICE__
267 \brief This function is called when a driver is unregistered. This happens when
268 the rmmod command is executed. The device may or may not be electrically
269 present. If it is present, the driver stops device processing. Any resources
270 used on behalf of this device are freed.
272 static int ifxusb_driver_remove(struct platform_device
*_pdev
)
274 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
276 #if defined(__IS_DUAL__)
277 ifxhcd_remove(&ifxusb_hcd_1
);
278 ifxusb_core_if_remove_h(&ifxusb_hcd_1
.core_if
);
279 ifxhcd_remove(&ifxusb_hcd_2
);
280 ifxusb_core_if_remove_h(&ifxusb_hcd_2
.core_if
);
282 ifxhcd_remove(&ifxusb_hcd
);
283 ifxusb_core_if_remove_h(&ifxusb_hcd
.core_if
);
288 ifxusb_core_if_remove_d(&ifxusb_pcd
.core_if
);
290 /* Remove the device attributes */
292 ifxusb_attr_remove_h(&_pdev
->dev
);
294 ifxusb_attr_remove_d(&_pdev
->dev
);
300 \brief This function is called by module management in 2.6 kernel or by ifxusb_driver_init with 2.4 kernel
301 It is to probe and setup IFXUSB core(s).
303 static int ifxusb_driver_probe(struct platform_device
*_pdev
)
306 struct device_node
*np
;
309 np
= of_find_compatible_node(NULL
, NULL
, "lantiq,ifxhcd-danube");
310 #elif defined __IS_AMAZON_SE__
311 np
= of_find_compatible_node(NULL
, NULL
, "lantiq,ifxhcd-ase");
312 #elif defined __IS_AR9__
313 np
= of_find_compatible_node(NULL
, NULL
, "lantiq,ifxhcd-arx100");
314 #elif defined __IS_VR9__
315 np
= of_find_compatible_node(NULL
, NULL
, "lantiq,ifxhcd-xrx200");
318 dev_err(&_pdev
->dev
, "failed to find hcd device node\n");
322 // Parsing and store the parameters
323 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
327 #if defined(__DO_OC_INT__)
330 #if defined(__IS_DUAL__)
331 oc_int_id
=&ifxusb_hcd_1
;
332 oc_int_id_1
=&ifxusb_hcd_1
;
333 oc_int_id_2
=&ifxusb_hcd_2
;
335 oc_int_id
=&ifxusb_hcd
;
340 #if defined(__IS_DUAL__)
341 memset(&ifxusb_hcd_1
, 0, sizeof(ifxhcd_hcd_t
));
342 memset(&ifxusb_hcd_2
, 0, sizeof(ifxhcd_hcd_t
));
344 ifxusb_hcd_1
.core_if
.core_no
=0;
345 ifxusb_hcd_2
.core_if
.core_no
=1;
346 ifxusb_hcd_1
.core_if
.core_name
=(char *)ifxusb_hcd_name_1
;
347 ifxusb_hcd_2
.core_if
.core_name
=(char *)ifxusb_hcd_name_2
;
349 ifxusb_hcd_1
.dev
=&_pdev
->dev
;
350 ifxusb_hcd_2
.dev
=&_pdev
->dev
;
352 retval
= ifxusb_driver_probe_h(&ifxusb_hcd_1
,
355 IFXUSB1_FIFOMEM_BASE
,
359 goto ifxusb_driver_probe_fail
;
361 retval
= ifxusb_driver_probe_h(&ifxusb_hcd_2
,
364 IFXUSB2_FIFOMEM_BASE
,
368 goto ifxusb_driver_probe_fail
;
370 #elif defined(__IS_FIRST__)
371 memset(&ifxusb_hcd
, 0, sizeof(ifxhcd_hcd_t
));
373 ifxusb_hcd
.core_if
.core_no
=0;
374 ifxusb_hcd
.core_if
.core_name
=(char *)ifxusb_hcd_name
;
376 ifxusb_hcd
.dev
=&_pdev
->dev
;
378 retval
= ifxusb_driver_probe_h(&ifxusb_hcd
,
381 IFXUSB1_FIFOMEM_BASE
,
385 goto ifxusb_driver_probe_fail
;
387 #elif defined(__IS_SECOND__)
388 memset(&ifxusb_hcd
, 0, sizeof(ifxhcd_hcd_t
));
390 ifxusb_hcd
.core_if
.core_no
=1;
391 ifxusb_hcd
.core_if
.core_name
=(char *)ifxusb_hcd_name
;
393 ifxusb_hcd
.dev
=&_pdev
->dev
;
395 retval
= ifxusb_driver_probe_h(&ifxusb_hcd
,
398 IFXUSB2_FIFOMEM_BASE
,
402 goto ifxusb_driver_probe_fail
;
405 memset(&ifxusb_hcd
, 0, sizeof(ifxhcd_hcd_t
));
407 ifxusb_hcd
.core_if
.core_no
=0;
408 ifxusb_hcd
.core_if
.core_name
=(char *)ifxusb_hcd_name
;
410 ifxusb_hcd
.dev
=&_pdev
->dev
;
412 retval
= ifxusb_driver_probe_h(&ifxusb_hcd
,
419 goto ifxusb_driver_probe_fail
;
424 memset(&ifxusb_pcd
, 0, sizeof(ifxpcd_pcd_t
));
425 ifxusb_pcd
.core_if
.core_name
=(char *)&ifxusb_pcd_name
[0];
427 ifxusb_pcd
.dev
=&_pdev
->dev
;
429 #if defined(__IS_FIRST__)
430 ifxusb_pcd
.core_if
.core_no
=0;
431 retval
= ifxusb_driver_probe_d(&ifxusb_pcd
,
434 IFXUSB1_FIFOMEM_BASE
,
437 #elif defined(__IS_SECOND__)
438 ifxusb_pcd
.core_if
.core_no
=1;
439 retval
= ifxusb_driver_probe_d(&ifxusb_pcd
,
442 IFXUSB2_FIFOMEM_BASE
,
446 ifxusb_pcd
.core_if
.core_no
=0;
447 retval
= ifxusb_driver_probe_d(&ifxusb_pcd
,
455 goto ifxusb_driver_probe_fail
;
459 ifxusb_attr_create_h(&_pdev
->dev
);
461 ifxusb_attr_create_d(&_pdev
->dev
);
464 gpio_count
= of_gpio_count(np
);
466 enum of_gpio_flags flags
;
467 int gpio
= of_get_gpio_flags(np
, --gpio_count
, &flags
);
468 if (gpio_request(gpio
, "usb"))
470 dev_info(&_pdev
->dev
, "requested GPIO %d\n", gpio
);
471 gpio_direction_output(gpio
, (flags
& OF_GPIO_ACTIVE_LOW
) ? (0) : (1));
477 ifxusb_driver_probe_fail
:
478 ifxusb_driver_remove(_pdev
);
482 static struct resource ifxusb_device_resources
[] =
484 #if defined(__IS_DUAL__)
485 [0] = { .start
= IFXUSB1_IRQ
,
486 .flags
= IORESOURCE_IRQ
,
488 [1] = { .start
= IFXUSB1_IOMEM_BASE
,
489 .end
= IFXUSB1_IOMEM_BASE
+ IFXUSB_IOMEM_SIZE
-1,
490 .flags
= IORESOURCE_MEM
,
492 [2] = { .start
= IFXUSB2_IRQ
,
493 .flags
= IORESOURCE_IRQ
,
495 [3] = { .start
= IFXUSB2_IOMEM_BASE
,
496 .end
= IFXUSB2_IOMEM_BASE
+ IFXUSB_IOMEM_SIZE
-1,
497 .flags
= IORESOURCE_MEM
,
499 [4] = { .start
= IFXUSB1_FIFOMEM_BASE
,
500 .end
= IFXUSB1_FIFOMEM_BASE
+ IFXUSB_FIFOMEM_SIZE
-1,
501 .flags
= IORESOURCE_MEM
,
503 [5] = { .start
= IFXUSB2_FIFOMEM_BASE
,
504 .end
= IFXUSB2_FIFOMEM_BASE
+ IFXUSB_FIFOMEM_SIZE
-1,
505 .flags
= IORESOURCE_MEM
,
507 [6] = { .start
= IFXUSB1_FIFODBG_BASE
,
508 .end
= IFXUSB1_FIFODBG_BASE
+ IFXUSB_FIFODBG_SIZE
-1,
509 .flags
= IORESOURCE_MEM
,
511 [7] = { .start
= IFXUSB2_FIFODBG_BASE
,
512 .end
= IFXUSB2_FIFODBG_BASE
+ IFXUSB_FIFODBG_SIZE
-1,
513 .flags
= IORESOURCE_MEM
,
515 #elif defined(__IS_FIRST__)
516 [0] = { .start
= IFXUSB1_IRQ
,
517 .flags
= IORESOURCE_IRQ
,
519 [1] = { .start
= IFXUSB1_IOMEM_BASE
,
520 .end
= IFXUSB1_IOMEM_BASE
+ IFXUSB_IOMEM_SIZE
-1,
521 .flags
= IORESOURCE_MEM
,
523 [2] = { .start
= IFXUSB1_FIFOMEM_BASE
,
524 .end
= IFXUSB1_FIFOMEM_BASE
+ IFXUSB_FIFOMEM_SIZE
-1,
525 .flags
= IORESOURCE_MEM
,
527 [3] = { .start
= IFXUSB1_FIFODBG_BASE
,
528 .end
= IFXUSB1_FIFODBG_BASE
+ IFXUSB_FIFODBG_SIZE
-1,
529 .flags
= IORESOURCE_MEM
,
531 #elif defined(__IS_SECOND__)
532 [0] = { .start
= IFXUSB2_IRQ
,
533 .flags
= IORESOURCE_IRQ
,
535 [1] = { .start
= IFXUSB2_IOMEM_BASE
,
536 .end
= IFXUSB2_IOMEM_BASE
+ IFXUSB_IOMEM_SIZE
-1,
537 .flags
= IORESOURCE_MEM
,
539 [2] = { .start
= IFXUSB2_FIFOMEM_BASE
,
540 .end
= IFXUSB2_FIFOMEM_BASE
+ IFXUSB_FIFOMEM_SIZE
-1,
541 .flags
= IORESOURCE_MEM
,
543 [3] = { .start
= IFXUSB2_FIFODBG_BASE
,
544 .end
= IFXUSB2_FIFODBG_BASE
+ IFXUSB_FIFODBG_SIZE
-1,
545 .flags
= IORESOURCE_MEM
,
548 [0] = { .start
= IFXUSB_IRQ
,
549 .flags
= IORESOURCE_IRQ
,
551 [1] = { .start
= IFXUSB_IOMEM_BASE
,
552 .end
= IFXUSB_IOMEM_BASE
+ IFXUSB_IOMEM_SIZE
-1,
553 .flags
= IORESOURCE_MEM
,
555 [2] = { .start
= IFXUSB_FIFOMEM_BASE
,
556 .end
= IFXUSB_FIFOMEM_BASE
+IFXUSB_FIFOMEM_SIZE
-1,
557 .flags
= IORESOURCE_MEM
,
559 [3] = { .start
= IFXUSB_FIFODBG_BASE
,
560 .end
= IFXUSB_FIFODBG_BASE
+IFXUSB_FIFODBG_SIZE
-1,
561 .flags
= IORESOURCE_MEM
,
566 static u64 ifxusb_dmamask
= (u32
)0x1fffffff;
568 static void ifxusb_device_release(struct device
* dev
)
570 IFX_PRINT("IFX USB platform_dev release\n");
574 static struct platform_device ifxusb_device
=
579 .release
= ifxusb_device_release
,
580 .dma_mask
= &ifxusb_dmamask
,
582 .resource
= ifxusb_device_resources
,
583 .num_resources
= ARRAY_SIZE(ifxusb_device_resources
),
588 \brief This function is called when the ifxusb_driver is installed with the insmod command.
590 static struct platform_driver ifxusb_driver
= {
591 .probe
= ifxusb_driver_probe
,
592 .remove
= ifxusb_driver_remove
,
594 .owner
= THIS_MODULE
,
596 .name
= ifxusb_hcd_driver_name
,
598 .name
= ifxusb_pcd_driver_name
,
604 int __init
ifxusb_hcd_driver_init(void)
606 int __init
ifxusb_pcd_driver_init(void)
610 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
611 #if defined(__IS_HOST__)
612 IFX_PRINT("%s: version %s\n", ifxusb_hcd_driver_name
, IFXUSB_VERSION
);
614 IFX_PRINT("%s: version %s\n", ifxusb_pcd_driver_name
, IFXUSB_VERSION
);
618 #if defined(__IS_TWINPASS__)
619 IFX_PRINT(" OPTION: __IS_TWINPASS__\n");
620 #elif defined(__IS_DANUBE__)
621 IFX_PRINT(" OPTION: __IS_DANUBE__\n");
622 #elif defined(__IS_AMAZON_SE__)
623 IFX_PRINT(" OPTION: __IS_AMAZON_SE__\n");
624 #elif defined(__IS_AR9__)
625 IFX_PRINT(" OPTION: __IS_AR9__\n");
626 #elif defined(__IS_VR9__)
627 IFX_PRINT(" OPTION: __IS_VR9__\n");
628 #elif defined(__IS_AR10__)
629 IFX_PRINT(" OPTION: __IS_AR10__\n");
631 IFX_PRINT(" OPTION: NO PLATFORM DEFINED\n");
635 IFX_PRINT(" OPTION: __UEIP__\n");
638 #ifdef __PHY_LONG_PREEMP__
639 IFX_PRINT(" OPTION: __PHY_LONG_PREEMP__\n");
641 #ifdef __FORCE_USB11__
642 IFX_PRINT(" OPTION: __FORCE_USB11__\n");
644 #ifdef __UNALIGNED_BUF_ADJ__
645 IFX_PRINT(" OPTION: __UNALIGNED_BUF_ADJ__\n");
647 #ifdef __UNALIGNED_BUF_CHK__
648 IFX_PRINT(" OPTION: __UNALIGNED_BUF_CHK__\n");
650 #ifdef __UNALIGNED_BUF_BURST__
651 IFX_PRINT(" OPTION: __UNALIGNED_BUF_BURST__\n");
654 IFX_PRINT(" OPTION: __DEBUG__\n");
656 #ifdef __ENABLE_DUMP__
657 IFX_PRINT(" OPTION: __ENABLE_DUMP__\n");
661 IFX_PRINT(" OPTION: __IS_HOST__\n");
663 IFX_PRINT(" __IS_DUAL__\n");
666 IFX_PRINT(" __IS_FIRST__\n");
669 IFX_PRINT(" __IS_SECOND__\n");
671 #ifdef __WITH_HS_ELECT_TST__
672 IFX_PRINT(" __WITH_HS_ELECT_TST__\n");
675 IFX_PRINT(" __EN_ISOC__\n");
677 #ifdef __EN_ISOC_SPLIT__
678 IFX_PRINT(" __EN_ISOC_SPLIT__\n");
680 #ifdef __EPQD_DESTROY_TIMEOUT__
681 IFX_PRINT(" __EPQD_DESTROY_TIMEOUT__\n");
683 #ifdef __DYN_SOF_INTR__
684 IFX_PRINT(" __DYN_SOF_INTR__\n");
687 IFX_PRINT(" OPTION: __IS_DEVICE__\n");
689 IFX_PRINT(" __DED_INTR__\n");
692 IFX_PRINT(" __DED_FIFO__\n");
695 IFX_PRINT(" __DESC_DMA__\n");
698 IFX_PRINT(" __IS_FIRST__\n");
701 IFX_PRINT(" __IS_SECOND__\n");
703 #ifdef __GADGET_TASKLET_TX__
704 IFX_PRINT(" __GADGET_TASKLET_TX__\n");
706 #ifdef __GADGET_TASKLET_RX__
707 IFX_PRINT(" __GADGET_TASKLET_RX__\n");
709 #ifdef __GADGET_TASKLET_HIGH__
710 IFX_PRINT(" __GADGET_TASKLET_HIGH__\n");
712 #ifdef __DO_PCD_UNLOCK__
713 IFX_PRINT(" __DO_PCD_UNLOCK__\n");
715 #ifdef __GADGET_LED__
716 IFX_PRINT(" __GADGET_LED__\n");
719 #ifdef __ECM_NO_INTR__
720 IFX_PRINT(" __ECM_NO_INTR__\n");
722 #ifdef __NOSWAPINCTRL__
723 IFX_PRINT(" __NOSWAPINCTRL__\n");
725 #ifdef __MAC_ECM_FIX__
726 IFX_PRINT(" __MAC_ECM_FIX__\n");
728 #ifdef __RETAIN_BUF_TX__
729 IFX_PRINT(" __RETAIN_BUF_TX__\n");
731 #ifdef __RETAIN_BUF_RX__
732 IFX_PRINT(" __RETAIN_BUF_RX__\n");
735 IFX_PRINT(" __QUICKNAK__\n");
740 retval
= platform_driver_register(&ifxusb_driver
);
743 IFX_ERROR("%s retval=%d\n", __func__
, retval
);
748 ifxusb_device
.name
= ifxusb_hcd_driver_name
;
750 ifxusb_device
.name
= ifxusb_pcd_driver_name
;
753 if (ifxusb_device
.dev
.parent
)
756 retval
= platform_device_register(&ifxusb_device
);
760 IFX_ERROR("%s retval=%d\n", __func__
, retval
);
761 platform_driver_unregister(&ifxusb_driver
);
768 module_init(ifxusb_hcd_driver_init
);
770 module_init(ifxusb_pcd_driver_init
);
774 \brief This function is called when the driver is removed from the kernel
775 with the rmmod command. The driver unregisters itself with its bus
779 void __exit
ifxusb_hcd_driver_cleanup(void)
781 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
782 platform_device_unregister(&ifxusb_device
);
783 platform_driver_unregister(&ifxusb_driver
);
784 IFX_PRINT("%s module removed\n", ifxusb_hcd_driver_name
);
786 module_exit(ifxusb_hcd_driver_cleanup
);
788 void __exit
ifxusb_pcd_driver_cleanup(void)
790 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
791 platform_device_unregister(&ifxusb_device
);
792 platform_driver_unregister(&ifxusb_driver
);
793 IFX_PRINT("%s module removed\n", ifxusb_pcd_driver_name
);
795 module_exit(ifxusb_pcd_driver_cleanup
);
797 MODULE_DESCRIPTION(USB_DRIVER_DESC
);
798 MODULE_AUTHOR("Lantiq");
799 MODULE_LICENSE("GPL");
803 // Parameters set when loaded
804 //static long dbg_lvl =0xFFFFFFFF;
805 static long dbg_lvl
=0;
806 static short dma_burst_size
=-1;
807 static short speed
=-1;
808 static long data_fifo_size
=-1;
810 static long rx_fifo_size
=-1;
812 static long tx_fifo_size_00
=-1;
813 static long tx_fifo_size_01
=-1;
814 static long tx_fifo_size_02
=-1;
815 static long tx_fifo_size_03
=-1;
816 static long tx_fifo_size_04
=-1;
817 static long tx_fifo_size_05
=-1;
818 static long tx_fifo_size_06
=-1;
819 static long tx_fifo_size_07
=-1;
820 static long tx_fifo_size_08
=-1;
821 static long tx_fifo_size_09
=-1;
822 static long tx_fifo_size_10
=-1;
823 static long tx_fifo_size_11
=-1;
824 static long tx_fifo_size_12
=-1;
825 static long tx_fifo_size_13
=-1;
826 static long tx_fifo_size_14
=-1;
827 static long tx_fifo_size_15
=-1;
828 static short thr_ctl
=-1;
829 static long tx_thr_length
=-1;
830 static long rx_thr_length
=-1;
832 static long nperio_tx_fifo_size
=-1;
833 static long perio_tx_fifo_size_01
=-1;
834 static long perio_tx_fifo_size_02
=-1;
835 static long perio_tx_fifo_size_03
=-1;
836 static long perio_tx_fifo_size_04
=-1;
837 static long perio_tx_fifo_size_05
=-1;
838 static long perio_tx_fifo_size_06
=-1;
839 static long perio_tx_fifo_size_07
=-1;
840 static long perio_tx_fifo_size_08
=-1;
841 static long perio_tx_fifo_size_09
=-1;
842 static long perio_tx_fifo_size_10
=-1;
843 static long perio_tx_fifo_size_11
=-1;
844 static long perio_tx_fifo_size_12
=-1;
845 static long perio_tx_fifo_size_13
=-1;
846 static long perio_tx_fifo_size_14
=-1;
847 static long perio_tx_fifo_size_15
=-1;
849 static short dev_endpoints
=-1;
853 static long rx_fifo_size
=-1;
854 static long nperio_tx_fifo_size
=-1;
855 static long perio_tx_fifo_size
=-1;
856 static short host_channels
=-1;
859 static long max_transfer_size
=-1;
860 static long max_packet_count
=-1;
861 static long phy_utmi_width
=-1;
862 static long turn_around_time_hs
=-1;
863 static long turn_around_time_fs
=-1;
864 static long timeout_cal_hs
=-1;
865 static long timeout_cal_fs
=-1;
868 \brief Parsing the parameters taken when module load
870 static void parse_parms(void)
873 ifxusb_params_t
*params
;
874 IFX_DEBUGPL(DBG_ENTRY
, "%s() %d\n", __func__
, __LINE__
);
877 params
=&ifxusb_module_params_h
;
881 params
=&ifxusb_module_params_d
;
884 switch(dma_burst_size
)
891 params
->dma_burst_size
=dma_burst_size
;
894 #if defined(__IS_VR9__)
897 unsigned int partnum
;
898 chipid
=*((volatile uint32_t *)IFX_MPS_CHIPID
);
899 partnum
=(chipid
&0x0FFFF000)>>12;
902 case 0x000B: //VRX288_A2x
903 case 0x000E: //VRX282_A2x
904 case 0x000C: //VRX268_A2x
905 case 0x000D: //GRX288_A2x
906 params
->dma_burst_size
=default_param_dma_burst_size_n
;
909 params
->dma_burst_size
=default_param_dma_burst_size
;
911 printk(KERN_INFO
"Chip Version :%04x BurstSize=%d\n",partnum
,params
->dma_burst_size
);
914 params
->dma_burst_size
=default_param_dma_burst_size
;
918 if(speed
==0 || speed
==1)
921 params
->speed
=default_param_speed
;
923 if(max_transfer_size
>=2048 && max_transfer_size
<=65535)
924 params
->max_transfer_size
=max_transfer_size
;
926 params
->max_transfer_size
=default_param_max_transfer_size
;
928 if(max_packet_count
>=15 && max_packet_count
<=511)
929 params
->max_packet_count
=max_packet_count
;
931 params
->max_packet_count
=default_param_max_packet_count
;
933 switch(phy_utmi_width
)
937 params
->phy_utmi_width
=phy_utmi_width
;
940 params
->phy_utmi_width
=default_param_phy_utmi_width
;
943 if(turn_around_time_hs
>=0 && turn_around_time_hs
<=7)
944 params
->turn_around_time_hs
=turn_around_time_hs
;
946 params
->turn_around_time_hs
=default_param_turn_around_time_hs
;
948 if(turn_around_time_fs
>=0 && turn_around_time_fs
<=7)
949 params
->turn_around_time_fs
=turn_around_time_fs
;
951 params
->turn_around_time_fs
=default_param_turn_around_time_fs
;
953 if(timeout_cal_hs
>=0 && timeout_cal_hs
<=7)
954 params
->timeout_cal_hs
=timeout_cal_hs
;
956 params
->timeout_cal_hs
=default_param_timeout_cal_hs
;
958 if(timeout_cal_fs
>=0 && timeout_cal_fs
<=7)
959 params
->timeout_cal_fs
=timeout_cal_fs
;
961 params
->timeout_cal_fs
=default_param_timeout_cal_fs
;
963 if(data_fifo_size
>=32 && data_fifo_size
<=32768)
964 params
->data_fifo_size
=data_fifo_size
;
966 params
->data_fifo_size
=default_param_data_fifo_size
;
969 if(host_channels
>=1 && host_channels
<=16)
970 params
->host_channels
=host_channels
;
972 params
->host_channels
=default_param_host_channels
;
974 if(rx_fifo_size
>=16 && rx_fifo_size
<=32768)
975 params
->rx_fifo_size
=rx_fifo_size
;
977 params
->rx_fifo_size
=default_param_rx_fifo_size
;
979 if(nperio_tx_fifo_size
>=16 && nperio_tx_fifo_size
<=32768)
980 params
->nperio_tx_fifo_size
=nperio_tx_fifo_size
;
982 params
->nperio_tx_fifo_size
=default_param_nperio_tx_fifo_size
;
984 if(perio_tx_fifo_size
>=16 && perio_tx_fifo_size
<=32768)
985 params
->perio_tx_fifo_size
=perio_tx_fifo_size
;
987 params
->perio_tx_fifo_size
=default_param_perio_tx_fifo_size
;
991 if(rx_fifo_size
>=16 && rx_fifo_size
<=32768)
992 params
->rx_fifo_size
=rx_fifo_size
;
994 params
->rx_fifo_size
=default_param_rx_fifo_size
;
996 if(tx_fifo_size_00
>=16 && tx_fifo_size_00
<=32768)
997 params
->tx_fifo_size
[ 0]=tx_fifo_size_00
;
999 params
->tx_fifo_size
[ 0]=default_param_tx_fifo_size_00
;
1000 if(tx_fifo_size_01
>=0 && tx_fifo_size_01
<=32768)
1001 params
->tx_fifo_size
[ 1]=tx_fifo_size_01
;
1003 params
->tx_fifo_size
[ 1]=default_param_tx_fifo_size_01
;
1004 if(tx_fifo_size_02
>=0 && tx_fifo_size_02
<=32768)
1005 params
->tx_fifo_size
[ 2]=tx_fifo_size_02
;
1007 params
->tx_fifo_size
[ 2]=default_param_tx_fifo_size_02
;
1008 if(tx_fifo_size_03
>=0 && tx_fifo_size_03
<=32768)
1009 params
->tx_fifo_size
[ 3]=tx_fifo_size_03
;
1011 params
->tx_fifo_size
[ 3]=default_param_tx_fifo_size_03
;
1012 if(tx_fifo_size_04
>=0 && tx_fifo_size_04
<=32768)
1013 params
->tx_fifo_size
[ 4]=tx_fifo_size_04
;
1015 params
->tx_fifo_size
[ 4]=default_param_tx_fifo_size_04
;
1016 if(tx_fifo_size_05
>=0 && tx_fifo_size_05
<=32768)
1017 params
->tx_fifo_size
[ 5]=tx_fifo_size_05
;
1019 params
->tx_fifo_size
[ 5]=default_param_tx_fifo_size_05
;
1020 if(tx_fifo_size_06
>=0 && tx_fifo_size_06
<=32768)
1021 params
->tx_fifo_size
[ 6]=tx_fifo_size_06
;
1023 params
->tx_fifo_size
[ 6]=default_param_tx_fifo_size_06
;
1024 if(tx_fifo_size_07
>=0 && tx_fifo_size_07
<=32768)
1025 params
->tx_fifo_size
[ 7]=tx_fifo_size_07
;
1027 params
->tx_fifo_size
[ 7]=default_param_tx_fifo_size_07
;
1028 if(tx_fifo_size_08
>=0 && tx_fifo_size_08
<=32768)
1029 params
->tx_fifo_size
[ 8]=tx_fifo_size_08
;
1031 params
->tx_fifo_size
[ 8]=default_param_tx_fifo_size_08
;
1032 if(tx_fifo_size_09
>=0 && tx_fifo_size_09
<=32768)
1033 params
->tx_fifo_size
[ 9]=tx_fifo_size_09
;
1035 params
->tx_fifo_size
[ 9]=default_param_tx_fifo_size_09
;
1036 if(tx_fifo_size_10
>=0 && tx_fifo_size_10
<=32768)
1037 params
->tx_fifo_size
[10]=tx_fifo_size_10
;
1039 params
->tx_fifo_size
[10]=default_param_tx_fifo_size_10
;
1040 if(tx_fifo_size_11
>=0 && tx_fifo_size_11
<=32768)
1041 params
->tx_fifo_size
[11]=tx_fifo_size_11
;
1043 params
->tx_fifo_size
[11]=default_param_tx_fifo_size_11
;
1044 if(tx_fifo_size_12
>=0 && tx_fifo_size_12
<=32768)
1045 params
->tx_fifo_size
[12]=tx_fifo_size_12
;
1047 params
->tx_fifo_size
[12]=default_param_tx_fifo_size_12
;
1048 if(tx_fifo_size_13
>=0 && tx_fifo_size_13
<=32768)
1049 params
->tx_fifo_size
[13]=tx_fifo_size_13
;
1051 params
->tx_fifo_size
[13]=default_param_tx_fifo_size_13
;
1052 if(tx_fifo_size_14
>=0 && tx_fifo_size_14
<=32768)
1053 params
->tx_fifo_size
[14]=tx_fifo_size_14
;
1055 params
->tx_fifo_size
[14]=default_param_tx_fifo_size_14
;
1056 if(tx_fifo_size_15
>=0 && tx_fifo_size_15
<=32768)
1057 params
->tx_fifo_size
[15]=tx_fifo_size_15
;
1059 params
->tx_fifo_size
[15]=default_param_tx_fifo_size_15
;
1060 if(thr_ctl
==0 || thr_ctl
==1)
1061 params
->thr_ctl
=thr_ctl
;
1063 params
->thr_ctl
=default_param_thr_ctl
;
1064 if(tx_thr_length
>=16 && tx_thr_length
<=511)
1065 params
->tx_thr_length
=tx_thr_length
;
1067 params
->tx_thr_length
=default_param_tx_thr_length
;
1068 if(rx_thr_length
>=16 && rx_thr_length
<=511)
1069 params
->rx_thr_length
=rx_thr_length
;
1071 params
->rx_thr_length
=default_param_rx_thr_length
;
1072 #else //__DED_FIFO__
1073 if(nperio_tx_fifo_size
>=16 && nperio_tx_fifo_size
<=32768)
1074 params
->tx_fifo_size
[ 0]=nperio_tx_fifo_size
;
1076 params
->tx_fifo_size
[ 0]=default_param_nperio_tx_fifo_size
;
1077 if(perio_tx_fifo_size_01
>=0 && perio_tx_fifo_size_01
<=32768)
1078 params
->tx_fifo_size
[ 1]=perio_tx_fifo_size_01
;
1080 params
->tx_fifo_size
[ 1]=default_param_perio_tx_fifo_size_01
;
1081 if(perio_tx_fifo_size_02
>=0 && perio_tx_fifo_size_02
<=32768)
1082 params
->tx_fifo_size
[ 2]=perio_tx_fifo_size_02
;
1084 params
->tx_fifo_size
[ 2]=default_param_perio_tx_fifo_size_02
;
1085 if(perio_tx_fifo_size_03
>=0 && perio_tx_fifo_size_03
<=32768)
1086 params
->tx_fifo_size
[ 3]=perio_tx_fifo_size_03
;
1088 params
->tx_fifo_size
[ 3]=default_param_perio_tx_fifo_size_03
;
1089 if(perio_tx_fifo_size_04
>=0 && perio_tx_fifo_size_04
<=32768)
1090 params
->tx_fifo_size
[ 4]=perio_tx_fifo_size_04
;
1092 params
->tx_fifo_size
[ 4]=default_param_perio_tx_fifo_size_04
;
1093 if(perio_tx_fifo_size_05
>=0 && perio_tx_fifo_size_05
<=32768)
1094 params
->tx_fifo_size
[ 5]=perio_tx_fifo_size_05
;
1096 params
->tx_fifo_size
[ 5]=default_param_perio_tx_fifo_size_05
;
1097 if(perio_tx_fifo_size_06
>=0 && perio_tx_fifo_size_06
<=32768)
1098 params
->tx_fifo_size
[ 6]=perio_tx_fifo_size_06
;
1100 params
->tx_fifo_size
[ 6]=default_param_perio_tx_fifo_size_06
;
1101 if(perio_tx_fifo_size_07
>=0 && perio_tx_fifo_size_07
<=32768)
1102 params
->tx_fifo_size
[ 7]=perio_tx_fifo_size_07
;
1104 params
->tx_fifo_size
[ 7]=default_param_perio_tx_fifo_size_07
;
1105 if(perio_tx_fifo_size_08
>=0 && perio_tx_fifo_size_08
<=32768)
1106 params
->tx_fifo_size
[ 8]=perio_tx_fifo_size_08
;
1108 params
->tx_fifo_size
[ 8]=default_param_perio_tx_fifo_size_08
;
1109 if(perio_tx_fifo_size_09
>=0 && perio_tx_fifo_size_09
<=32768)
1110 params
->tx_fifo_size
[ 9]=perio_tx_fifo_size_09
;
1112 params
->tx_fifo_size
[ 9]=default_param_perio_tx_fifo_size_09
;
1113 if(perio_tx_fifo_size_10
>=0 && perio_tx_fifo_size_10
<=32768)
1114 params
->tx_fifo_size
[10]=perio_tx_fifo_size_10
;
1116 params
->tx_fifo_size
[10]=default_param_perio_tx_fifo_size_10
;
1117 if(perio_tx_fifo_size_11
>=0 && perio_tx_fifo_size_11
<=32768)
1118 params
->tx_fifo_size
[11]=perio_tx_fifo_size_11
;
1120 params
->tx_fifo_size
[11]=default_param_perio_tx_fifo_size_11
;
1121 if(perio_tx_fifo_size_12
>=0 && perio_tx_fifo_size_12
<=32768)
1122 params
->tx_fifo_size
[12]=perio_tx_fifo_size_12
;
1124 params
->tx_fifo_size
[12]=default_param_perio_tx_fifo_size_12
;
1125 if(perio_tx_fifo_size_13
>=0 && perio_tx_fifo_size_13
<=32768)
1126 params
->tx_fifo_size
[13]=perio_tx_fifo_size_13
;
1128 params
->tx_fifo_size
[13]=default_param_perio_tx_fifo_size_13
;
1129 if(perio_tx_fifo_size_14
>=0 && perio_tx_fifo_size_14
<=32768)
1130 params
->tx_fifo_size
[14]=perio_tx_fifo_size_14
;
1132 params
->tx_fifo_size
[14]=default_param_perio_tx_fifo_size_14
;
1133 if(perio_tx_fifo_size_15
>=0 && perio_tx_fifo_size_15
<=32768)
1134 params
->tx_fifo_size
[15]=perio_tx_fifo_size_15
;
1136 params
->tx_fifo_size
[15]=default_param_perio_tx_fifo_size_15
;
1137 #endif //__DED_FIFO__
1138 #endif //__IS_DEVICE__
1147 module_param(dbg_lvl
, long, 0444);
1148 MODULE_PARM_DESC(dbg_lvl
, "Debug level.");
1150 module_param(dma_burst_size
, short, 0444);
1151 MODULE_PARM_DESC(dma_burst_size
, "DMA Burst Size 0, 1, 4, 8, 16");
1153 module_param(speed
, short, 0444);
1154 MODULE_PARM_DESC(speed
, "Speed 0=High Speed 1=Full Speed");
1156 module_param(data_fifo_size
, long, 0444);
1157 MODULE_PARM_DESC(data_fifo_size
, "Total number of words in the data FIFO memory 32-32768");
1159 #ifdef __IS_DEVICE__
1160 module_param(rx_fifo_size
, long, 0444);
1161 MODULE_PARM_DESC(rx_fifo_size
, "Number of words in the Rx FIFO 16-32768");
1164 module_param(tx_fifo_size_00
, long, 0444);
1165 MODULE_PARM_DESC(tx_fifo_size_00
, "Number of words in the Tx FIFO #00 16-32768");
1166 module_param(tx_fifo_size_01
, long, 0444);
1167 MODULE_PARM_DESC(tx_fifo_size_01
, "Number of words in the Tx FIFO #01 0-32768");
1168 module_param(tx_fifo_size_02
, long, 0444);
1169 MODULE_PARM_DESC(tx_fifo_size_02
, "Number of words in the Tx FIFO #02 0-32768");
1170 module_param(tx_fifo_size_03
, long, 0444);
1171 MODULE_PARM_DESC(tx_fifo_size_03
, "Number of words in the Tx FIFO #03 0-32768");
1172 module_param(tx_fifo_size_04
, long, 0444);
1173 MODULE_PARM_DESC(tx_fifo_size_04
, "Number of words in the Tx FIFO #04 0-32768");
1174 module_param(tx_fifo_size_05
, long, 0444);
1175 MODULE_PARM_DESC(tx_fifo_size_05
, "Number of words in the Tx FIFO #05 0-32768");
1176 module_param(tx_fifo_size_06
, long, 0444);
1177 MODULE_PARM_DESC(tx_fifo_size_06
, "Number of words in the Tx FIFO #06 0-32768");
1178 module_param(tx_fifo_size_07
, long, 0444);
1179 MODULE_PARM_DESC(tx_fifo_size_07
, "Number of words in the Tx FIFO #07 0-32768");
1180 module_param(tx_fifo_size_08
, long, 0444);
1181 MODULE_PARM_DESC(tx_fifo_size_08
, "Number of words in the Tx FIFO #08 0-32768");
1182 module_param(tx_fifo_size_09
, long, 0444);
1183 MODULE_PARM_DESC(tx_fifo_size_09
, "Number of words in the Tx FIFO #09 0-32768");
1184 module_param(tx_fifo_size_10
, long, 0444);
1185 MODULE_PARM_DESC(tx_fifo_size_10
, "Number of words in the Tx FIFO #10 0-32768");
1186 module_param(tx_fifo_size_11
, long, 0444);
1187 MODULE_PARM_DESC(tx_fifo_size_11
, "Number of words in the Tx FIFO #11 0-32768");
1188 module_param(tx_fifo_size_12
, long, 0444);
1189 MODULE_PARM_DESC(tx_fifo_size_12
, "Number of words in the Tx FIFO #12 0-32768");
1190 module_param(tx_fifo_size_13
, long, 0444);
1191 MODULE_PARM_DESC(tx_fifo_size_13
, "Number of words in the Tx FIFO #13 0-32768");
1192 module_param(tx_fifo_size_14
, long, 0444);
1193 MODULE_PARM_DESC(tx_fifo_size_14
, "Number of words in the Tx FIFO #14 0-32768");
1194 module_param(tx_fifo_size_15
, long, 0444);
1195 MODULE_PARM_DESC(tx_fifo_size_15
, "Number of words in the Tx FIFO #15 0-32768");
1197 module_param(thr_ctl
, short, 0444);
1198 MODULE_PARM_DESC(thr_ctl
, "0=Without 1=With Theshold Ctrl");
1200 module_param(tx_thr_length
, long, 0444);
1201 MODULE_PARM_DESC(tx_thr_length
, "TX Threshold length");
1203 module_param(rx_thr_length
, long, 0444);
1204 MODULE_PARM_DESC(rx_thr_length
, "RX Threshold length");
1207 module_param(nperio_tx_fifo_size
, long, 0444);
1208 MODULE_PARM_DESC(nperio_tx_fifo_size
, "Number of words in the non-periodic Tx FIFO 16-32768");
1210 module_param(perio_tx_fifo_size_01
, long, 0444);
1211 MODULE_PARM_DESC(perio_tx_fifo_size_01
, "Number of words in the periodic Tx FIFO #01 0-32768");
1212 module_param(perio_tx_fifo_size_02
, long, 0444);
1213 MODULE_PARM_DESC(perio_tx_fifo_size_02
, "Number of words in the periodic Tx FIFO #02 0-32768");
1214 module_param(perio_tx_fifo_size_03
, long, 0444);
1215 MODULE_PARM_DESC(perio_tx_fifo_size_03
, "Number of words in the periodic Tx FIFO #03 0-32768");
1216 module_param(perio_tx_fifo_size_04
, long, 0444);
1217 MODULE_PARM_DESC(perio_tx_fifo_size_04
, "Number of words in the periodic Tx FIFO #04 0-32768");
1218 module_param(perio_tx_fifo_size_05
, long, 0444);
1219 MODULE_PARM_DESC(perio_tx_fifo_size_05
, "Number of words in the periodic Tx FIFO #05 0-32768");
1220 module_param(perio_tx_fifo_size_06
, long, 0444);
1221 MODULE_PARM_DESC(perio_tx_fifo_size_06
, "Number of words in the periodic Tx FIFO #06 0-32768");
1222 module_param(perio_tx_fifo_size_07
, long, 0444);
1223 MODULE_PARM_DESC(perio_tx_fifo_size_07
, "Number of words in the periodic Tx FIFO #07 0-32768");
1224 module_param(perio_tx_fifo_size_08
, long, 0444);
1225 MODULE_PARM_DESC(perio_tx_fifo_size_08
, "Number of words in the periodic Tx FIFO #08 0-32768");
1226 module_param(perio_tx_fifo_size_09
, long, 0444);
1227 MODULE_PARM_DESC(perio_tx_fifo_size_09
, "Number of words in the periodic Tx FIFO #09 0-32768");
1228 module_param(perio_tx_fifo_size_10
, long, 0444);
1229 MODULE_PARM_DESC(perio_tx_fifo_size_10
, "Number of words in the periodic Tx FIFO #10 0-32768");
1230 module_param(perio_tx_fifo_size_11
, long, 0444);
1231 MODULE_PARM_DESC(perio_tx_fifo_size_11
, "Number of words in the periodic Tx FIFO #11 0-32768");
1232 module_param(perio_tx_fifo_size_12
, long, 0444);
1233 MODULE_PARM_DESC(perio_tx_fifo_size_12
, "Number of words in the periodic Tx FIFO #12 0-32768");
1234 module_param(perio_tx_fifo_size_13
, long, 0444);
1235 MODULE_PARM_DESC(perio_tx_fifo_size_13
, "Number of words in the periodic Tx FIFO #13 0-32768");
1236 module_param(perio_tx_fifo_size_14
, long, 0444);
1237 MODULE_PARM_DESC(perio_tx_fifo_size_14
, "Number of words in the periodic Tx FIFO #14 0-32768");
1238 module_param(perio_tx_fifo_size_15
, long, 0444);
1239 MODULE_PARM_DESC(perio_tx_fifo_size_15
, "Number of words in the periodic Tx FIFO #15 0-32768");
1240 #endif//__DED_FIFO__
1241 module_param(dev_endpoints
, short, 0444);
1242 MODULE_PARM_DESC(dev_endpoints
, "The number of endpoints in addition to EP0 available for device mode 1-15");
1246 module_param(rx_fifo_size
, long, 0444);
1247 MODULE_PARM_DESC(rx_fifo_size
, "Number of words in the Rx FIFO 16-32768");
1249 module_param(nperio_tx_fifo_size
, long, 0444);
1250 MODULE_PARM_DESC(nperio_tx_fifo_size
, "Number of words in the non-periodic Tx FIFO 16-32768");
1252 module_param(perio_tx_fifo_size
, long, 0444);
1253 MODULE_PARM_DESC(perio_tx_fifo_size
, "Number of words in the host periodic Tx FIFO 16-32768");
1255 module_param(host_channels
, short, 0444);
1256 MODULE_PARM_DESC(host_channels
, "The number of host channel registers to use 1-16");
1259 module_param(max_transfer_size
, long, 0444);
1260 MODULE_PARM_DESC(max_transfer_size
, "The maximum transfer size supported in bytes 2047-65535");
1262 module_param(max_packet_count
, long, 0444);
1263 MODULE_PARM_DESC(max_packet_count
, "The maximum number of packets in a transfer 15-511");
1265 module_param(phy_utmi_width
, long, 0444);
1266 MODULE_PARM_DESC(phy_utmi_width
, "Specifies the UTMI+ Data Width 8 or 16 bits");
1268 module_param(turn_around_time_hs
, long, 0444);
1269 MODULE_PARM_DESC(turn_around_time_hs
, "Turn-Around time for HS");
1271 module_param(turn_around_time_fs
, long, 0444);
1272 MODULE_PARM_DESC(turn_around_time_fs
, "Turn-Around time for FS");
1274 module_param(timeout_cal_hs
, long, 0444);
1275 MODULE_PARM_DESC(timeout_cal_hs
, "Timeout Cal for HS");
1277 module_param(timeout_cal_fs
, long, 0444);
1278 MODULE_PARM_DESC(timeout_cal_fs
, "Timeout Cal for FS");