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;
311 np = of_find_compatible_node(NULL, NULL, "lantiq,ifxhcd-danube");
312 #elif defined __IS_AMAZON_SE__
313 np = of_find_compatible_node(NULL, NULL, "lantiq,ifxhcd-ase");
314 #elif defined __IS_AR9__
315 np = of_find_compatible_node(NULL, NULL, "lantiq,ifxhcd-arx100");
316 #elif defined __IS_VR9__
317 np = of_find_compatible_node(NULL, NULL, "lantiq,ifxhcd-xrx200");
318 #elif defined __IS_AR10__
319 np = of_find_compatible_node(NULL, NULL, "lantiq,ifxhcd-arx300");
322 dev_err(&_pdev->dev, "failed to find hcd device node\n");
325 of_property_read_u32(np, "lantiq,portmask", &port_mask);
326 // Parsing and store the parameters
327 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
331 #if defined(__DO_OC_INT__)
334 #if defined(__IS_DUAL__)
335 oc_int_id=&ifxusb_hcd_1;
336 oc_int_id_1=&ifxusb_hcd_1;
337 oc_int_id_2=&ifxusb_hcd_2;
339 oc_int_id=&ifxusb_hcd;
344 #if defined(__IS_DUAL__)
345 memset(&ifxusb_hcd_1, 0, sizeof(ifxhcd_hcd_t));
346 memset(&ifxusb_hcd_2, 0, sizeof(ifxhcd_hcd_t));
348 ifxusb_hcd_1.core_if.core_no=0;
349 ifxusb_hcd_2.core_if.core_no=1;
350 ifxusb_hcd_1.core_if.core_name=(char *)ifxusb_hcd_name_1;
351 ifxusb_hcd_2.core_if.core_name=(char *)ifxusb_hcd_name_2;
353 ifxusb_hcd_1.dev=&_pdev->dev;
354 ifxusb_hcd_2.dev=&_pdev->dev;
356 if (port_mask & 0x1) {
357 retval = ifxusb_driver_probe_h(&ifxusb_hcd_1,
360 IFXUSB1_FIFOMEM_BASE,
364 goto ifxusb_driver_probe_fail;
367 if (port_mask & 0x2) {
368 retval = ifxusb_driver_probe_h(&ifxusb_hcd_2,
371 IFXUSB2_FIFOMEM_BASE,
375 goto ifxusb_driver_probe_fail;
377 #elif defined(__IS_FIRST__)
378 memset(&ifxusb_hcd, 0, sizeof(ifxhcd_hcd_t));
380 ifxusb_hcd.core_if.core_no=0;
381 ifxusb_hcd.core_if.core_name=(char *)ifxusb_hcd_name;
383 ifxusb_hcd.dev=&_pdev->dev;
385 retval = ifxusb_driver_probe_h(&ifxusb_hcd,
388 IFXUSB1_FIFOMEM_BASE,
392 goto ifxusb_driver_probe_fail;
394 #elif defined(__IS_SECOND__)
395 memset(&ifxusb_hcd, 0, sizeof(ifxhcd_hcd_t));
397 ifxusb_hcd.core_if.core_no=1;
398 ifxusb_hcd.core_if.core_name=(char *)ifxusb_hcd_name;
400 ifxusb_hcd.dev=&_pdev->dev;
402 retval = ifxusb_driver_probe_h(&ifxusb_hcd,
405 IFXUSB2_FIFOMEM_BASE,
409 goto ifxusb_driver_probe_fail;
412 memset(&ifxusb_hcd, 0, sizeof(ifxhcd_hcd_t));
414 ifxusb_hcd.core_if.core_no=0;
415 ifxusb_hcd.core_if.core_name=(char *)ifxusb_hcd_name;
417 ifxusb_hcd.dev=&_pdev->dev;
419 retval = ifxusb_driver_probe_h(&ifxusb_hcd,
426 goto ifxusb_driver_probe_fail;
431 memset(&ifxusb_pcd, 0, sizeof(ifxpcd_pcd_t));
432 ifxusb_pcd.core_if.core_name=(char *)&ifxusb_pcd_name[0];
434 ifxusb_pcd.dev=&_pdev->dev;
436 #if defined(__IS_FIRST__)
437 ifxusb_pcd.core_if.core_no=0;
438 retval = ifxusb_driver_probe_d(&ifxusb_pcd,
441 IFXUSB1_FIFOMEM_BASE,
444 #elif defined(__IS_SECOND__)
445 ifxusb_pcd.core_if.core_no=1;
446 retval = ifxusb_driver_probe_d(&ifxusb_pcd,
449 IFXUSB2_FIFOMEM_BASE,
453 ifxusb_pcd.core_if.core_no=0;
454 retval = ifxusb_driver_probe_d(&ifxusb_pcd,
462 goto ifxusb_driver_probe_fail;
466 ifxusb_attr_create_h(&_pdev->dev);
468 ifxusb_attr_create_d(&_pdev->dev);
471 gpio_count = of_gpio_count(np);
473 enum of_gpio_flags flags;
474 int gpio = of_get_gpio_flags(np, --gpio_count, &flags);
475 if (gpio_request(gpio, "usb"))
477 dev_info(&_pdev->dev, "requested GPIO %d\n", gpio);
478 gpio_direction_output(gpio, (flags & OF_GPIO_ACTIVE_LOW) ? (0) : (1));
484 ifxusb_driver_probe_fail:
485 ifxusb_driver_remove(_pdev);
489 static struct resource ifxusb_device_resources[] =
491 #if defined(__IS_DUAL__)
492 [0] = { .start = IFXUSB1_IRQ,
493 .flags = IORESOURCE_IRQ,
495 [1] = { .start = IFXUSB1_IOMEM_BASE,
496 .end = IFXUSB1_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
497 .flags = IORESOURCE_MEM,
499 [2] = { .start = IFXUSB2_IRQ,
500 .flags = IORESOURCE_IRQ,
502 [3] = { .start = IFXUSB2_IOMEM_BASE,
503 .end = IFXUSB2_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
504 .flags = IORESOURCE_MEM,
506 [4] = { .start = IFXUSB1_FIFOMEM_BASE,
507 .end = IFXUSB1_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
508 .flags = IORESOURCE_MEM,
510 [5] = { .start = IFXUSB2_FIFOMEM_BASE,
511 .end = IFXUSB2_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
512 .flags = IORESOURCE_MEM,
514 [6] = { .start = IFXUSB1_FIFODBG_BASE,
515 .end = IFXUSB1_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
516 .flags = IORESOURCE_MEM,
518 [7] = { .start = IFXUSB2_FIFODBG_BASE,
519 .end = IFXUSB2_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
520 .flags = IORESOURCE_MEM,
522 #elif defined(__IS_FIRST__)
523 [0] = { .start = IFXUSB1_IRQ,
524 .flags = IORESOURCE_IRQ,
526 [1] = { .start = IFXUSB1_IOMEM_BASE,
527 .end = IFXUSB1_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
528 .flags = IORESOURCE_MEM,
530 [2] = { .start = IFXUSB1_FIFOMEM_BASE,
531 .end = IFXUSB1_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
532 .flags = IORESOURCE_MEM,
534 [3] = { .start = IFXUSB1_FIFODBG_BASE,
535 .end = IFXUSB1_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
536 .flags = IORESOURCE_MEM,
538 #elif defined(__IS_SECOND__)
539 [0] = { .start = IFXUSB2_IRQ,
540 .flags = IORESOURCE_IRQ,
542 [1] = { .start = IFXUSB2_IOMEM_BASE,
543 .end = IFXUSB2_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
544 .flags = IORESOURCE_MEM,
546 [2] = { .start = IFXUSB2_FIFOMEM_BASE,
547 .end = IFXUSB2_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
548 .flags = IORESOURCE_MEM,
550 [3] = { .start = IFXUSB2_FIFODBG_BASE,
551 .end = IFXUSB2_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
552 .flags = IORESOURCE_MEM,
555 [0] = { .start = IFXUSB_IRQ,
556 .flags = IORESOURCE_IRQ,
558 [1] = { .start = IFXUSB_IOMEM_BASE,
559 .end = IFXUSB_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
560 .flags = IORESOURCE_MEM,
562 [2] = { .start = IFXUSB_FIFOMEM_BASE,
563 .end = IFXUSB_FIFOMEM_BASE+IFXUSB_FIFOMEM_SIZE-1,
564 .flags = IORESOURCE_MEM,
566 [3] = { .start = IFXUSB_FIFODBG_BASE,
567 .end = IFXUSB_FIFODBG_BASE+IFXUSB_FIFODBG_SIZE-1,
568 .flags = IORESOURCE_MEM,
573 static u64 ifxusb_dmamask = (u32)0x1fffffff;
575 static void ifxusb_device_release(struct device * dev)
577 IFX_PRINT("IFX USB platform_dev release\n");
581 static struct platform_device ifxusb_device =
586 .release = ifxusb_device_release,
587 .dma_mask = &ifxusb_dmamask,
589 .resource = ifxusb_device_resources,
590 .num_resources = ARRAY_SIZE(ifxusb_device_resources),
595 \brief This function is called when the ifxusb_driver is installed with the insmod command.
597 static struct platform_driver ifxusb_driver = {
598 .probe = ifxusb_driver_probe,
599 .remove = ifxusb_driver_remove,
601 .owner = THIS_MODULE,
603 .name = ifxusb_hcd_driver_name,
605 .name = ifxusb_pcd_driver_name,
611 int __init ifxusb_hcd_driver_init(void)
613 int __init ifxusb_pcd_driver_init(void)
617 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
618 #if defined(__IS_HOST__)
619 IFX_PRINT("%s: version %s\n", ifxusb_hcd_driver_name, IFXUSB_VERSION);
621 IFX_PRINT("%s: version %s\n", ifxusb_pcd_driver_name, IFXUSB_VERSION);
625 #if defined(__IS_TWINPASS__)
626 IFX_PRINT(" OPTION: __IS_TWINPASS__\n");
627 #elif defined(__IS_DANUBE__)
628 IFX_PRINT(" OPTION: __IS_DANUBE__\n");
629 #elif defined(__IS_AMAZON_SE__)
630 IFX_PRINT(" OPTION: __IS_AMAZON_SE__\n");
631 #elif defined(__IS_AR9__)
632 IFX_PRINT(" OPTION: __IS_AR9__\n");
633 #elif defined(__IS_VR9__)
634 IFX_PRINT(" OPTION: __IS_VR9__\n");
635 #elif defined(__IS_AR10__)
636 IFX_PRINT(" OPTION: __IS_AR10__\n");
638 IFX_PRINT(" OPTION: NO PLATFORM DEFINED\n");
642 IFX_PRINT(" OPTION: __UEIP__\n");
645 #ifdef __PHY_LONG_PREEMP__
646 IFX_PRINT(" OPTION: __PHY_LONG_PREEMP__\n");
648 #ifdef __FORCE_USB11__
649 IFX_PRINT(" OPTION: __FORCE_USB11__\n");
651 #ifdef __UNALIGNED_BUF_ADJ__
652 IFX_PRINT(" OPTION: __UNALIGNED_BUF_ADJ__\n");
654 #ifdef __UNALIGNED_BUF_CHK__
655 IFX_PRINT(" OPTION: __UNALIGNED_BUF_CHK__\n");
657 #ifdef __UNALIGNED_BUF_BURST__
658 IFX_PRINT(" OPTION: __UNALIGNED_BUF_BURST__\n");
661 IFX_PRINT(" OPTION: __DEBUG__\n");
663 #ifdef __ENABLE_DUMP__
664 IFX_PRINT(" OPTION: __ENABLE_DUMP__\n");
668 IFX_PRINT(" OPTION: __IS_HOST__\n");
670 IFX_PRINT(" __IS_DUAL__\n");
673 IFX_PRINT(" __IS_FIRST__\n");
676 IFX_PRINT(" __IS_SECOND__\n");
678 #ifdef __WITH_HS_ELECT_TST__
679 IFX_PRINT(" __WITH_HS_ELECT_TST__\n");
682 IFX_PRINT(" __EN_ISOC__\n");
684 #ifdef __EN_ISOC_SPLIT__
685 IFX_PRINT(" __EN_ISOC_SPLIT__\n");
687 #ifdef __EPQD_DESTROY_TIMEOUT__
688 IFX_PRINT(" __EPQD_DESTROY_TIMEOUT__\n");
690 #ifdef __DYN_SOF_INTR__
691 IFX_PRINT(" __DYN_SOF_INTR__\n");
694 IFX_PRINT(" OPTION: __IS_DEVICE__\n");
696 IFX_PRINT(" __DED_INTR__\n");
699 IFX_PRINT(" __DED_FIFO__\n");
702 IFX_PRINT(" __DESC_DMA__\n");
705 IFX_PRINT(" __IS_FIRST__\n");
708 IFX_PRINT(" __IS_SECOND__\n");
710 #ifdef __GADGET_TASKLET_TX__
711 IFX_PRINT(" __GADGET_TASKLET_TX__\n");
713 #ifdef __GADGET_TASKLET_RX__
714 IFX_PRINT(" __GADGET_TASKLET_RX__\n");
716 #ifdef __GADGET_TASKLET_HIGH__
717 IFX_PRINT(" __GADGET_TASKLET_HIGH__\n");
719 #ifdef __DO_PCD_UNLOCK__
720 IFX_PRINT(" __DO_PCD_UNLOCK__\n");
722 #ifdef __GADGET_LED__
723 IFX_PRINT(" __GADGET_LED__\n");
726 #ifdef __ECM_NO_INTR__
727 IFX_PRINT(" __ECM_NO_INTR__\n");
729 #ifdef __NOSWAPINCTRL__
730 IFX_PRINT(" __NOSWAPINCTRL__\n");
732 #ifdef __MAC_ECM_FIX__
733 IFX_PRINT(" __MAC_ECM_FIX__\n");
735 #ifdef __RETAIN_BUF_TX__
736 IFX_PRINT(" __RETAIN_BUF_TX__\n");
738 #ifdef __RETAIN_BUF_RX__
739 IFX_PRINT(" __RETAIN_BUF_RX__\n");
742 IFX_PRINT(" __QUICKNAK__\n");
747 retval = platform_driver_register(&ifxusb_driver);
750 IFX_ERROR("%s retval=%d\n", __func__, retval);
755 ifxusb_device.name = ifxusb_hcd_driver_name;
757 ifxusb_device.name = ifxusb_pcd_driver_name;
760 if (ifxusb_device.dev.parent)
763 retval = platform_device_register(&ifxusb_device);
767 IFX_ERROR("%s retval=%d\n", __func__, retval);
768 platform_driver_unregister(&ifxusb_driver);
775 module_init(ifxusb_hcd_driver_init);
777 module_init(ifxusb_pcd_driver_init);
781 \brief This function is called when the driver is removed from the kernel
782 with the rmmod command. The driver unregisters itself with its bus
786 void __exit ifxusb_hcd_driver_cleanup(void)
788 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
789 platform_device_unregister(&ifxusb_device);
790 platform_driver_unregister(&ifxusb_driver);
791 IFX_PRINT("%s module removed\n", ifxusb_hcd_driver_name);
793 module_exit(ifxusb_hcd_driver_cleanup);
795 void __exit ifxusb_pcd_driver_cleanup(void)
797 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
798 platform_device_unregister(&ifxusb_device);
799 platform_driver_unregister(&ifxusb_driver);
800 IFX_PRINT("%s module removed\n", ifxusb_pcd_driver_name);
802 module_exit(ifxusb_pcd_driver_cleanup);
804 MODULE_DESCRIPTION(USB_DRIVER_DESC);
805 MODULE_AUTHOR("Lantiq");
806 MODULE_LICENSE("GPL");
810 // Parameters set when loaded
811 //static long dbg_lvl =0xFFFFFFFF;
812 static long dbg_lvl =0;
813 static short dma_burst_size =-1;
814 static short speed =-1;
815 static long data_fifo_size =-1;
817 static long rx_fifo_size =-1;
819 static long tx_fifo_size_00 =-1;
820 static long tx_fifo_size_01 =-1;
821 static long tx_fifo_size_02 =-1;
822 static long tx_fifo_size_03 =-1;
823 static long tx_fifo_size_04 =-1;
824 static long tx_fifo_size_05 =-1;
825 static long tx_fifo_size_06 =-1;
826 static long tx_fifo_size_07 =-1;
827 static long tx_fifo_size_08 =-1;
828 static long tx_fifo_size_09 =-1;
829 static long tx_fifo_size_10 =-1;
830 static long tx_fifo_size_11 =-1;
831 static long tx_fifo_size_12 =-1;
832 static long tx_fifo_size_13 =-1;
833 static long tx_fifo_size_14 =-1;
834 static long tx_fifo_size_15 =-1;
835 static short thr_ctl=-1;
836 static long tx_thr_length =-1;
837 static long rx_thr_length =-1;
839 static long nperio_tx_fifo_size =-1;
840 static long perio_tx_fifo_size_01 =-1;
841 static long perio_tx_fifo_size_02 =-1;
842 static long perio_tx_fifo_size_03 =-1;
843 static long perio_tx_fifo_size_04 =-1;
844 static long perio_tx_fifo_size_05 =-1;
845 static long perio_tx_fifo_size_06 =-1;
846 static long perio_tx_fifo_size_07 =-1;
847 static long perio_tx_fifo_size_08 =-1;
848 static long perio_tx_fifo_size_09 =-1;
849 static long perio_tx_fifo_size_10 =-1;
850 static long perio_tx_fifo_size_11 =-1;
851 static long perio_tx_fifo_size_12 =-1;
852 static long perio_tx_fifo_size_13 =-1;
853 static long perio_tx_fifo_size_14 =-1;
854 static long perio_tx_fifo_size_15 =-1;
856 static short dev_endpoints =-1;
860 static long rx_fifo_size =-1;
861 static long nperio_tx_fifo_size =-1;
862 static long perio_tx_fifo_size =-1;
863 static short host_channels =-1;
866 static long max_transfer_size =-1;
867 static long max_packet_count =-1;
868 static long phy_utmi_width =-1;
869 static long turn_around_time_hs =-1;
870 static long turn_around_time_fs =-1;
871 static long timeout_cal_hs =-1;
872 static long timeout_cal_fs =-1;
875 \brief Parsing the parameters taken when module load
877 static void parse_parms(void)
880 ifxusb_params_t *params;
881 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
884 params=&ifxusb_module_params_h;
888 params=&ifxusb_module_params_d;
891 switch(dma_burst_size)
898 params->dma_burst_size=dma_burst_size;
901 #if defined(__IS_VR9__)
904 unsigned int partnum;
905 chipid=*((volatile uint32_t *)IFX_MPS_CHIPID);
906 partnum=(chipid&0x0FFFF000)>>12;
909 case 0x000B: //VRX288_A2x
910 case 0x000E: //VRX282_A2x
911 case 0x000C: //VRX268_A2x
912 case 0x000D: //GRX288_A2x
913 params->dma_burst_size=default_param_dma_burst_size_n;
916 params->dma_burst_size=default_param_dma_burst_size;
918 printk(KERN_INFO "Chip Version :%04x BurstSize=%d\n",partnum,params->dma_burst_size);
921 params->dma_burst_size=default_param_dma_burst_size;
925 if(speed==0 || speed==1)
928 params->speed=default_param_speed;
930 if(max_transfer_size>=2048 && max_transfer_size<=65535)
931 params->max_transfer_size=max_transfer_size;
933 params->max_transfer_size=default_param_max_transfer_size;
935 if(max_packet_count>=15 && max_packet_count<=511)
936 params->max_packet_count=max_packet_count;
938 params->max_packet_count=default_param_max_packet_count;
940 switch(phy_utmi_width)
944 params->phy_utmi_width=phy_utmi_width;
947 params->phy_utmi_width=default_param_phy_utmi_width;
950 if(turn_around_time_hs>=0 && turn_around_time_hs<=7)
951 params->turn_around_time_hs=turn_around_time_hs;
953 params->turn_around_time_hs=default_param_turn_around_time_hs;
955 if(turn_around_time_fs>=0 && turn_around_time_fs<=7)
956 params->turn_around_time_fs=turn_around_time_fs;
958 params->turn_around_time_fs=default_param_turn_around_time_fs;
960 if(timeout_cal_hs>=0 && timeout_cal_hs<=7)
961 params->timeout_cal_hs=timeout_cal_hs;
963 params->timeout_cal_hs=default_param_timeout_cal_hs;
965 if(timeout_cal_fs>=0 && timeout_cal_fs<=7)
966 params->timeout_cal_fs=timeout_cal_fs;
968 params->timeout_cal_fs=default_param_timeout_cal_fs;
970 if(data_fifo_size>=32 && data_fifo_size<=32768)
971 params->data_fifo_size=data_fifo_size;
973 params->data_fifo_size=default_param_data_fifo_size;
976 if(host_channels>=1 && host_channels<=16)
977 params->host_channels=host_channels;
979 params->host_channels=default_param_host_channels;
981 if(rx_fifo_size>=16 && rx_fifo_size<=32768)
982 params->rx_fifo_size=rx_fifo_size;
984 params->rx_fifo_size=default_param_rx_fifo_size;
986 if(nperio_tx_fifo_size>=16 && nperio_tx_fifo_size<=32768)
987 params->nperio_tx_fifo_size=nperio_tx_fifo_size;
989 params->nperio_tx_fifo_size=default_param_nperio_tx_fifo_size;
991 if(perio_tx_fifo_size>=16 && perio_tx_fifo_size<=32768)
992 params->perio_tx_fifo_size=perio_tx_fifo_size;
994 params->perio_tx_fifo_size=default_param_perio_tx_fifo_size;
998 if(rx_fifo_size>=16 && rx_fifo_size<=32768)
999 params->rx_fifo_size=rx_fifo_size;
1001 params->rx_fifo_size=default_param_rx_fifo_size;
1003 if(tx_fifo_size_00>=16 && tx_fifo_size_00<=32768)
1004 params->tx_fifo_size[ 0]=tx_fifo_size_00;
1006 params->tx_fifo_size[ 0]=default_param_tx_fifo_size_00;
1007 if(tx_fifo_size_01>=0 && tx_fifo_size_01<=32768)
1008 params->tx_fifo_size[ 1]=tx_fifo_size_01;
1010 params->tx_fifo_size[ 1]=default_param_tx_fifo_size_01;
1011 if(tx_fifo_size_02>=0 && tx_fifo_size_02<=32768)
1012 params->tx_fifo_size[ 2]=tx_fifo_size_02;
1014 params->tx_fifo_size[ 2]=default_param_tx_fifo_size_02;
1015 if(tx_fifo_size_03>=0 && tx_fifo_size_03<=32768)
1016 params->tx_fifo_size[ 3]=tx_fifo_size_03;
1018 params->tx_fifo_size[ 3]=default_param_tx_fifo_size_03;
1019 if(tx_fifo_size_04>=0 && tx_fifo_size_04<=32768)
1020 params->tx_fifo_size[ 4]=tx_fifo_size_04;
1022 params->tx_fifo_size[ 4]=default_param_tx_fifo_size_04;
1023 if(tx_fifo_size_05>=0 && tx_fifo_size_05<=32768)
1024 params->tx_fifo_size[ 5]=tx_fifo_size_05;
1026 params->tx_fifo_size[ 5]=default_param_tx_fifo_size_05;
1027 if(tx_fifo_size_06>=0 && tx_fifo_size_06<=32768)
1028 params->tx_fifo_size[ 6]=tx_fifo_size_06;
1030 params->tx_fifo_size[ 6]=default_param_tx_fifo_size_06;
1031 if(tx_fifo_size_07>=0 && tx_fifo_size_07<=32768)
1032 params->tx_fifo_size[ 7]=tx_fifo_size_07;
1034 params->tx_fifo_size[ 7]=default_param_tx_fifo_size_07;
1035 if(tx_fifo_size_08>=0 && tx_fifo_size_08<=32768)
1036 params->tx_fifo_size[ 8]=tx_fifo_size_08;
1038 params->tx_fifo_size[ 8]=default_param_tx_fifo_size_08;
1039 if(tx_fifo_size_09>=0 && tx_fifo_size_09<=32768)
1040 params->tx_fifo_size[ 9]=tx_fifo_size_09;
1042 params->tx_fifo_size[ 9]=default_param_tx_fifo_size_09;
1043 if(tx_fifo_size_10>=0 && tx_fifo_size_10<=32768)
1044 params->tx_fifo_size[10]=tx_fifo_size_10;
1046 params->tx_fifo_size[10]=default_param_tx_fifo_size_10;
1047 if(tx_fifo_size_11>=0 && tx_fifo_size_11<=32768)
1048 params->tx_fifo_size[11]=tx_fifo_size_11;
1050 params->tx_fifo_size[11]=default_param_tx_fifo_size_11;
1051 if(tx_fifo_size_12>=0 && tx_fifo_size_12<=32768)
1052 params->tx_fifo_size[12]=tx_fifo_size_12;
1054 params->tx_fifo_size[12]=default_param_tx_fifo_size_12;
1055 if(tx_fifo_size_13>=0 && tx_fifo_size_13<=32768)
1056 params->tx_fifo_size[13]=tx_fifo_size_13;
1058 params->tx_fifo_size[13]=default_param_tx_fifo_size_13;
1059 if(tx_fifo_size_14>=0 && tx_fifo_size_14<=32768)
1060 params->tx_fifo_size[14]=tx_fifo_size_14;
1062 params->tx_fifo_size[14]=default_param_tx_fifo_size_14;
1063 if(tx_fifo_size_15>=0 && tx_fifo_size_15<=32768)
1064 params->tx_fifo_size[15]=tx_fifo_size_15;
1066 params->tx_fifo_size[15]=default_param_tx_fifo_size_15;
1067 if(thr_ctl==0 || thr_ctl==1)
1068 params->thr_ctl=thr_ctl;
1070 params->thr_ctl=default_param_thr_ctl;
1071 if(tx_thr_length>=16 && tx_thr_length<=511)
1072 params->tx_thr_length=tx_thr_length;
1074 params->tx_thr_length=default_param_tx_thr_length;
1075 if(rx_thr_length>=16 && rx_thr_length<=511)
1076 params->rx_thr_length=rx_thr_length;
1078 params->rx_thr_length=default_param_rx_thr_length;
1079 #else //__DED_FIFO__
1080 if(nperio_tx_fifo_size>=16 && nperio_tx_fifo_size<=32768)
1081 params->tx_fifo_size[ 0]=nperio_tx_fifo_size;
1083 params->tx_fifo_size[ 0]=default_param_nperio_tx_fifo_size;
1084 if(perio_tx_fifo_size_01>=0 && perio_tx_fifo_size_01<=32768)
1085 params->tx_fifo_size[ 1]=perio_tx_fifo_size_01;
1087 params->tx_fifo_size[ 1]=default_param_perio_tx_fifo_size_01;
1088 if(perio_tx_fifo_size_02>=0 && perio_tx_fifo_size_02<=32768)
1089 params->tx_fifo_size[ 2]=perio_tx_fifo_size_02;
1091 params->tx_fifo_size[ 2]=default_param_perio_tx_fifo_size_02;
1092 if(perio_tx_fifo_size_03>=0 && perio_tx_fifo_size_03<=32768)
1093 params->tx_fifo_size[ 3]=perio_tx_fifo_size_03;
1095 params->tx_fifo_size[ 3]=default_param_perio_tx_fifo_size_03;
1096 if(perio_tx_fifo_size_04>=0 && perio_tx_fifo_size_04<=32768)
1097 params->tx_fifo_size[ 4]=perio_tx_fifo_size_04;
1099 params->tx_fifo_size[ 4]=default_param_perio_tx_fifo_size_04;
1100 if(perio_tx_fifo_size_05>=0 && perio_tx_fifo_size_05<=32768)
1101 params->tx_fifo_size[ 5]=perio_tx_fifo_size_05;
1103 params->tx_fifo_size[ 5]=default_param_perio_tx_fifo_size_05;
1104 if(perio_tx_fifo_size_06>=0 && perio_tx_fifo_size_06<=32768)
1105 params->tx_fifo_size[ 6]=perio_tx_fifo_size_06;
1107 params->tx_fifo_size[ 6]=default_param_perio_tx_fifo_size_06;
1108 if(perio_tx_fifo_size_07>=0 && perio_tx_fifo_size_07<=32768)
1109 params->tx_fifo_size[ 7]=perio_tx_fifo_size_07;
1111 params->tx_fifo_size[ 7]=default_param_perio_tx_fifo_size_07;
1112 if(perio_tx_fifo_size_08>=0 && perio_tx_fifo_size_08<=32768)
1113 params->tx_fifo_size[ 8]=perio_tx_fifo_size_08;
1115 params->tx_fifo_size[ 8]=default_param_perio_tx_fifo_size_08;
1116 if(perio_tx_fifo_size_09>=0 && perio_tx_fifo_size_09<=32768)
1117 params->tx_fifo_size[ 9]=perio_tx_fifo_size_09;
1119 params->tx_fifo_size[ 9]=default_param_perio_tx_fifo_size_09;
1120 if(perio_tx_fifo_size_10>=0 && perio_tx_fifo_size_10<=32768)
1121 params->tx_fifo_size[10]=perio_tx_fifo_size_10;
1123 params->tx_fifo_size[10]=default_param_perio_tx_fifo_size_10;
1124 if(perio_tx_fifo_size_11>=0 && perio_tx_fifo_size_11<=32768)
1125 params->tx_fifo_size[11]=perio_tx_fifo_size_11;
1127 params->tx_fifo_size[11]=default_param_perio_tx_fifo_size_11;
1128 if(perio_tx_fifo_size_12>=0 && perio_tx_fifo_size_12<=32768)
1129 params->tx_fifo_size[12]=perio_tx_fifo_size_12;
1131 params->tx_fifo_size[12]=default_param_perio_tx_fifo_size_12;
1132 if(perio_tx_fifo_size_13>=0 && perio_tx_fifo_size_13<=32768)
1133 params->tx_fifo_size[13]=perio_tx_fifo_size_13;
1135 params->tx_fifo_size[13]=default_param_perio_tx_fifo_size_13;
1136 if(perio_tx_fifo_size_14>=0 && perio_tx_fifo_size_14<=32768)
1137 params->tx_fifo_size[14]=perio_tx_fifo_size_14;
1139 params->tx_fifo_size[14]=default_param_perio_tx_fifo_size_14;
1140 if(perio_tx_fifo_size_15>=0 && perio_tx_fifo_size_15<=32768)
1141 params->tx_fifo_size[15]=perio_tx_fifo_size_15;
1143 params->tx_fifo_size[15]=default_param_perio_tx_fifo_size_15;
1144 #endif //__DED_FIFO__
1145 #endif //__IS_DEVICE__
1154 module_param(dbg_lvl, long, 0444);
1155 MODULE_PARM_DESC(dbg_lvl, "Debug level.");
1157 module_param(dma_burst_size, short, 0444);
1158 MODULE_PARM_DESC(dma_burst_size, "DMA Burst Size 0, 1, 4, 8, 16");
1160 module_param(speed, short, 0444);
1161 MODULE_PARM_DESC(speed, "Speed 0=High Speed 1=Full Speed");
1163 module_param(data_fifo_size, long, 0444);
1164 MODULE_PARM_DESC(data_fifo_size, "Total number of words in the data FIFO memory 32-32768");
1166 #ifdef __IS_DEVICE__
1167 module_param(rx_fifo_size, long, 0444);
1168 MODULE_PARM_DESC(rx_fifo_size, "Number of words in the Rx FIFO 16-32768");
1171 module_param(tx_fifo_size_00, long, 0444);
1172 MODULE_PARM_DESC(tx_fifo_size_00, "Number of words in the Tx FIFO #00 16-32768");
1173 module_param(tx_fifo_size_01, long, 0444);
1174 MODULE_PARM_DESC(tx_fifo_size_01, "Number of words in the Tx FIFO #01 0-32768");
1175 module_param(tx_fifo_size_02, long, 0444);
1176 MODULE_PARM_DESC(tx_fifo_size_02, "Number of words in the Tx FIFO #02 0-32768");
1177 module_param(tx_fifo_size_03, long, 0444);
1178 MODULE_PARM_DESC(tx_fifo_size_03, "Number of words in the Tx FIFO #03 0-32768");
1179 module_param(tx_fifo_size_04, long, 0444);
1180 MODULE_PARM_DESC(tx_fifo_size_04, "Number of words in the Tx FIFO #04 0-32768");
1181 module_param(tx_fifo_size_05, long, 0444);
1182 MODULE_PARM_DESC(tx_fifo_size_05, "Number of words in the Tx FIFO #05 0-32768");
1183 module_param(tx_fifo_size_06, long, 0444);
1184 MODULE_PARM_DESC(tx_fifo_size_06, "Number of words in the Tx FIFO #06 0-32768");
1185 module_param(tx_fifo_size_07, long, 0444);
1186 MODULE_PARM_DESC(tx_fifo_size_07, "Number of words in the Tx FIFO #07 0-32768");
1187 module_param(tx_fifo_size_08, long, 0444);
1188 MODULE_PARM_DESC(tx_fifo_size_08, "Number of words in the Tx FIFO #08 0-32768");
1189 module_param(tx_fifo_size_09, long, 0444);
1190 MODULE_PARM_DESC(tx_fifo_size_09, "Number of words in the Tx FIFO #09 0-32768");
1191 module_param(tx_fifo_size_10, long, 0444);
1192 MODULE_PARM_DESC(tx_fifo_size_10, "Number of words in the Tx FIFO #10 0-32768");
1193 module_param(tx_fifo_size_11, long, 0444);
1194 MODULE_PARM_DESC(tx_fifo_size_11, "Number of words in the Tx FIFO #11 0-32768");
1195 module_param(tx_fifo_size_12, long, 0444);
1196 MODULE_PARM_DESC(tx_fifo_size_12, "Number of words in the Tx FIFO #12 0-32768");
1197 module_param(tx_fifo_size_13, long, 0444);
1198 MODULE_PARM_DESC(tx_fifo_size_13, "Number of words in the Tx FIFO #13 0-32768");
1199 module_param(tx_fifo_size_14, long, 0444);
1200 MODULE_PARM_DESC(tx_fifo_size_14, "Number of words in the Tx FIFO #14 0-32768");
1201 module_param(tx_fifo_size_15, long, 0444);
1202 MODULE_PARM_DESC(tx_fifo_size_15, "Number of words in the Tx FIFO #15 0-32768");
1204 module_param(thr_ctl, short, 0444);
1205 MODULE_PARM_DESC(thr_ctl, "0=Without 1=With Theshold Ctrl");
1207 module_param(tx_thr_length, long, 0444);
1208 MODULE_PARM_DESC(tx_thr_length, "TX Threshold length");
1210 module_param(rx_thr_length, long, 0444);
1211 MODULE_PARM_DESC(rx_thr_length, "RX Threshold length");
1214 module_param(nperio_tx_fifo_size, long, 0444);
1215 MODULE_PARM_DESC(nperio_tx_fifo_size, "Number of words in the non-periodic Tx FIFO 16-32768");
1217 module_param(perio_tx_fifo_size_01, long, 0444);
1218 MODULE_PARM_DESC(perio_tx_fifo_size_01, "Number of words in the periodic Tx FIFO #01 0-32768");
1219 module_param(perio_tx_fifo_size_02, long, 0444);
1220 MODULE_PARM_DESC(perio_tx_fifo_size_02, "Number of words in the periodic Tx FIFO #02 0-32768");
1221 module_param(perio_tx_fifo_size_03, long, 0444);
1222 MODULE_PARM_DESC(perio_tx_fifo_size_03, "Number of words in the periodic Tx FIFO #03 0-32768");
1223 module_param(perio_tx_fifo_size_04, long, 0444);
1224 MODULE_PARM_DESC(perio_tx_fifo_size_04, "Number of words in the periodic Tx FIFO #04 0-32768");
1225 module_param(perio_tx_fifo_size_05, long, 0444);
1226 MODULE_PARM_DESC(perio_tx_fifo_size_05, "Number of words in the periodic Tx FIFO #05 0-32768");
1227 module_param(perio_tx_fifo_size_06, long, 0444);
1228 MODULE_PARM_DESC(perio_tx_fifo_size_06, "Number of words in the periodic Tx FIFO #06 0-32768");
1229 module_param(perio_tx_fifo_size_07, long, 0444);
1230 MODULE_PARM_DESC(perio_tx_fifo_size_07, "Number of words in the periodic Tx FIFO #07 0-32768");
1231 module_param(perio_tx_fifo_size_08, long, 0444);
1232 MODULE_PARM_DESC(perio_tx_fifo_size_08, "Number of words in the periodic Tx FIFO #08 0-32768");
1233 module_param(perio_tx_fifo_size_09, long, 0444);
1234 MODULE_PARM_DESC(perio_tx_fifo_size_09, "Number of words in the periodic Tx FIFO #09 0-32768");
1235 module_param(perio_tx_fifo_size_10, long, 0444);
1236 MODULE_PARM_DESC(perio_tx_fifo_size_10, "Number of words in the periodic Tx FIFO #10 0-32768");
1237 module_param(perio_tx_fifo_size_11, long, 0444);
1238 MODULE_PARM_DESC(perio_tx_fifo_size_11, "Number of words in the periodic Tx FIFO #11 0-32768");
1239 module_param(perio_tx_fifo_size_12, long, 0444);
1240 MODULE_PARM_DESC(perio_tx_fifo_size_12, "Number of words in the periodic Tx FIFO #12 0-32768");
1241 module_param(perio_tx_fifo_size_13, long, 0444);
1242 MODULE_PARM_DESC(perio_tx_fifo_size_13, "Number of words in the periodic Tx FIFO #13 0-32768");
1243 module_param(perio_tx_fifo_size_14, long, 0444);
1244 MODULE_PARM_DESC(perio_tx_fifo_size_14, "Number of words in the periodic Tx FIFO #14 0-32768");
1245 module_param(perio_tx_fifo_size_15, long, 0444);
1246 MODULE_PARM_DESC(perio_tx_fifo_size_15, "Number of words in the periodic Tx FIFO #15 0-32768");
1247 #endif//__DED_FIFO__
1248 module_param(dev_endpoints, short, 0444);
1249 MODULE_PARM_DESC(dev_endpoints, "The number of endpoints in addition to EP0 available for device mode 1-15");
1253 module_param(rx_fifo_size, long, 0444);
1254 MODULE_PARM_DESC(rx_fifo_size, "Number of words in the Rx FIFO 16-32768");
1256 module_param(nperio_tx_fifo_size, long, 0444);
1257 MODULE_PARM_DESC(nperio_tx_fifo_size, "Number of words in the non-periodic Tx FIFO 16-32768");
1259 module_param(perio_tx_fifo_size, long, 0444);
1260 MODULE_PARM_DESC(perio_tx_fifo_size, "Number of words in the host periodic Tx FIFO 16-32768");
1262 module_param(host_channels, short, 0444);
1263 MODULE_PARM_DESC(host_channels, "The number of host channel registers to use 1-16");
1266 module_param(max_transfer_size, long, 0444);
1267 MODULE_PARM_DESC(max_transfer_size, "The maximum transfer size supported in bytes 2047-65535");
1269 module_param(max_packet_count, long, 0444);
1270 MODULE_PARM_DESC(max_packet_count, "The maximum number of packets in a transfer 15-511");
1272 module_param(phy_utmi_width, long, 0444);
1273 MODULE_PARM_DESC(phy_utmi_width, "Specifies the UTMI+ Data Width 8 or 16 bits");
1275 module_param(turn_around_time_hs, long, 0444);
1276 MODULE_PARM_DESC(turn_around_time_hs, "Turn-Around time for HS");
1278 module_param(turn_around_time_fs, long, 0444);
1279 MODULE_PARM_DESC(turn_around_time_fs, "Turn-Around time for FS");
1281 module_param(timeout_cal_hs, long, 0444);
1282 MODULE_PARM_DESC(timeout_cal_hs, "Timeout Cal for HS");
1284 module_param(timeout_cal_fs, long, 0444);
1285 MODULE_PARM_DESC(timeout_cal_fs, "Timeout Cal for FS");