Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
omap-usb-host.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/spinlock.h>
#include <linux/gpio.h>
#include <plat/cpu.h>
#include <plat/usb.h>
#include <linux/pm_runtime.h>

Go to the source code of this file.

Data Structures

struct  usbhs_hcd_omap
 

Macros

#define USBHS_DRIVER_NAME   "usbhs_omap"
 
#define OMAP_EHCI_DEVICE   "ehci-omap"
 
#define OMAP_OHCI_DEVICE   "ohci-omap3"
 
#define OMAP_UHH_REVISION   (0x00)
 
#define OMAP_UHH_SYSCONFIG   (0x10)
 
#define OMAP_UHH_SYSCONFIG_MIDLEMODE   (1 << 12)
 
#define OMAP_UHH_SYSCONFIG_CACTIVITY   (1 << 8)
 
#define OMAP_UHH_SYSCONFIG_SIDLEMODE   (1 << 3)
 
#define OMAP_UHH_SYSCONFIG_ENAWAKEUP   (1 << 2)
 
#define OMAP_UHH_SYSCONFIG_SOFTRESET   (1 << 1)
 
#define OMAP_UHH_SYSCONFIG_AUTOIDLE   (1 << 0)
 
#define OMAP_UHH_SYSSTATUS   (0x14)
 
#define OMAP_UHH_HOSTCONFIG   (0x40)
 
#define OMAP_UHH_HOSTCONFIG_ULPI_BYPASS   (1 << 0)
 
#define OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS   (1 << 0)
 
#define OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS   (1 << 11)
 
#define OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS   (1 << 12)
 
#define OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN   (1 << 2)
 
#define OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN   (1 << 3)
 
#define OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN   (1 << 4)
 
#define OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN   (1 << 5)
 
#define OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS   (1 << 8)
 
#define OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS   (1 << 9)
 
#define OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS   (1 << 10)
 
#define OMAP4_UHH_HOSTCONFIG_APP_START_CLK   (1 << 31)
 
#define OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR   (3 << 2)
 
#define OMAP4_UHH_SYSCONFIG_NOIDLE   (1 << 2)
 
#define OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR   (3 << 4)
 
#define OMAP4_UHH_SYSCONFIG_NOSTDBY   (1 << 4)
 
#define OMAP4_UHH_SYSCONFIG_SOFTRESET   (1 << 0)
 
#define OMAP4_P1_MODE_CLEAR   (3 << 16)
 
#define OMAP4_P1_MODE_TLL   (1 << 16)
 
#define OMAP4_P1_MODE_HSIC   (3 << 16)
 
#define OMAP4_P2_MODE_CLEAR   (3 << 18)
 
#define OMAP4_P2_MODE_TLL   (1 << 18)
 
#define OMAP4_P2_MODE_HSIC   (3 << 18)
 
#define OMAP_UHH_DEBUG_CSR   (0x44)
 
#define OMAP_USBHS_REV1   0x00000010 /* OMAP3 */
 
#define OMAP_USBHS_REV2   0x50700100 /* OMAP4 */
 
#define is_omap_usbhs_rev1(x)   (x->usbhs_rev == OMAP_USBHS_REV1)
 
#define is_omap_usbhs_rev2(x)   (x->usbhs_rev == OMAP_USBHS_REV2)
 
#define is_ehci_phy_mode(x)   (x == OMAP_EHCI_PORT_MODE_PHY)
 
#define is_ehci_tll_mode(x)   (x == OMAP_EHCI_PORT_MODE_TLL)
 
#define is_ehci_hsic_mode(x)   (x == OMAP_EHCI_PORT_MODE_HSIC)
 

Functions

 MODULE_AUTHOR ("Keshava Munegowda <[email protected]>")
 
 MODULE_ALIAS ("platform:"USBHS_DRIVER_NAME)
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_DESCRIPTION ("usb host common core driver for omap EHCI and OHCI")
 
 fs_initcall_sync (omap_usbhs_drvinit)
 
 module_exit (omap_usbhs_drvexit)
 

Variables

const char usbhs_driver_name [] = USBHS_DRIVER_NAME
 

Macro Definition Documentation

#define is_ehci_hsic_mode (   x)    (x == OMAP_EHCI_PORT_MODE_HSIC)

Definition at line 88 of file omap-usb-host.c.

#define is_ehci_phy_mode (   x)    (x == OMAP_EHCI_PORT_MODE_PHY)

Definition at line 86 of file omap-usb-host.c.

#define is_ehci_tll_mode (   x)    (x == OMAP_EHCI_PORT_MODE_TLL)

Definition at line 87 of file omap-usb-host.c.

#define is_omap_usbhs_rev1 (   x)    (x->usbhs_rev == OMAP_USBHS_REV1)

Definition at line 83 of file omap-usb-host.c.

#define is_omap_usbhs_rev2 (   x)    (x->usbhs_rev == OMAP_USBHS_REV2)

Definition at line 84 of file omap-usb-host.c.

#define OMAP4_P1_MODE_CLEAR   (3 << 16)

Definition at line 70 of file omap-usb-host.c.

#define OMAP4_P1_MODE_HSIC   (3 << 16)

Definition at line 72 of file omap-usb-host.c.

#define OMAP4_P1_MODE_TLL   (1 << 16)

Definition at line 71 of file omap-usb-host.c.

#define OMAP4_P2_MODE_CLEAR   (3 << 18)

Definition at line 73 of file omap-usb-host.c.

#define OMAP4_P2_MODE_HSIC   (3 << 18)

Definition at line 75 of file omap-usb-host.c.

#define OMAP4_P2_MODE_TLL   (1 << 18)

Definition at line 74 of file omap-usb-host.c.

#define OMAP4_UHH_HOSTCONFIG_APP_START_CLK   (1 << 31)

Definition at line 61 of file omap-usb-host.c.

#define OMAP4_UHH_SYSCONFIG_IDLEMODE_CLEAR   (3 << 2)

Definition at line 64 of file omap-usb-host.c.

#define OMAP4_UHH_SYSCONFIG_NOIDLE   (1 << 2)

Definition at line 65 of file omap-usb-host.c.

#define OMAP4_UHH_SYSCONFIG_NOSTDBY   (1 << 4)

Definition at line 67 of file omap-usb-host.c.

#define OMAP4_UHH_SYSCONFIG_SOFTRESET   (1 << 0)

Definition at line 68 of file omap-usb-host.c.

#define OMAP4_UHH_SYSCONFIG_STDBYMODE_CLEAR   (3 << 4)

Definition at line 66 of file omap-usb-host.c.

#define OMAP_EHCI_DEVICE   "ehci-omap"

Definition at line 33 of file omap-usb-host.c.

#define OMAP_OHCI_DEVICE   "ohci-omap3"

Definition at line 34 of file omap-usb-host.c.

#define OMAP_UHH_DEBUG_CSR   (0x44)

Definition at line 77 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG   (0x40)

Definition at line 49 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_INCR16_BURST_EN   (1 << 4)

Definition at line 56 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_INCR4_BURST_EN   (1 << 2)

Definition at line 54 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_INCR8_BURST_EN   (1 << 3)

Definition at line 55 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_INCRX_ALIGN_EN   (1 << 5)

Definition at line 57 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_P1_CONNECT_STATUS   (1 << 8)

Definition at line 58 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_P2_CONNECT_STATUS   (1 << 9)

Definition at line 59 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS   (1 << 10)

Definition at line 60 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_ULPI_BYPASS   (1 << 0)

Definition at line 50 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_ULPI_P1_BYPASS   (1 << 0)

Definition at line 51 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_ULPI_P2_BYPASS   (1 << 11)

Definition at line 52 of file omap-usb-host.c.

#define OMAP_UHH_HOSTCONFIG_ULPI_P3_BYPASS   (1 << 12)

Definition at line 53 of file omap-usb-host.c.

#define OMAP_UHH_REVISION   (0x00)

Definition at line 39 of file omap-usb-host.c.

#define OMAP_UHH_SYSCONFIG   (0x10)

Definition at line 40 of file omap-usb-host.c.

#define OMAP_UHH_SYSCONFIG_AUTOIDLE   (1 << 0)

Definition at line 46 of file omap-usb-host.c.

#define OMAP_UHH_SYSCONFIG_CACTIVITY   (1 << 8)

Definition at line 42 of file omap-usb-host.c.

#define OMAP_UHH_SYSCONFIG_ENAWAKEUP   (1 << 2)

Definition at line 44 of file omap-usb-host.c.

#define OMAP_UHH_SYSCONFIG_MIDLEMODE   (1 << 12)

Definition at line 41 of file omap-usb-host.c.

#define OMAP_UHH_SYSCONFIG_SIDLEMODE   (1 << 3)

Definition at line 43 of file omap-usb-host.c.

#define OMAP_UHH_SYSCONFIG_SOFTRESET   (1 << 1)

Definition at line 45 of file omap-usb-host.c.

#define OMAP_UHH_SYSSTATUS   (0x14)

Definition at line 48 of file omap-usb-host.c.

#define OMAP_USBHS_REV1   0x00000010 /* OMAP3 */

Definition at line 80 of file omap-usb-host.c.

#define OMAP_USBHS_REV2   0x50700100 /* OMAP4 */

Definition at line 81 of file omap-usb-host.c.

#define USBHS_DRIVER_NAME   "usbhs_omap"

omap-usb-host.c - The USBHS core driver for OMAP EHCI & OHCI

Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com Author: Keshava Munegowda kesha.nosp@m.va_m.nosp@m.gowda.nosp@m.@ti..nosp@m.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 of the License as published by the Free Software Foundation.

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, see http://www.gnu.org/licenses/.

Definition at line 32 of file omap-usb-host.c.

Function Documentation

fs_initcall_sync ( omap_usbhs_drvinit  )
MODULE_ALIAS ( "platform:"  USBHS_DRIVER_NAME)
MODULE_AUTHOR ( "Keshava Munegowda <[email protected]>"  )
MODULE_DESCRIPTION ( "usb host common core driver for omap EHCI and OHCI"  )
module_exit ( omap_usbhs_drvexit  )
MODULE_LICENSE ( "GPL v2 )

Variable Documentation

const char usbhs_driver_name[] = USBHS_DRIVER_NAME

Definition at line 110 of file omap-usb-host.c.