Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
fsl_otg.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/timer.h>
#include <linux/usb.h>
#include <linux/device.h>
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
#include <linux/workqueue.h>
#include <linux/time.h>
#include <linux/fsl_devices.h>
#include <linux/platform_device.h>
#include <linux/uaccess.h>
#include <asm/unaligned.h>
#include "fsl_otg.h"

Go to the source code of this file.

Macros

#define DRIVER_VERSION   "Rev. 1.55"
 
#define DRIVER_AUTHOR   "Jerry Huang/Li Yang"
 
#define DRIVER_DESC   "Freescale USB OTG Transceiver Driver"
 
#define DRIVER_INFO   DRIVER_DESC " " DRIVER_VERSION
 
#define HA_DATA_PULSE
 
#define fsl_readl(addr)   readl(addr)
 
#define fsl_writel(val, addr)   writel(val, addr)
 

Functions

u8 view_ulpi (u8 addr)
 
int write_ulpi (u8 addr, u8 data)
 
void fsl_otg_chrg_vbus (int on)
 
void fsl_otg_dischrg_vbus (int on)
 
void fsl_otg_drv_vbus (int on)
 
void fsl_otg_loc_conn (int on)
 
void fsl_otg_loc_sof (int on)
 
void fsl_otg_start_pulse (void)
 
void b_data_pulse_end (unsigned long foo)
 
void fsl_otg_pulse_vbus (void)
 
void b_vbus_pulse_end (unsigned long foo)
 
void b_srp_end (unsigned long foo)
 
void a_wait_enum (unsigned long foo)
 
void set_tmout (unsigned long indicator)
 
int fsl_otg_init_timers (struct otg_fsm *fsm)
 
void fsl_otg_uninit_timers (void)
 
void fsl_otg_add_timer (void *gtimer)
 
void fsl_otg_del_timer (void *gtimer)
 
int fsl_otg_tick_timer (void)
 
void otg_reset_controller (void)
 
int fsl_otg_start_host (struct otg_fsm *fsm, int on)
 
int fsl_otg_start_gadget (struct otg_fsm *fsm, int on)
 
irqreturn_t fsl_otg_isr (int irq, void *dev_id)
 
int usb_otg_start (struct platform_device *pdev)
 
 module_platform_driver (fsl_otg_driver)
 
 MODULE_DESCRIPTION (DRIVER_INFO)
 
 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_LICENSE ("GPL")
 

Variables

const pm_message_t otg_suspend_state
 
struct fsl_otg_timera_wait_vrise_tmr
 
struct fsl_otg_timera_wait_bcon_tmr
 
struct fsl_otg_timera_aidl_bdis_tmr
 
struct fsl_otg_timerb_ase0_brst_tmr
 
struct fsl_otg_timerb_se0_srp_tmr
 
struct fsl_otg_timerb_data_pulse_tmr
 
struct fsl_otg_timerb_vbus_pulse_tmr
 
struct fsl_otg_timerb_srp_fail_tmr
 
struct fsl_otg_timerb_srp_wait_tmr
 
struct fsl_otg_timera_wait_enum_tmr
 
struct platform_driver fsl_otg_driver
 

Macro Definition Documentation

#define DRIVER_AUTHOR   "Jerry Huang/Li Yang"

Definition at line 49 of file fsl_otg.c.

#define DRIVER_DESC   "Freescale USB OTG Transceiver Driver"

Definition at line 50 of file fsl_otg.c.

#define DRIVER_INFO   DRIVER_DESC " " DRIVER_VERSION

Definition at line 51 of file fsl_otg.c.

#define DRIVER_VERSION   "Rev. 1.55"

Definition at line 48 of file fsl_otg.c.

#define fsl_readl (   addr)    readl(addr)

Definition at line 107 of file fsl_otg.c.

#define fsl_writel (   val,
  addr 
)    writel(val, addr)

Definition at line 108 of file fsl_otg.c.

#define HA_DATA_PULSE

Definition at line 59 of file fsl_otg.c.

Function Documentation

void a_wait_enum ( unsigned long  foo)

Definition at line 288 of file fsl_otg.c.

void b_data_pulse_end ( unsigned long  foo)

Definition at line 241 of file fsl_otg.c.

void b_srp_end ( unsigned long  foo)

Definition at line 273 of file fsl_otg.c.

void b_vbus_pulse_end ( unsigned long  foo)

Definition at line 260 of file fsl_otg.c.

void fsl_otg_add_timer ( void gtimer)

Definition at line 389 of file fsl_otg.c.

void fsl_otg_chrg_vbus ( int  on)

Definition at line 137 of file fsl_otg.c.

void fsl_otg_del_timer ( void gtimer)

Definition at line 408 of file fsl_otg.c.

void fsl_otg_dischrg_vbus ( int  on)

Definition at line 155 of file fsl_otg.c.

void fsl_otg_drv_vbus ( int  on)

Definition at line 173 of file fsl_otg.c.

int fsl_otg_init_timers ( struct otg_fsm fsm)

Definition at line 304 of file fsl_otg.c.

irqreturn_t fsl_otg_isr ( int  irq,
void dev_id 
)

Definition at line 712 of file fsl_otg.c.

void fsl_otg_loc_conn ( int  on)

Definition at line 191 of file fsl_otg.c.

void fsl_otg_loc_sof ( int  on)

Definition at line 210 of file fsl_otg.c.

void fsl_otg_pulse_vbus ( void  )

Definition at line 252 of file fsl_otg.c.

int fsl_otg_start_gadget ( struct otg_fsm fsm,
int  on 
)

Definition at line 519 of file fsl_otg.c.

int fsl_otg_start_host ( struct otg_fsm fsm,
int  on 
)

Definition at line 453 of file fsl_otg.c.

void fsl_otg_start_pulse ( void  )

Definition at line 225 of file fsl_otg.c.

int fsl_otg_tick_timer ( void  )

Definition at line 422 of file fsl_otg.c.

void fsl_otg_uninit_timers ( void  )

Definition at line 361 of file fsl_otg.c.

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_INFO  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( fsl_otg_driver  )
void otg_reset_controller ( void  )

Definition at line 441 of file fsl_otg.c.

void set_tmout ( unsigned long  indicator)

Definition at line 298 of file fsl_otg.c.

int usb_otg_start ( struct platform_device pdev)

Definition at line 838 of file fsl_otg.c.

u8 view_ulpi ( u8  addr)

Definition at line 112 of file fsl_otg.c.

int write_ulpi ( u8  addr,
u8  data 
)

Definition at line 124 of file fsl_otg.c.

Variable Documentation

struct fsl_otg_timer * a_aidl_bdis_tmr

Definition at line 66 of file fsl_otg.c.

struct fsl_otg_timer * a_wait_bcon_tmr

Definition at line 66 of file fsl_otg.c.

struct fsl_otg_timer * a_wait_enum_tmr

Definition at line 70 of file fsl_otg.c.

struct fsl_otg_timer* a_wait_vrise_tmr

Definition at line 66 of file fsl_otg.c.

struct fsl_otg_timer * b_ase0_brst_tmr

Definition at line 66 of file fsl_otg.c.

struct fsl_otg_timer* b_data_pulse_tmr

Definition at line 70 of file fsl_otg.c.

struct fsl_otg_timer * b_se0_srp_tmr

Definition at line 66 of file fsl_otg.c.

struct fsl_otg_timer * b_srp_fail_tmr

Definition at line 70 of file fsl_otg.c.

struct fsl_otg_timer * b_srp_wait_tmr

Definition at line 70 of file fsl_otg.c.

struct fsl_otg_timer * b_vbus_pulse_tmr

Definition at line 70 of file fsl_otg.c.

struct platform_driver fsl_otg_driver
Initial value:
= {
.probe = fsl_otg_probe,
.remove = __devexit_p(fsl_otg_remove),
.driver = {
.name = driver_name,
.owner = THIS_MODULE,
},
}

Definition at line 1170 of file fsl_otg.c.

const pm_message_t otg_suspend_state
Initial value:
= {
.event = 1,
}

Definition at line 55 of file fsl_otg.c.