Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
isp1760-hcd.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/mm.h>
#include <linux/timer.h>
#include <asm/unaligned.h>
#include <asm/cacheflush.h>
#include <linux/gpio.h>
#include "isp1760-hcd.h"

Go to the source code of this file.

Data Structures

struct  isp1760_hcd
 
struct  isp1760_qtd
 
struct  isp1760_qh
 
struct  urb_listitem
 

Macros

#define DEFAULT_I_TDPS   1024
 
#define HC_LENGTH(p)   (((p)>>00)&0x00ff) /* bits 7:0 */
 
#define HC_VERSION(p)   (((p)>>16)&0xffff) /* bits 31:16 */
 
#define HCS_INDICATOR(p)   ((p)&(1 << 16)) /* true: has port indicators */
 
#define HCS_PPC(p)   ((p)&(1 << 4)) /* true: port power control */
 
#define HCS_N_PORTS(p)   (((p)>>0)&0xf) /* bits 3:0, ports on HC */
 
#define HCC_ISOC_CACHE(p)   ((p)&(1 << 7)) /* true: can cache isoc frame */
 
#define HCC_ISOC_THRES(p)   (((p)>>4)&0x7) /* bits 6:4, uframes cached */
 
#define CMD_LRESET   (1<<7) /* partial reset (no ports, etc) */
 
#define CMD_RESET   (1<<1) /* reset HC not bus */
 
#define CMD_RUN   (1<<0) /* start/stop HC */
 
#define STS_PCD   (1<<2) /* port change detect */
 
#define FLAG_CF   (1<<0) /* true: we'll support "high speed" */
 
#define PORT_OWNER   (1<<13) /* true: companion hc owns this port */
 
#define PORT_POWER   (1<<12) /* true: has power (see PPC) */
 
#define PORT_USB11(x)   (((x) & (3 << 10)) == (1 << 10)) /* USB 1.1 device */
 
#define PORT_RESET   (1<<8) /* reset port */
 
#define PORT_SUSPEND   (1<<7) /* suspend port */
 
#define PORT_RESUME   (1<<6) /* resume it */
 
#define PORT_PE   (1<<2) /* port enable */
 
#define PORT_CSC   (1<<1) /* connect status change */
 
#define PORT_CONNECT   (1<<0) /* device connected */
 
#define PORT_RWC_BITS   (PORT_CSC)
 
#define QTD_ENQUEUED   0
 
#define QTD_PAYLOAD_ALLOC   1
 
#define QTD_XFER_STARTED   2
 
#define QTD_XFER_COMPLETE   3
 
#define QTD_RETIRE   4
 
#define EHCI_TUNE_CERR   3 /* 0-3 qtd retries; 0 == don't stop */
 
#define EHCI_TUNE_RL_HS   4 /* nak throttle; see 4.9 */
 
#define EHCI_TUNE_RL_TT   0
 
#define EHCI_TUNE_MULT_HS   1 /* 1-3 transactions/uframe; 4.10.3 */
 
#define EHCI_TUNE_MULT_TT   1
 
#define EHCI_TUNE_FLS   2 /* (small) 256 frame schedule */
 
#define ENQUEUE_DEPTH   2
 
#define PTD_STATE_QTD_DONE   1
 
#define PTD_STATE_QTD_RELOAD   2
 
#define PTD_STATE_URB_RETIRE   3
 
#define SLOT_TIMEOUT   300
 
#define SLOT_CHECK_PERIOD   200
 
#define max_packet(wMaxPacketSize)   ((wMaxPacketSize) & 0x07ff)
 
#define PORT_WAKE_BITS   (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)
 

Enumerations

enum  queue_head_types { QH_CONTROL, QH_BULK, QH_INTERRUPT, QH_END }
 

Functions

void schedule_ptds (struct usb_hcd *hcd)
 
void errata2_function (unsigned long data)
 
int __init init_kmem_once (void)
 
void deinit_kmem_cache (void)
 
struct usb_hcd * isp1760_register (phys_addr_t res_start, resource_size_t res_len, int irq, unsigned long irqflags, int rst_gpio, struct device *dev, const char *busname, unsigned int devflags)
 
 MODULE_DESCRIPTION ("Driver for the ISP1760 USB-controller from NXP")
 
 MODULE_AUTHOR ("Sebastian Siewior <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define CMD_LRESET   (1<<7) /* partial reset (no ports, etc) */

Definition at line 78 of file isp1760-hcd.c.

#define CMD_RESET   (1<<1) /* reset HC not bus */

Definition at line 79 of file isp1760-hcd.c.

#define CMD_RUN   (1<<0) /* start/stop HC */

Definition at line 80 of file isp1760-hcd.c.

#define DEFAULT_I_TDPS   1024

Definition at line 53 of file isp1760-hcd.c.

#define EHCI_TUNE_CERR   3 /* 0-3 qtd retries; 0 == don't stop */

Definition at line 554 of file isp1760-hcd.c.

#define EHCI_TUNE_FLS   2 /* (small) 256 frame schedule */

Definition at line 559 of file isp1760-hcd.c.

#define EHCI_TUNE_MULT_HS   1 /* 1-3 transactions/uframe; 4.10.3 */

Definition at line 557 of file isp1760-hcd.c.

#define EHCI_TUNE_MULT_TT   1

Definition at line 558 of file isp1760-hcd.c.

#define EHCI_TUNE_RL_HS   4 /* nak throttle; see 4.9 */

Definition at line 555 of file isp1760-hcd.c.

#define EHCI_TUNE_RL_TT   0

Definition at line 556 of file isp1760-hcd.c.

#define ENQUEUE_DEPTH   2

Definition at line 855 of file isp1760-hcd.c.

#define FLAG_CF   (1<<0) /* true: we'll support "high speed" */

Definition at line 82 of file isp1760-hcd.c.

#define HC_LENGTH (   p)    (((p)>>00)&0x00ff) /* bits 7:0 */

Definition at line 69 of file isp1760-hcd.c.

#define HC_VERSION (   p)    (((p)>>16)&0xffff) /* bits 31:16 */

Definition at line 70 of file isp1760-hcd.c.

#define HCC_ISOC_CACHE (   p)    ((p)&(1 << 7)) /* true: can cache isoc frame */

Definition at line 74 of file isp1760-hcd.c.

#define HCC_ISOC_THRES (   p)    (((p)>>4)&0x7) /* bits 6:4, uframes cached */

Definition at line 75 of file isp1760-hcd.c.

#define HCS_INDICATOR (   p)    ((p)&(1 << 16)) /* true: has port indicators */

Definition at line 71 of file isp1760-hcd.c.

#define HCS_N_PORTS (   p)    (((p)>>0)&0xf) /* bits 3:0, ports on HC */

Definition at line 73 of file isp1760-hcd.c.

#define HCS_PPC (   p)    ((p)&(1 << 4)) /* true: port power control */

Definition at line 72 of file isp1760-hcd.c.

#define max_packet (   wMaxPacketSize)    ((wMaxPacketSize) & 0x07ff)

Definition at line 1416 of file isp1760-hcd.c.

#define PORT_CONNECT   (1<<0) /* device connected */

Definition at line 92 of file isp1760-hcd.c.

#define PORT_CSC   (1<<1) /* connect status change */

Definition at line 91 of file isp1760-hcd.c.

#define PORT_OWNER   (1<<13) /* true: companion hc owns this port */

Definition at line 84 of file isp1760-hcd.c.

#define PORT_PE   (1<<2) /* port enable */

Definition at line 90 of file isp1760-hcd.c.

#define PORT_POWER   (1<<12) /* true: has power (see PPC) */

Definition at line 85 of file isp1760-hcd.c.

#define PORT_RESET   (1<<8) /* reset port */

Definition at line 87 of file isp1760-hcd.c.

#define PORT_RESUME   (1<<6) /* resume it */

Definition at line 89 of file isp1760-hcd.c.

#define PORT_RWC_BITS   (PORT_CSC)

Definition at line 93 of file isp1760-hcd.c.

#define PORT_SUSPEND   (1<<7) /* suspend port */

Definition at line 88 of file isp1760-hcd.c.

#define PORT_USB11 (   x)    (((x) & (3 << 10)) == (1 << 10)) /* USB 1.1 device */

Definition at line 86 of file isp1760-hcd.c.

#define PORT_WAKE_BITS   (PORT_WKOC_E|PORT_WKDISC_E|PORT_WKCONN_E)

Definition at line 1811 of file isp1760-hcd.c.

#define PTD_STATE_QTD_DONE   1

Definition at line 1000 of file isp1760-hcd.c.

#define PTD_STATE_QTD_RELOAD   2

Definition at line 1001 of file isp1760-hcd.c.

#define PTD_STATE_URB_RETIRE   3

Definition at line 1002 of file isp1760-hcd.c.

#define QTD_ENQUEUED   0

Definition at line 112 of file isp1760-hcd.c.

#define QTD_PAYLOAD_ALLOC   1

Definition at line 113 of file isp1760-hcd.c.

#define QTD_RETIRE   4

Definition at line 116 of file isp1760-hcd.c.

#define QTD_XFER_COMPLETE   3

Definition at line 115 of file isp1760-hcd.c.

#define QTD_XFER_STARTED   2

Definition at line 114 of file isp1760-hcd.c.

#define SLOT_CHECK_PERIOD   200

Definition at line 1285 of file isp1760-hcd.c.

#define SLOT_TIMEOUT   300

Definition at line 1284 of file isp1760-hcd.c.

#define STS_PCD   (1<<2) /* port change detect */

Definition at line 81 of file isp1760-hcd.c.

Enumeration Type Documentation

Enumerator:
QH_CONTROL 
QH_BULK 
QH_INTERRUPT 
QH_END 

Definition at line 35 of file isp1760-hcd.c.

Function Documentation

void deinit_kmem_cache ( void  )

Definition at line 2209 of file isp1760-hcd.c.

void errata2_function ( unsigned long  data)

Definition at line 1288 of file isp1760-hcd.c.

int __init init_kmem_once ( void  )

Definition at line 2182 of file isp1760-hcd.c.

struct usb_hcd* isp1760_register ( phys_addr_t  res_start,
resource_size_t  res_len,
int  irq,
unsigned long  irqflags,
int  rst_gpio,
struct device dev,
const char busname,
unsigned int  devflags 
)
read

Definition at line 2216 of file isp1760-hcd.c.

MODULE_AUTHOR ( "Sebastian Siewior <[email protected]>"  )
MODULE_DESCRIPTION ( "Driver for the ISP1760 USB-controller from NXP"  )
MODULE_LICENSE ( "GPL v2 )
void schedule_ptds ( struct usb_hcd *  hcd)

Definition at line 935 of file isp1760-hcd.c.