Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dwc3-omap.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/platform_data/dwc3-omap.h>
#include <linux/dma-mapping.h>
#include <linux/ioport.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/usb/otg.h>
#include <linux/usb/nop-usb-xceiv.h>
#include "core.h"

Go to the source code of this file.

Data Structures

struct  dwc3_omap
 

Macros

#define USBOTGSS_REVISION   0x0000
 
#define USBOTGSS_SYSCONFIG   0x0010
 
#define USBOTGSS_IRQ_EOI   0x0020
 
#define USBOTGSS_IRQSTATUS_RAW_0   0x0024
 
#define USBOTGSS_IRQSTATUS_0   0x0028
 
#define USBOTGSS_IRQENABLE_SET_0   0x002c
 
#define USBOTGSS_IRQENABLE_CLR_0   0x0030
 
#define USBOTGSS_IRQSTATUS_RAW_1   0x0034
 
#define USBOTGSS_IRQSTATUS_1   0x0038
 
#define USBOTGSS_IRQENABLE_SET_1   0x003c
 
#define USBOTGSS_IRQENABLE_CLR_1   0x0040
 
#define USBOTGSS_UTMI_OTG_CTRL   0x0080
 
#define USBOTGSS_UTMI_OTG_STATUS   0x0084
 
#define USBOTGSS_MMRAM_OFFSET   0x0100
 
#define USBOTGSS_FLADJ   0x0104
 
#define USBOTGSS_DEBUG_CFG   0x0108
 
#define USBOTGSS_DEBUG_DATA   0x010c
 
#define USBOTGSS_SYSCONFIG_DMADISABLE   (1 << 16)
 
#define USBOTGSS_SYSCONFIG_STANDBYMODE(x)   ((x) << 4)
 
#define USBOTGSS_STANDBYMODE_FORCE_STANDBY   0
 
#define USBOTGSS_STANDBYMODE_NO_STANDBY   1
 
#define USBOTGSS_STANDBYMODE_SMART_STANDBY   2
 
#define USBOTGSS_STANDBYMODE_SMART_WAKEUP   3
 
#define USBOTGSS_STANDBYMODE_MASK   (0x03 << 4)
 
#define USBOTGSS_SYSCONFIG_IDLEMODE(x)   ((x) << 2)
 
#define USBOTGSS_IDLEMODE_FORCE_IDLE   0
 
#define USBOTGSS_IDLEMODE_NO_IDLE   1
 
#define USBOTGSS_IDLEMODE_SMART_IDLE   2
 
#define USBOTGSS_IDLEMODE_SMART_WAKEUP   3
 
#define USBOTGSS_IDLEMODE_MASK   (0x03 << 2)
 
#define USBOTGSS_IRQ_EOI_LINE_NUMBER   (1 << 0)
 
#define USBOTGSS_IRQO_COREIRQ_ST   (1 << 0)
 
#define USBOTGSS_IRQ1_DMADISABLECLR   (1 << 17)
 
#define USBOTGSS_IRQ1_OEVT   (1 << 16)
 
#define USBOTGSS_IRQ1_DRVVBUS_RISE   (1 << 13)
 
#define USBOTGSS_IRQ1_CHRGVBUS_RISE   (1 << 12)
 
#define USBOTGSS_IRQ1_DISCHRGVBUS_RISE   (1 << 11)
 
#define USBOTGSS_IRQ1_IDPULLUP_RISE   (1 << 8)
 
#define USBOTGSS_IRQ1_DRVVBUS_FALL   (1 << 5)
 
#define USBOTGSS_IRQ1_CHRGVBUS_FALL   (1 << 4)
 
#define USBOTGSS_IRQ1_DISCHRGVBUS_FALL   (1 << 3)
 
#define USBOTGSS_IRQ1_IDPULLUP_FALL   (1 << 0)
 
#define USBOTGSS_UTMI_OTG_CTRL_DRVVBUS   (1 << 5)
 
#define USBOTGSS_UTMI_OTG_CTRL_CHRGVBUS   (1 << 4)
 
#define USBOTGSS_UTMI_OTG_CTRL_DISCHRGVBUS   (1 << 3)
 
#define USBOTGSS_UTMI_OTG_CTRL_IDPULLUP   (1 << 0)
 
#define USBOTGSS_UTMI_OTG_STATUS_SW_MODE   (1 << 31)
 
#define USBOTGSS_UTMI_OTG_STATUS_POWERPRESENT   (1 << 9)
 
#define USBOTGSS_UTMI_OTG_STATUS_TXBITSTUFFENABLE   (1 << 8)
 
#define USBOTGSS_UTMI_OTG_STATUS_IDDIG   (1 << 4)
 
#define USBOTGSS_UTMI_OTG_STATUS_SESSEND   (1 << 3)
 
#define USBOTGSS_UTMI_OTG_STATUS_SESSVALID   (1 << 2)
 
#define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID   (1 << 1)
 

Functions

 MODULE_DEVICE_TABLE (of, of_dwc3_matach)
 
 module_platform_driver (dwc3_omap_driver)
 
 MODULE_ALIAS ("platform:omap-dwc3")
 
 MODULE_AUTHOR ("Felipe Balbi <[email protected]>")
 
 MODULE_LICENSE ("Dual BSD/GPL")
 
 MODULE_DESCRIPTION ("DesignWare USB3 OMAP Glue Layer")
 

Macro Definition Documentation

#define USBOTGSS_DEBUG_CFG   0x0108

Definition at line 76 of file dwc3-omap.c.

#define USBOTGSS_DEBUG_DATA   0x010c

Definition at line 77 of file dwc3-omap.c.

#define USBOTGSS_FLADJ   0x0104

Definition at line 75 of file dwc3-omap.c.

#define USBOTGSS_IDLEMODE_FORCE_IDLE   0

Definition at line 92 of file dwc3-omap.c.

#define USBOTGSS_IDLEMODE_MASK   (0x03 << 2)

Definition at line 97 of file dwc3-omap.c.

#define USBOTGSS_IDLEMODE_NO_IDLE   1

Definition at line 93 of file dwc3-omap.c.

#define USBOTGSS_IDLEMODE_SMART_IDLE   2

Definition at line 94 of file dwc3-omap.c.

#define USBOTGSS_IDLEMODE_SMART_WAKEUP   3

Definition at line 95 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_CHRGVBUS_FALL   (1 << 4)

Definition at line 113 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_CHRGVBUS_RISE   (1 << 12)

Definition at line 109 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_DISCHRGVBUS_FALL   (1 << 3)

Definition at line 114 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_DISCHRGVBUS_RISE   (1 << 11)

Definition at line 110 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_DMADISABLECLR   (1 << 17)

Definition at line 106 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_DRVVBUS_FALL   (1 << 5)

Definition at line 112 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_DRVVBUS_RISE   (1 << 13)

Definition at line 108 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_IDPULLUP_FALL   (1 << 0)

Definition at line 115 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_IDPULLUP_RISE   (1 << 8)

Definition at line 111 of file dwc3-omap.c.

#define USBOTGSS_IRQ1_OEVT   (1 << 16)

Definition at line 107 of file dwc3-omap.c.

#define USBOTGSS_IRQ_EOI   0x0020

Definition at line 63 of file dwc3-omap.c.

#define USBOTGSS_IRQ_EOI_LINE_NUMBER   (1 << 0)

Definition at line 100 of file dwc3-omap.c.

#define USBOTGSS_IRQENABLE_CLR_0   0x0030

Definition at line 67 of file dwc3-omap.c.

#define USBOTGSS_IRQENABLE_CLR_1   0x0040

Definition at line 71 of file dwc3-omap.c.

#define USBOTGSS_IRQENABLE_SET_0   0x002c

Definition at line 66 of file dwc3-omap.c.

#define USBOTGSS_IRQENABLE_SET_1   0x003c

Definition at line 70 of file dwc3-omap.c.

#define USBOTGSS_IRQO_COREIRQ_ST   (1 << 0)

Definition at line 103 of file dwc3-omap.c.

#define USBOTGSS_IRQSTATUS_0   0x0028

Definition at line 65 of file dwc3-omap.c.

#define USBOTGSS_IRQSTATUS_1   0x0038

Definition at line 69 of file dwc3-omap.c.

#define USBOTGSS_IRQSTATUS_RAW_0   0x0024

Definition at line 64 of file dwc3-omap.c.

#define USBOTGSS_IRQSTATUS_RAW_1   0x0034

Definition at line 68 of file dwc3-omap.c.

#define USBOTGSS_MMRAM_OFFSET   0x0100

Definition at line 74 of file dwc3-omap.c.

#define USBOTGSS_REVISION   0x0000

dwc3-omap.c - OMAP Specific Glue layer

Copyright (C) 2010-2011 Texas Instruments Incorporated - http://www.ti.com

Authors: Felipe Balbi balbi.nosp@m.@ti..nosp@m.com, Sebastian Andrzej Siewior bigea.nosp@m.sy@l.nosp@m.inutr.nosp@m.onix.nosp@m..de

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer, without modification.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. The names of the above-listed copyright holders may not be used to endorse or promote products derived from this software without specific prior written permission.

ALTERNATIVELY, this software may be distributed under the terms of the GNU General Public License ("GPL") version 2, as published by the Free Software Foundation.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition at line 61 of file dwc3-omap.c.

#define USBOTGSS_STANDBYMODE_FORCE_STANDBY   0

Definition at line 83 of file dwc3-omap.c.

#define USBOTGSS_STANDBYMODE_MASK   (0x03 << 4)

Definition at line 88 of file dwc3-omap.c.

#define USBOTGSS_STANDBYMODE_NO_STANDBY   1

Definition at line 84 of file dwc3-omap.c.

#define USBOTGSS_STANDBYMODE_SMART_STANDBY   2

Definition at line 85 of file dwc3-omap.c.

#define USBOTGSS_STANDBYMODE_SMART_WAKEUP   3

Definition at line 86 of file dwc3-omap.c.

#define USBOTGSS_SYSCONFIG   0x0010

Definition at line 62 of file dwc3-omap.c.

#define USBOTGSS_SYSCONFIG_DMADISABLE   (1 << 16)

Definition at line 80 of file dwc3-omap.c.

#define USBOTGSS_SYSCONFIG_IDLEMODE (   x)    ((x) << 2)

Definition at line 90 of file dwc3-omap.c.

#define USBOTGSS_SYSCONFIG_STANDBYMODE (   x)    ((x) << 4)

Definition at line 81 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_CTRL   0x0080

Definition at line 72 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_CTRL_CHRGVBUS   (1 << 4)

Definition at line 119 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_CTRL_DISCHRGVBUS   (1 << 3)

Definition at line 120 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_CTRL_DRVVBUS   (1 << 5)

Definition at line 118 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_CTRL_IDPULLUP   (1 << 0)

Definition at line 121 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS   0x0084

Definition at line 73 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS_IDDIG   (1 << 4)

Definition at line 127 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS_POWERPRESENT   (1 << 9)

Definition at line 125 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS_SESSEND   (1 << 3)

Definition at line 128 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS_SESSVALID   (1 << 2)

Definition at line 129 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS_SW_MODE   (1 << 31)

Definition at line 124 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS_TXBITSTUFFENABLE   (1 << 8)

Definition at line 126 of file dwc3-omap.c.

#define USBOTGSS_UTMI_OTG_STATUS_VBUSVALID   (1 << 1)

Definition at line 130 of file dwc3-omap.c.

Function Documentation

MODULE_ALIAS ( "platform:omap-dwc3 )
MODULE_AUTHOR ( "Felipe Balbi <[email protected]>"  )
MODULE_DESCRIPTION ( "DesignWare USB3 OMAP Glue Layer"  )
MODULE_DEVICE_TABLE ( of  ,
of_dwc3_matach   
)
MODULE_LICENSE ( "Dual BSD/GPL"  )
module_platform_driver ( dwc3_omap_driver  )