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");
320 dev_err(&_pdev->dev, "failed to find hcd device node\n");
323 of_property_read_u32(np, "lantiq,portmask", &port_mask);
324 // Parsing and store the parameters
325 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
329 #if defined(__DO_OC_INT__)
332 #if defined(__IS_DUAL__)
333 oc_int_id=&ifxusb_hcd_1;
334 oc_int_id_1=&ifxusb_hcd_1;
335 oc_int_id_2=&ifxusb_hcd_2;
337 oc_int_id=&ifxusb_hcd;
342 #if defined(__IS_DUAL__)
343 memset(&ifxusb_hcd_1, 0, sizeof(ifxhcd_hcd_t));
344 memset(&ifxusb_hcd_2, 0, sizeof(ifxhcd_hcd_t));
346 ifxusb_hcd_1.core_if.core_no=0;
347 ifxusb_hcd_2.core_if.core_no=1;
348 ifxusb_hcd_1.core_if.core_name=(char *)ifxusb_hcd_name_1;
349 ifxusb_hcd_2.core_if.core_name=(char *)ifxusb_hcd_name_2;
351 ifxusb_hcd_1.dev=&_pdev->dev;
352 ifxusb_hcd_2.dev=&_pdev->dev;
354 if (port_mask & 0x1) {
355 retval = ifxusb_driver_probe_h(&ifxusb_hcd_1,
358 IFXUSB1_FIFOMEM_BASE,
362 goto ifxusb_driver_probe_fail;
365 if (port_mask & 0x2) {
366 retval = ifxusb_driver_probe_h(&ifxusb_hcd_2,
369 IFXUSB2_FIFOMEM_BASE,
373 goto ifxusb_driver_probe_fail;
375 #elif defined(__IS_FIRST__)
376 memset(&ifxusb_hcd, 0, sizeof(ifxhcd_hcd_t));
378 ifxusb_hcd.core_if.core_no=0;
379 ifxusb_hcd.core_if.core_name=(char *)ifxusb_hcd_name;
381 ifxusb_hcd.dev=&_pdev->dev;
383 retval = ifxusb_driver_probe_h(&ifxusb_hcd,
386 IFXUSB1_FIFOMEM_BASE,
390 goto ifxusb_driver_probe_fail;
392 #elif defined(__IS_SECOND__)
393 memset(&ifxusb_hcd, 0, sizeof(ifxhcd_hcd_t));
395 ifxusb_hcd.core_if.core_no=1;
396 ifxusb_hcd.core_if.core_name=(char *)ifxusb_hcd_name;
398 ifxusb_hcd.dev=&_pdev->dev;
400 retval = ifxusb_driver_probe_h(&ifxusb_hcd,
403 IFXUSB2_FIFOMEM_BASE,
407 goto ifxusb_driver_probe_fail;
410 memset(&ifxusb_hcd, 0, sizeof(ifxhcd_hcd_t));
412 ifxusb_hcd.core_if.core_no=0;
413 ifxusb_hcd.core_if.core_name=(char *)ifxusb_hcd_name;
415 ifxusb_hcd.dev=&_pdev->dev;
417 retval = ifxusb_driver_probe_h(&ifxusb_hcd,
424 goto ifxusb_driver_probe_fail;
429 memset(&ifxusb_pcd, 0, sizeof(ifxpcd_pcd_t));
430 ifxusb_pcd.core_if.core_name=(char *)&ifxusb_pcd_name[0];
432 ifxusb_pcd.dev=&_pdev->dev;
434 #if defined(__IS_FIRST__)
435 ifxusb_pcd.core_if.core_no=0;
436 retval = ifxusb_driver_probe_d(&ifxusb_pcd,
439 IFXUSB1_FIFOMEM_BASE,
442 #elif defined(__IS_SECOND__)
443 ifxusb_pcd.core_if.core_no=1;
444 retval = ifxusb_driver_probe_d(&ifxusb_pcd,
447 IFXUSB2_FIFOMEM_BASE,
451 ifxusb_pcd.core_if.core_no=0;
452 retval = ifxusb_driver_probe_d(&ifxusb_pcd,
460 goto ifxusb_driver_probe_fail;
464 ifxusb_attr_create_h(&_pdev->dev);
466 ifxusb_attr_create_d(&_pdev->dev);
469 gpio_count = of_gpio_count(np);
471 enum of_gpio_flags flags;
472 int gpio = of_get_gpio_flags(np, --gpio_count, &flags);
473 if (gpio_request(gpio, "usb"))
475 dev_info(&_pdev->dev, "requested GPIO %d\n", gpio);
476 gpio_direction_output(gpio, (flags & OF_GPIO_ACTIVE_LOW) ? (0) : (1));
482 ifxusb_driver_probe_fail:
483 ifxusb_driver_remove(_pdev);
487 static struct resource ifxusb_device_resources[] =
489 #if defined(__IS_DUAL__)
490 [0] = { .start = IFXUSB1_IRQ,
491 .flags = IORESOURCE_IRQ,
493 [1] = { .start = IFXUSB1_IOMEM_BASE,
494 .end = IFXUSB1_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
495 .flags = IORESOURCE_MEM,
497 [2] = { .start = IFXUSB2_IRQ,
498 .flags = IORESOURCE_IRQ,
500 [3] = { .start = IFXUSB2_IOMEM_BASE,
501 .end = IFXUSB2_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
502 .flags = IORESOURCE_MEM,
504 [4] = { .start = IFXUSB1_FIFOMEM_BASE,
505 .end = IFXUSB1_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
506 .flags = IORESOURCE_MEM,
508 [5] = { .start = IFXUSB2_FIFOMEM_BASE,
509 .end = IFXUSB2_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
510 .flags = IORESOURCE_MEM,
512 [6] = { .start = IFXUSB1_FIFODBG_BASE,
513 .end = IFXUSB1_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
514 .flags = IORESOURCE_MEM,
516 [7] = { .start = IFXUSB2_FIFODBG_BASE,
517 .end = IFXUSB2_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
518 .flags = IORESOURCE_MEM,
520 #elif defined(__IS_FIRST__)
521 [0] = { .start = IFXUSB1_IRQ,
522 .flags = IORESOURCE_IRQ,
524 [1] = { .start = IFXUSB1_IOMEM_BASE,
525 .end = IFXUSB1_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
526 .flags = IORESOURCE_MEM,
528 [2] = { .start = IFXUSB1_FIFOMEM_BASE,
529 .end = IFXUSB1_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
530 .flags = IORESOURCE_MEM,
532 [3] = { .start = IFXUSB1_FIFODBG_BASE,
533 .end = IFXUSB1_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
534 .flags = IORESOURCE_MEM,
536 #elif defined(__IS_SECOND__)
537 [0] = { .start = IFXUSB2_IRQ,
538 .flags = IORESOURCE_IRQ,
540 [1] = { .start = IFXUSB2_IOMEM_BASE,
541 .end = IFXUSB2_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
542 .flags = IORESOURCE_MEM,
544 [2] = { .start = IFXUSB2_FIFOMEM_BASE,
545 .end = IFXUSB2_FIFOMEM_BASE + IFXUSB_FIFOMEM_SIZE-1,
546 .flags = IORESOURCE_MEM,
548 [3] = { .start = IFXUSB2_FIFODBG_BASE,
549 .end = IFXUSB2_FIFODBG_BASE + IFXUSB_FIFODBG_SIZE-1,
550 .flags = IORESOURCE_MEM,
553 [0] = { .start = IFXUSB_IRQ,
554 .flags = IORESOURCE_IRQ,
556 [1] = { .start = IFXUSB_IOMEM_BASE,
557 .end = IFXUSB_IOMEM_BASE + IFXUSB_IOMEM_SIZE-1,
558 .flags = IORESOURCE_MEM,
560 [2] = { .start = IFXUSB_FIFOMEM_BASE,
561 .end = IFXUSB_FIFOMEM_BASE+IFXUSB_FIFOMEM_SIZE-1,
562 .flags = IORESOURCE_MEM,
564 [3] = { .start = IFXUSB_FIFODBG_BASE,
565 .end = IFXUSB_FIFODBG_BASE+IFXUSB_FIFODBG_SIZE-1,
566 .flags = IORESOURCE_MEM,
571 static u64 ifxusb_dmamask = (u32)0x1fffffff;
573 static void ifxusb_device_release(struct device * dev)
575 IFX_PRINT("IFX USB platform_dev release\n");
579 static struct platform_device ifxusb_device =
584 .release = ifxusb_device_release,
585 .dma_mask = &ifxusb_dmamask,
587 .resource = ifxusb_device_resources,
588 .num_resources = ARRAY_SIZE(ifxusb_device_resources),
593 \brief This function is called when the ifxusb_driver is installed with the insmod command.
595 static struct platform_driver ifxusb_driver = {
596 .probe = ifxusb_driver_probe,
597 .remove = ifxusb_driver_remove,
599 .owner = THIS_MODULE,
601 .name = ifxusb_hcd_driver_name,
603 .name = ifxusb_pcd_driver_name,
609 int __init ifxusb_hcd_driver_init(void)
611 int __init ifxusb_pcd_driver_init(void)
615 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
616 #if defined(__IS_HOST__)
617 IFX_PRINT("%s: version %s\n", ifxusb_hcd_driver_name, IFXUSB_VERSION);
619 IFX_PRINT("%s: version %s\n", ifxusb_pcd_driver_name, IFXUSB_VERSION);
623 #if defined(__IS_TWINPASS__)
624 IFX_PRINT(" OPTION: __IS_TWINPASS__\n");
625 #elif defined(__IS_DANUBE__)
626 IFX_PRINT(" OPTION: __IS_DANUBE__\n");
627 #elif defined(__IS_AMAZON_SE__)
628 IFX_PRINT(" OPTION: __IS_AMAZON_SE__\n");
629 #elif defined(__IS_AR9__)
630 IFX_PRINT(" OPTION: __IS_AR9__\n");
631 #elif defined(__IS_VR9__)
632 IFX_PRINT(" OPTION: __IS_VR9__\n");
633 #elif defined(__IS_AR10__)
634 IFX_PRINT(" OPTION: __IS_AR10__\n");
636 IFX_PRINT(" OPTION: NO PLATFORM DEFINED\n");
640 IFX_PRINT(" OPTION: __UEIP__\n");
643 #ifdef __PHY_LONG_PREEMP__
644 IFX_PRINT(" OPTION: __PHY_LONG_PREEMP__\n");
646 #ifdef __FORCE_USB11__
647 IFX_PRINT(" OPTION: __FORCE_USB11__\n");
649 #ifdef __UNALIGNED_BUF_ADJ__
650 IFX_PRINT(" OPTION: __UNALIGNED_BUF_ADJ__\n");
652 #ifdef __UNALIGNED_BUF_CHK__
653 IFX_PRINT(" OPTION: __UNALIGNED_BUF_CHK__\n");
655 #ifdef __UNALIGNED_BUF_BURST__
656 IFX_PRINT(" OPTION: __UNALIGNED_BUF_BURST__\n");
659 IFX_PRINT(" OPTION: __DEBUG__\n");
661 #ifdef __ENABLE_DUMP__
662 IFX_PRINT(" OPTION: __ENABLE_DUMP__\n");
666 IFX_PRINT(" OPTION: __IS_HOST__\n");
668 IFX_PRINT(" __IS_DUAL__\n");
671 IFX_PRINT(" __IS_FIRST__\n");
674 IFX_PRINT(" __IS_SECOND__\n");
676 #ifdef __WITH_HS_ELECT_TST__
677 IFX_PRINT(" __WITH_HS_ELECT_TST__\n");
680 IFX_PRINT(" __EN_ISOC__\n");
682 #ifdef __EN_ISOC_SPLIT__
683 IFX_PRINT(" __EN_ISOC_SPLIT__\n");
685 #ifdef __EPQD_DESTROY_TIMEOUT__
686 IFX_PRINT(" __EPQD_DESTROY_TIMEOUT__\n");
688 #ifdef __DYN_SOF_INTR__
689 IFX_PRINT(" __DYN_SOF_INTR__\n");
692 IFX_PRINT(" OPTION: __IS_DEVICE__\n");
694 IFX_PRINT(" __DED_INTR__\n");
697 IFX_PRINT(" __DED_FIFO__\n");
700 IFX_PRINT(" __DESC_DMA__\n");
703 IFX_PRINT(" __IS_FIRST__\n");
706 IFX_PRINT(" __IS_SECOND__\n");
708 #ifdef __GADGET_TASKLET_TX__
709 IFX_PRINT(" __GADGET_TASKLET_TX__\n");
711 #ifdef __GADGET_TASKLET_RX__
712 IFX_PRINT(" __GADGET_TASKLET_RX__\n");
714 #ifdef __GADGET_TASKLET_HIGH__
715 IFX_PRINT(" __GADGET_TASKLET_HIGH__\n");
717 #ifdef __DO_PCD_UNLOCK__
718 IFX_PRINT(" __DO_PCD_UNLOCK__\n");
720 #ifdef __GADGET_LED__
721 IFX_PRINT(" __GADGET_LED__\n");
724 #ifdef __ECM_NO_INTR__
725 IFX_PRINT(" __ECM_NO_INTR__\n");
727 #ifdef __NOSWAPINCTRL__
728 IFX_PRINT(" __NOSWAPINCTRL__\n");
730 #ifdef __MAC_ECM_FIX__
731 IFX_PRINT(" __MAC_ECM_FIX__\n");
733 #ifdef __RETAIN_BUF_TX__
734 IFX_PRINT(" __RETAIN_BUF_TX__\n");
736 #ifdef __RETAIN_BUF_RX__
737 IFX_PRINT(" __RETAIN_BUF_RX__\n");
740 IFX_PRINT(" __QUICKNAK__\n");
745 retval = platform_driver_register(&ifxusb_driver);
748 IFX_ERROR("%s retval=%d\n", __func__, retval);
753 ifxusb_device.name = ifxusb_hcd_driver_name;
755 ifxusb_device.name = ifxusb_pcd_driver_name;
758 if (ifxusb_device.dev.parent)
761 retval = platform_device_register(&ifxusb_device);
765 IFX_ERROR("%s retval=%d\n", __func__, retval);
766 platform_driver_unregister(&ifxusb_driver);
773 module_init(ifxusb_hcd_driver_init);
775 module_init(ifxusb_pcd_driver_init);
779 \brief This function is called when the driver is removed from the kernel
780 with the rmmod command. The driver unregisters itself with its bus
784 void __exit ifxusb_hcd_driver_cleanup(void)
786 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
787 platform_device_unregister(&ifxusb_device);
788 platform_driver_unregister(&ifxusb_driver);
789 IFX_PRINT("%s module removed\n", ifxusb_hcd_driver_name);
791 module_exit(ifxusb_hcd_driver_cleanup);
793 void __exit ifxusb_pcd_driver_cleanup(void)
795 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
796 platform_device_unregister(&ifxusb_device);
797 platform_driver_unregister(&ifxusb_driver);
798 IFX_PRINT("%s module removed\n", ifxusb_pcd_driver_name);
800 module_exit(ifxusb_pcd_driver_cleanup);
802 MODULE_DESCRIPTION(USB_DRIVER_DESC);
803 MODULE_AUTHOR("Lantiq");
804 MODULE_LICENSE("GPL");
808 // Parameters set when loaded
809 //static long dbg_lvl =0xFFFFFFFF;
810 static long dbg_lvl =0;
811 static short dma_burst_size =-1;
812 static short speed =-1;
813 static long data_fifo_size =-1;
815 static long rx_fifo_size =-1;
817 static long tx_fifo_size_00 =-1;
818 static long tx_fifo_size_01 =-1;
819 static long tx_fifo_size_02 =-1;
820 static long tx_fifo_size_03 =-1;
821 static long tx_fifo_size_04 =-1;
822 static long tx_fifo_size_05 =-1;
823 static long tx_fifo_size_06 =-1;
824 static long tx_fifo_size_07 =-1;
825 static long tx_fifo_size_08 =-1;
826 static long tx_fifo_size_09 =-1;
827 static long tx_fifo_size_10 =-1;
828 static long tx_fifo_size_11 =-1;
829 static long tx_fifo_size_12 =-1;
830 static long tx_fifo_size_13 =-1;
831 static long tx_fifo_size_14 =-1;
832 static long tx_fifo_size_15 =-1;
833 static short thr_ctl=-1;
834 static long tx_thr_length =-1;
835 static long rx_thr_length =-1;
837 static long nperio_tx_fifo_size =-1;
838 static long perio_tx_fifo_size_01 =-1;
839 static long perio_tx_fifo_size_02 =-1;
840 static long perio_tx_fifo_size_03 =-1;
841 static long perio_tx_fifo_size_04 =-1;
842 static long perio_tx_fifo_size_05 =-1;
843 static long perio_tx_fifo_size_06 =-1;
844 static long perio_tx_fifo_size_07 =-1;
845 static long perio_tx_fifo_size_08 =-1;
846 static long perio_tx_fifo_size_09 =-1;
847 static long perio_tx_fifo_size_10 =-1;
848 static long perio_tx_fifo_size_11 =-1;
849 static long perio_tx_fifo_size_12 =-1;
850 static long perio_tx_fifo_size_13 =-1;
851 static long perio_tx_fifo_size_14 =-1;
852 static long perio_tx_fifo_size_15 =-1;
854 static short dev_endpoints =-1;
858 static long rx_fifo_size =-1;
859 static long nperio_tx_fifo_size =-1;
860 static long perio_tx_fifo_size =-1;
861 static short host_channels =-1;
864 static long max_transfer_size =-1;
865 static long max_packet_count =-1;
866 static long phy_utmi_width =-1;
867 static long turn_around_time_hs =-1;
868 static long turn_around_time_fs =-1;
869 static long timeout_cal_hs =-1;
870 static long timeout_cal_fs =-1;
873 \brief Parsing the parameters taken when module load
875 static void parse_parms(void)
878 ifxusb_params_t *params;
879 IFX_DEBUGPL(DBG_ENTRY, "%s() %d\n", __func__, __LINE__ );
882 params=&ifxusb_module_params_h;
886 params=&ifxusb_module_params_d;
889 switch(dma_burst_size)
896 params->dma_burst_size=dma_burst_size;
899 #if defined(__IS_VR9__)
902 unsigned int partnum;
903 chipid=*((volatile uint32_t *)IFX_MPS_CHIPID);
904 partnum=(chipid&0x0FFFF000)>>12;
907 case 0x000B: //VRX288_A2x
908 case 0x000E: //VRX282_A2x
909 case 0x000C: //VRX268_A2x
910 case 0x000D: //GRX288_A2x
911 params->dma_burst_size=default_param_dma_burst_size_n;
914 params->dma_burst_size=default_param_dma_burst_size;
916 printk(KERN_INFO "Chip Version :%04x BurstSize=%d\n",partnum,params->dma_burst_size);
919 params->dma_burst_size=default_param_dma_burst_size;
923 if(speed==0 || speed==1)
926 params->speed=default_param_speed;
928 if(max_transfer_size>=2048 && max_transfer_size<=65535)
929 params->max_transfer_size=max_transfer_size;
931 params->max_transfer_size=default_param_max_transfer_size;
933 if(max_packet_count>=15 && max_packet_count<=511)
934 params->max_packet_count=max_packet_count;
936 params->max_packet_count=default_param_max_packet_count;
938 switch(phy_utmi_width)
942 params->phy_utmi_width=phy_utmi_width;
945 params->phy_utmi_width=default_param_phy_utmi_width;
948 if(turn_around_time_hs>=0 && turn_around_time_hs<=7)
949 params->turn_around_time_hs=turn_around_time_hs;
951 params->turn_around_time_hs=default_param_turn_around_time_hs;
953 if(turn_around_time_fs>=0 && turn_around_time_fs<=7)
954 params->turn_around_time_fs=turn_around_time_fs;
956 params->turn_around_time_fs=default_param_turn_around_time_fs;
958 if(timeout_cal_hs>=0 && timeout_cal_hs<=7)
959 params->timeout_cal_hs=timeout_cal_hs;
961 params->timeout_cal_hs=default_param_timeout_cal_hs;
963 if(timeout_cal_fs>=0 && timeout_cal_fs<=7)
964 params->timeout_cal_fs=timeout_cal_fs;
966 params->timeout_cal_fs=default_param_timeout_cal_fs;
968 if(data_fifo_size>=32 && data_fifo_size<=32768)
969 params->data_fifo_size=data_fifo_size;
971 params->data_fifo_size=default_param_data_fifo_size;
974 if(host_channels>=1 && host_channels<=16)
975 params->host_channels=host_channels;
977 params->host_channels=default_param_host_channels;
979 if(rx_fifo_size>=16 && rx_fifo_size<=32768)
980 params->rx_fifo_size=rx_fifo_size;
982 params->rx_fifo_size=default_param_rx_fifo_size;
984 if(nperio_tx_fifo_size>=16 && nperio_tx_fifo_size<=32768)
985 params->nperio_tx_fifo_size=nperio_tx_fifo_size;
987 params->nperio_tx_fifo_size=default_param_nperio_tx_fifo_size;
989 if(perio_tx_fifo_size>=16 && perio_tx_fifo_size<=32768)
990 params->perio_tx_fifo_size=perio_tx_fifo_size;
992 params->perio_tx_fifo_size=default_param_perio_tx_fifo_size;
996 if(rx_fifo_size>=16 && rx_fifo_size<=32768)
997 params->rx_fifo_size=rx_fifo_size;
999 params->rx_fifo_size=default_param_rx_fifo_size;
1001 if(tx_fifo_size_00>=16 && tx_fifo_size_00<=32768)
1002 params->tx_fifo_size[ 0]=tx_fifo_size_00;
1004 params->tx_fifo_size[ 0]=default_param_tx_fifo_size_00;
1005 if(tx_fifo_size_01>=0 && tx_fifo_size_01<=32768)
1006 params->tx_fifo_size[ 1]=tx_fifo_size_01;
1008 params->tx_fifo_size[ 1]=default_param_tx_fifo_size_01;
1009 if(tx_fifo_size_02>=0 && tx_fifo_size_02<=32768)
1010 params->tx_fifo_size[ 2]=tx_fifo_size_02;
1012 params->tx_fifo_size[ 2]=default_param_tx_fifo_size_02;
1013 if(tx_fifo_size_03>=0 && tx_fifo_size_03<=32768)
1014 params->tx_fifo_size[ 3]=tx_fifo_size_03;
1016 params->tx_fifo_size[ 3]=default_param_tx_fifo_size_03;
1017 if(tx_fifo_size_04>=0 && tx_fifo_size_04<=32768)
1018 params->tx_fifo_size[ 4]=tx_fifo_size_04;
1020 params->tx_fifo_size[ 4]=default_param_tx_fifo_size_04;
1021 if(tx_fifo_size_05>=0 && tx_fifo_size_05<=32768)
1022 params->tx_fifo_size[ 5]=tx_fifo_size_05;
1024 params->tx_fifo_size[ 5]=default_param_tx_fifo_size_05;
1025 if(tx_fifo_size_06>=0 && tx_fifo_size_06<=32768)
1026 params->tx_fifo_size[ 6]=tx_fifo_size_06;
1028 params->tx_fifo_size[ 6]=default_param_tx_fifo_size_06;
1029 if(tx_fifo_size_07>=0 && tx_fifo_size_07<=32768)
1030 params->tx_fifo_size[ 7]=tx_fifo_size_07;
1032 params->tx_fifo_size[ 7]=default_param_tx_fifo_size_07;
1033 if(tx_fifo_size_08>=0 && tx_fifo_size_08<=32768)
1034 params->tx_fifo_size[ 8]=tx_fifo_size_08;
1036 params->tx_fifo_size[ 8]=default_param_tx_fifo_size_08;
1037 if(tx_fifo_size_09>=0 && tx_fifo_size_09<=32768)
1038 params->tx_fifo_size[ 9]=tx_fifo_size_09;
1040 params->tx_fifo_size[ 9]=default_param_tx_fifo_size_09;
1041 if(tx_fifo_size_10>=0 && tx_fifo_size_10<=32768)
1042 params->tx_fifo_size[10]=tx_fifo_size_10;
1044 params->tx_fifo_size[10]=default_param_tx_fifo_size_10;
1045 if(tx_fifo_size_11>=0 && tx_fifo_size_11<=32768)
1046 params->tx_fifo_size[11]=tx_fifo_size_11;
1048 params->tx_fifo_size[11]=default_param_tx_fifo_size_11;
1049 if(tx_fifo_size_12>=0 && tx_fifo_size_12<=32768)
1050 params->tx_fifo_size[12]=tx_fifo_size_12;
1052 params->tx_fifo_size[12]=default_param_tx_fifo_size_12;
1053 if(tx_fifo_size_13>=0 && tx_fifo_size_13<=32768)
1054 params->tx_fifo_size[13]=tx_fifo_size_13;
1056 params->tx_fifo_size[13]=default_param_tx_fifo_size_13;
1057 if(tx_fifo_size_14>=0 && tx_fifo_size_14<=32768)
1058 params->tx_fifo_size[14]=tx_fifo_size_14;
1060 params->tx_fifo_size[14]=default_param_tx_fifo_size_14;
1061 if(tx_fifo_size_15>=0 && tx_fifo_size_15<=32768)
1062 params->tx_fifo_size[15]=tx_fifo_size_15;
1064 params->tx_fifo_size[15]=default_param_tx_fifo_size_15;
1065 if(thr_ctl==0 || thr_ctl==1)
1066 params->thr_ctl=thr_ctl;
1068 params->thr_ctl=default_param_thr_ctl;
1069 if(tx_thr_length>=16 && tx_thr_length<=511)
1070 params->tx_thr_length=tx_thr_length;
1072 params->tx_thr_length=default_param_tx_thr_length;
1073 if(rx_thr_length>=16 && rx_thr_length<=511)
1074 params->rx_thr_length=rx_thr_length;
1076 params->rx_thr_length=default_param_rx_thr_length;
1077 #else //__DED_FIFO__
1078 if(nperio_tx_fifo_size>=16 && nperio_tx_fifo_size<=32768)
1079 params->tx_fifo_size[ 0]=nperio_tx_fifo_size;
1081 params->tx_fifo_size[ 0]=default_param_nperio_tx_fifo_size;
1082 if(perio_tx_fifo_size_01>=0 && perio_tx_fifo_size_01<=32768)
1083 params->tx_fifo_size[ 1]=perio_tx_fifo_size_01;
1085 params->tx_fifo_size[ 1]=default_param_perio_tx_fifo_size_01;
1086 if(perio_tx_fifo_size_02>=0 && perio_tx_fifo_size_02<=32768)
1087 params->tx_fifo_size[ 2]=perio_tx_fifo_size_02;
1089 params->tx_fifo_size[ 2]=default_param_perio_tx_fifo_size_02;
1090 if(perio_tx_fifo_size_03>=0 && perio_tx_fifo_size_03<=32768)
1091 params->tx_fifo_size[ 3]=perio_tx_fifo_size_03;
1093 params->tx_fifo_size[ 3]=default_param_perio_tx_fifo_size_03;
1094 if(perio_tx_fifo_size_04>=0 && perio_tx_fifo_size_04<=32768)
1095 params->tx_fifo_size[ 4]=perio_tx_fifo_size_04;
1097 params->tx_fifo_size[ 4]=default_param_perio_tx_fifo_size_04;
1098 if(perio_tx_fifo_size_05>=0 && perio_tx_fifo_size_05<=32768)
1099 params->tx_fifo_size[ 5]=perio_tx_fifo_size_05;
1101 params->tx_fifo_size[ 5]=default_param_perio_tx_fifo_size_05;
1102 if(perio_tx_fifo_size_06>=0 && perio_tx_fifo_size_06<=32768)
1103 params->tx_fifo_size[ 6]=perio_tx_fifo_size_06;
1105 params->tx_fifo_size[ 6]=default_param_perio_tx_fifo_size_06;
1106 if(perio_tx_fifo_size_07>=0 && perio_tx_fifo_size_07<=32768)
1107 params->tx_fifo_size[ 7]=perio_tx_fifo_size_07;
1109 params->tx_fifo_size[ 7]=default_param_perio_tx_fifo_size_07;
1110 if(perio_tx_fifo_size_08>=0 && perio_tx_fifo_size_08<=32768)
1111 params->tx_fifo_size[ 8]=perio_tx_fifo_size_08;
1113 params->tx_fifo_size[ 8]=default_param_perio_tx_fifo_size_08;
1114 if(perio_tx_fifo_size_09>=0 && perio_tx_fifo_size_09<=32768)
1115 params->tx_fifo_size[ 9]=perio_tx_fifo_size_09;
1117 params->tx_fifo_size[ 9]=default_param_perio_tx_fifo_size_09;
1118 if(perio_tx_fifo_size_10>=0 && perio_tx_fifo_size_10<=32768)
1119 params->tx_fifo_size[10]=perio_tx_fifo_size_10;
1121 params->tx_fifo_size[10]=default_param_perio_tx_fifo_size_10;
1122 if(perio_tx_fifo_size_11>=0 && perio_tx_fifo_size_11<=32768)
1123 params->tx_fifo_size[11]=perio_tx_fifo_size_11;
1125 params->tx_fifo_size[11]=default_param_perio_tx_fifo_size_11;
1126 if(perio_tx_fifo_size_12>=0 && perio_tx_fifo_size_12<=32768)
1127 params->tx_fifo_size[12]=perio_tx_fifo_size_12;
1129 params->tx_fifo_size[12]=default_param_perio_tx_fifo_size_12;
1130 if(perio_tx_fifo_size_13>=0 && perio_tx_fifo_size_13<=32768)
1131 params->tx_fifo_size[13]=perio_tx_fifo_size_13;
1133 params->tx_fifo_size[13]=default_param_perio_tx_fifo_size_13;
1134 if(perio_tx_fifo_size_14>=0 && perio_tx_fifo_size_14<=32768)
1135 params->tx_fifo_size[14]=perio_tx_fifo_size_14;
1137 params->tx_fifo_size[14]=default_param_perio_tx_fifo_size_14;
1138 if(perio_tx_fifo_size_15>=0 && perio_tx_fifo_size_15<=32768)
1139 params->tx_fifo_size[15]=perio_tx_fifo_size_15;
1141 params->tx_fifo_size[15]=default_param_perio_tx_fifo_size_15;
1142 #endif //__DED_FIFO__
1143 #endif //__IS_DEVICE__
1152 module_param(dbg_lvl, long, 0444);
1153 MODULE_PARM_DESC(dbg_lvl, "Debug level.");
1155 module_param(dma_burst_size, short, 0444);
1156 MODULE_PARM_DESC(dma_burst_size, "DMA Burst Size 0, 1, 4, 8, 16");
1158 module_param(speed, short, 0444);
1159 MODULE_PARM_DESC(speed, "Speed 0=High Speed 1=Full Speed");
1161 module_param(data_fifo_size, long, 0444);
1162 MODULE_PARM_DESC(data_fifo_size, "Total number of words in the data FIFO memory 32-32768");
1164 #ifdef __IS_DEVICE__
1165 module_param(rx_fifo_size, long, 0444);
1166 MODULE_PARM_DESC(rx_fifo_size, "Number of words in the Rx FIFO 16-32768");
1169 module_param(tx_fifo_size_00, long, 0444);
1170 MODULE_PARM_DESC(tx_fifo_size_00, "Number of words in the Tx FIFO #00 16-32768");
1171 module_param(tx_fifo_size_01, long, 0444);
1172 MODULE_PARM_DESC(tx_fifo_size_01, "Number of words in the Tx FIFO #01 0-32768");
1173 module_param(tx_fifo_size_02, long, 0444);
1174 MODULE_PARM_DESC(tx_fifo_size_02, "Number of words in the Tx FIFO #02 0-32768");
1175 module_param(tx_fifo_size_03, long, 0444);
1176 MODULE_PARM_DESC(tx_fifo_size_03, "Number of words in the Tx FIFO #03 0-32768");
1177 module_param(tx_fifo_size_04, long, 0444);
1178 MODULE_PARM_DESC(tx_fifo_size_04, "Number of words in the Tx FIFO #04 0-32768");
1179 module_param(tx_fifo_size_05, long, 0444);
1180 MODULE_PARM_DESC(tx_fifo_size_05, "Number of words in the Tx FIFO #05 0-32768");
1181 module_param(tx_fifo_size_06, long, 0444);
1182 MODULE_PARM_DESC(tx_fifo_size_06, "Number of words in the Tx FIFO #06 0-32768");
1183 module_param(tx_fifo_size_07, long, 0444);
1184 MODULE_PARM_DESC(tx_fifo_size_07, "Number of words in the Tx FIFO #07 0-32768");
1185 module_param(tx_fifo_size_08, long, 0444);
1186 MODULE_PARM_DESC(tx_fifo_size_08, "Number of words in the Tx FIFO #08 0-32768");
1187 module_param(tx_fifo_size_09, long, 0444);
1188 MODULE_PARM_DESC(tx_fifo_size_09, "Number of words in the Tx FIFO #09 0-32768");
1189 module_param(tx_fifo_size_10, long, 0444);
1190 MODULE_PARM_DESC(tx_fifo_size_10, "Number of words in the Tx FIFO #10 0-32768");
1191 module_param(tx_fifo_size_11, long, 0444);
1192 MODULE_PARM_DESC(tx_fifo_size_11, "Number of words in the Tx FIFO #11 0-32768");
1193 module_param(tx_fifo_size_12, long, 0444);
1194 MODULE_PARM_DESC(tx_fifo_size_12, "Number of words in the Tx FIFO #12 0-32768");
1195 module_param(tx_fifo_size_13, long, 0444);
1196 MODULE_PARM_DESC(tx_fifo_size_13, "Number of words in the Tx FIFO #13 0-32768");
1197 module_param(tx_fifo_size_14, long, 0444);
1198 MODULE_PARM_DESC(tx_fifo_size_14, "Number of words in the Tx FIFO #14 0-32768");
1199 module_param(tx_fifo_size_15, long, 0444);
1200 MODULE_PARM_DESC(tx_fifo_size_15, "Number of words in the Tx FIFO #15 0-32768");
1202 module_param(thr_ctl, short, 0444);
1203 MODULE_PARM_DESC(thr_ctl, "0=Without 1=With Theshold Ctrl");
1205 module_param(tx_thr_length, long, 0444);
1206 MODULE_PARM_DESC(tx_thr_length, "TX Threshold length");
1208 module_param(rx_thr_length, long, 0444);
1209 MODULE_PARM_DESC(rx_thr_length, "RX Threshold length");
1212 module_param(nperio_tx_fifo_size, long, 0444);
1213 MODULE_PARM_DESC(nperio_tx_fifo_size, "Number of words in the non-periodic Tx FIFO 16-32768");
1215 module_param(perio_tx_fifo_size_01, long, 0444);
1216 MODULE_PARM_DESC(perio_tx_fifo_size_01, "Number of words in the periodic Tx FIFO #01 0-32768");
1217 module_param(perio_tx_fifo_size_02, long, 0444);
1218 MODULE_PARM_DESC(perio_tx_fifo_size_02, "Number of words in the periodic Tx FIFO #02 0-32768");
1219 module_param(perio_tx_fifo_size_03, long, 0444);
1220 MODULE_PARM_DESC(perio_tx_fifo_size_03, "Number of words in the periodic Tx FIFO #03 0-32768");
1221 module_param(perio_tx_fifo_size_04, long, 0444);
1222 MODULE_PARM_DESC(perio_tx_fifo_size_04, "Number of words in the periodic Tx FIFO #04 0-32768");
1223 module_param(perio_tx_fifo_size_05, long, 0444);
1224 MODULE_PARM_DESC(perio_tx_fifo_size_05, "Number of words in the periodic Tx FIFO #05 0-32768");
1225 module_param(perio_tx_fifo_size_06, long, 0444);
1226 MODULE_PARM_DESC(perio_tx_fifo_size_06, "Number of words in the periodic Tx FIFO #06 0-32768");
1227 module_param(perio_tx_fifo_size_07, long, 0444);
1228 MODULE_PARM_DESC(perio_tx_fifo_size_07, "Number of words in the periodic Tx FIFO #07 0-32768");
1229 module_param(perio_tx_fifo_size_08, long, 0444);
1230 MODULE_PARM_DESC(perio_tx_fifo_size_08, "Number of words in the periodic Tx FIFO #08 0-32768");
1231 module_param(perio_tx_fifo_size_09, long, 0444);
1232 MODULE_PARM_DESC(perio_tx_fifo_size_09, "Number of words in the periodic Tx FIFO #09 0-32768");
1233 module_param(perio_tx_fifo_size_10, long, 0444);
1234 MODULE_PARM_DESC(perio_tx_fifo_size_10, "Number of words in the periodic Tx FIFO #10 0-32768");
1235 module_param(perio_tx_fifo_size_11, long, 0444);
1236 MODULE_PARM_DESC(perio_tx_fifo_size_11, "Number of words in the periodic Tx FIFO #11 0-32768");
1237 module_param(perio_tx_fifo_size_12, long, 0444);
1238 MODULE_PARM_DESC(perio_tx_fifo_size_12, "Number of words in the periodic Tx FIFO #12 0-32768");
1239 module_param(perio_tx_fifo_size_13, long, 0444);
1240 MODULE_PARM_DESC(perio_tx_fifo_size_13, "Number of words in the periodic Tx FIFO #13 0-32768");
1241 module_param(perio_tx_fifo_size_14, long, 0444);
1242 MODULE_PARM_DESC(perio_tx_fifo_size_14, "Number of words in the periodic Tx FIFO #14 0-32768");
1243 module_param(perio_tx_fifo_size_15, long, 0444);
1244 MODULE_PARM_DESC(perio_tx_fifo_size_15, "Number of words in the periodic Tx FIFO #15 0-32768");
1245 #endif//__DED_FIFO__
1246 module_param(dev_endpoints, short, 0444);
1247 MODULE_PARM_DESC(dev_endpoints, "The number of endpoints in addition to EP0 available for device mode 1-15");
1251 module_param(rx_fifo_size, long, 0444);
1252 MODULE_PARM_DESC(rx_fifo_size, "Number of words in the Rx FIFO 16-32768");
1254 module_param(nperio_tx_fifo_size, long, 0444);
1255 MODULE_PARM_DESC(nperio_tx_fifo_size, "Number of words in the non-periodic Tx FIFO 16-32768");
1257 module_param(perio_tx_fifo_size, long, 0444);
1258 MODULE_PARM_DESC(perio_tx_fifo_size, "Number of words in the host periodic Tx FIFO 16-32768");
1260 module_param(host_channels, short, 0444);
1261 MODULE_PARM_DESC(host_channels, "The number of host channel registers to use 1-16");
1264 module_param(max_transfer_size, long, 0444);
1265 MODULE_PARM_DESC(max_transfer_size, "The maximum transfer size supported in bytes 2047-65535");
1267 module_param(max_packet_count, long, 0444);
1268 MODULE_PARM_DESC(max_packet_count, "The maximum number of packets in a transfer 15-511");
1270 module_param(phy_utmi_width, long, 0444);
1271 MODULE_PARM_DESC(phy_utmi_width, "Specifies the UTMI+ Data Width 8 or 16 bits");
1273 module_param(turn_around_time_hs, long, 0444);
1274 MODULE_PARM_DESC(turn_around_time_hs, "Turn-Around time for HS");
1276 module_param(turn_around_time_fs, long, 0444);
1277 MODULE_PARM_DESC(turn_around_time_fs, "Turn-Around time for FS");
1279 module_param(timeout_cal_hs, long, 0444);
1280 MODULE_PARM_DESC(timeout_cal_hs, "Timeout Cal for HS");
1282 module_param(timeout_cal_fs, long, 0444);
1283 MODULE_PARM_DESC(timeout_cal_fs, "Timeout Cal for FS");