Skip to content
Snippets Groups Projects
Select Git revision
  • 1dd3d123239179fad5de5dc00a6e0014a1918fde
  • seco_lf-6.6.52-2.2.1 default protected
  • seco_lf-6.6.52-2.2.1_e39-pinfunc
  • chka-modv-206-poc
  • integrate/gitlab-ci/cleaos-833-add-cnfluence-labels-into-config/into/seco_lf-5.10.y
  • integrate/gitlab-ci/cleaos-833-add-cnfluence-labels-into-config/into/seco_lf-6.6.52-2.2.1
  • jonas/seco_lf-6.6.52-2.2.1_e39-nvmem-eeprom
  • seco_lf-6.6.52-2.2.1_e39-eeprom-rename
  • seco_lf-6.6.52-2.2.1_e39-uart-has-rtc-cts
  • niccolor/e88-lt9611uxc-dsi-complete-support
  • seco_lf_v2024.04_6.6.52_2.2.x_e39_spidev-overlay
  • seco_lf_v2024.04_6.6.52_2.2.x_e39_sdcard-card-detect-gpio-mode
  • MODV-209-e-39-add-gpio-line-names-in-kernel-device-tree
  • seco_lf-6.6.52-2.2.1_e88-lt9611uxc-i2s
  • seco_lf-6.6.52-2.2.1_e39-nxpbtuart
  • seco_lf-6.6.52-2.2.1-rtl8211f_led
  • seco_lf-5.10.y protected
  • integrate/gitlab-ci/cleaos-448-bitbake-logs-in-failed-job/into/seco_lf-6.6.52-2.2.1
  • integrate/gitlab-ci/cleaos-448-bitbake-logs-in-failed-job/into/seco_lf-5.10.y
  • chka-seco_lf-6.6.52-2.2.1-fix-eth-led-modv-198
  • didi/spi-cs
  • lf-6.6.52-2.2.1
  • lf-6.1.55-2.2.1
  • lf-6.6.3-1.0.0
  • lf-6.6.3-imx95-er2
  • lf-6.1.55-2.2.0
  • lf-6.6.y-imx95-er1
  • lf-5.15.71-2.2.2
  • lf-6.1.36-2.1.0
  • lf-5.15.71-2.2.1
  • lf-6.1.22-2.0.0
  • lf-6.1.1-1.0.1
  • rel_imx_5.4.24_2.1.4
  • rel_imx_4.9.88_2.0.13
  • rel_imx_4.14.98_2.3.5
  • lf-6.1.1-1.0.0
  • rel_imx_5.4.3_2.0.2
  • lf-5.15.71-2.2.0
  • lf-5.10.72-2.2.3
  • lf-5.15.52-2.1.0
  • imx_5.15.52_imx8ulp_er1
41 results

fotg210-hcd.c

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    fotg210-hcd.c 163.88 KiB
    /*
     * Faraday FOTG210 EHCI-like driver
     *
     * Copyright (c) 2013 Faraday Technology Corporation
     *
     * Author: Yuan-Hsin Chen <yhchen@faraday-tech.com>
     *	   Feng-Hsin Chiang <john453@faraday-tech.com>
     *	   Po-Yu Chuang <ratbert.chuang@gmail.com>
     *
     * Most of code borrowed from the Linux-3.7 EHCI driver
     *
     * This program is free software; you can redistribute it and/or modify it
     * under the terms of the GNU General Public License as published by the
     * Free Software Foundation; either version 2 of the License, or (at your
     * option) any later version.
     *
     * This program is distributed in the hope that it will be useful, but
     * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     * for more details.
     *
     * You should have received a copy of the GNU General Public License
     * along with this program; if not, write to the Free Software Foundation,
     * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     */
    #include <linux/module.h>
    #include <linux/device.h>
    #include <linux/dmapool.h>
    #include <linux/kernel.h>
    #include <linux/delay.h>
    #include <linux/ioport.h>
    #include <linux/sched.h>
    #include <linux/vmalloc.h>
    #include <linux/errno.h>
    #include <linux/init.h>
    #include <linux/hrtimer.h>
    #include <linux/list.h>
    #include <linux/interrupt.h>
    #include <linux/usb.h>
    #include <linux/usb/hcd.h>
    #include <linux/moduleparam.h>
    #include <linux/dma-mapping.h>
    #include <linux/debugfs.h>
    #include <linux/slab.h>
    #include <linux/uaccess.h>
    #include <linux/platform_device.h>
    #include <linux/io.h>
    
    #include <asm/byteorder.h>
    #include <asm/irq.h>
    #include <asm/unaligned.h>
    
    /*-------------------------------------------------------------------------*/
    #define DRIVER_AUTHOR "Yuan-Hsin Chen"
    #define DRIVER_DESC "FOTG210 Host Controller (EHCI) Driver"
    
    static const char	hcd_name[] = "fotg210_hcd";
    
    #undef VERBOSE_DEBUG
    #undef FOTG210_URB_TRACE
    
    #ifdef DEBUG
    #define FOTG210_STATS
    #endif
    
    /* magic numbers that can affect system performance */
    #define	FOTG210_TUNE_CERR		3 /* 0-3 qtd retries; 0 == don't stop */
    #define	FOTG210_TUNE_RL_HS		4 /* nak throttle; see 4.9 */
    #define	FOTG210_TUNE_RL_TT		0
    #define	FOTG210_TUNE_MULT_HS	1	/* 1-3 transactions/uframe; 4.10.3 */