Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
fhci.h File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bug.h>
#include <linux/spinlock.h>
#include <linux/interrupt.h>
#include <linux/kfifo.h>
#include <linux/io.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include <asm/qe.h>
#include <asm/immap_qe.h>

Go to the source code of this file.

Data Structures

struct  fhci_pram
 
struct  fhci_ep_pram
 
struct  fhci_controller_list
 
struct  virtual_root_hub
 
struct  fhci_hcd
 
struct  ed
 
struct  td
 
struct  packet
 
struct  urb_priv
 
struct  endpoint
 
struct  fhci_time_frame
 
struct  fhci_usb
 

Macros

#define USB_CLOCK   48000000
 
#define FHCI_PRAM_SIZE   0x100
 
#define MAX_EDS   32
 
#define MAX_TDS   32
 
#define CRC_SIZE   2
 
#define PROTOCOL_OVERHEAD   7
 
#define PKT_PID_DATA0   0x80000000 /* PID - Data toggle zero */
 
#define PKT_PID_DATA1   0x40000000 /* PID - Data toggle one */
 
#define PKT_PID_SETUP   0x20000000 /* PID - Setup bit */
 
#define PKT_SETUP_STATUS   0x10000000 /* Setup status bit */
 
#define PKT_SETADDR_STATUS   0x08000000 /* Set address status bit */
 
#define PKT_SET_HOST_LAST   0x04000000 /* Last data packet */
 
#define PKT_HOST_DATA   0x02000000 /* Data packet */
 
#define PKT_FIRST_IN_FRAME   0x01000000 /* First packet in the frame */
 
#define PKT_TOKEN_FRAME   0x00800000 /* Token packet */
 
#define PKT_ZLP   0x00400000 /* Zero length packet */
 
#define PKT_IN_TOKEN_FRAME   0x00200000 /* IN token packet */
 
#define PKT_OUT_TOKEN_FRAME   0x00100000 /* OUT token packet */
 
#define PKT_SETUP_TOKEN_FRAME   0x00080000 /* SETUP token packet */
 
#define PKT_STALL_FRAME   0x00040000 /* STALL packet */
 
#define PKT_NACK_FRAME   0x00020000 /* NACK packet */
 
#define PKT_NO_PID   0x00010000 /* No PID */
 
#define PKT_NO_CRC   0x00008000 /* don't append CRC */
 
#define PKT_HOST_COMMAND   0x00004000 /* Host command packet */
 
#define PKT_DUMMY_PACKET   0x00002000 /* Dummy packet, used for mmm */
 
#define PKT_LOW_SPEED_PACKET   0x00001000 /* Low-Speed packet */
 
#define TRANS_OK   (0)
 
#define TRANS_INPROGRESS   (-1)
 
#define TRANS_DISCARD   (-2)
 
#define TRANS_FAIL   (-3)
 
#define PS_INT   0
 
#define PS_DISCONNECTED   1
 
#define PS_CONNECTED   2
 
#define PS_READY   3
 
#define PS_MISSING   4
 
#define USB_TD_OK   0x00000000 /* TD transmited or received ok */
 
#define USB_TD_INPROGRESS   0x80000000 /* TD is being transmitted */
 
#define USB_TD_RX_ER_NONOCT   0x40000000 /* Tx Non Octet Aligned Packet */
 
#define USB_TD_RX_ER_BITSTUFF   0x20000000 /* Frame Aborted-Received pkt */
 
#define USB_TD_RX_ER_CRC   0x10000000 /* CRC error */
 
#define USB_TD_RX_ER_OVERUN   0x08000000 /* Over - run occurred */
 
#define USB_TD_RX_ER_PID   0x04000000 /* wrong PID received */
 
#define USB_TD_RX_DATA_UNDERUN   0x02000000 /* shorter than expected */
 
#define USB_TD_RX_DATA_OVERUN   0x01000000 /* longer than expected */
 
#define USB_TD_TX_ER_NAK   0x00800000 /* NAK handshake */
 
#define USB_TD_TX_ER_STALL   0x00400000 /* STALL handshake */
 
#define USB_TD_TX_ER_TIMEOUT   0x00200000 /* transmit time out */
 
#define USB_TD_TX_ER_UNDERUN   0x00100000 /* transmit underrun */
 
#define USB_TD_ERROR
 
#define USB_TD_TOGGLE_DATA0   0
 
#define USB_TD_TOGGLE_DATA1   1
 
#define USB_TD_TOGGLE_CARRY   2
 
#define BUS_MODE_GBL   0x20 /* Global snooping */
 
#define BUS_MODE_BO   0x18 /* Byte ordering */
 
#define BUS_MODE_BO_BE   0x10 /* Byte ordering - Big-endian */
 
#define BUS_MODE_DTB   0x02 /* Data bus */
 
#define USB_MODE_EN   0x01
 
#define USB_MODE_HOST   0x02
 
#define USB_MODE_TEST   0x04
 
#define USB_MODE_SFTE   0x08
 
#define USB_MODE_RESUME   0x40
 
#define USB_MODE_LSS   0x80
 
#define USB_SLVADDR_MASK   0x7F
 
#define USB_EPNUM_MASK   0xF000
 
#define USB_EPNUM_SHIFT   12
 
#define USB_TRANS_MODE_SHIFT   8
 
#define USB_TRANS_CTR   0x0000
 
#define USB_TRANS_INT   0x0100
 
#define USB_TRANS_BULK   0x0200
 
#define USB_TRANS_ISO   0x0300
 
#define USB_EP_MF   0x0020
 
#define USB_EP_RTE   0x0010
 
#define USB_THS_SHIFT   2
 
#define USB_THS_MASK   0x000c
 
#define USB_THS_NORMAL   0x0
 
#define USB_THS_IGNORE_IN   0x0004
 
#define USB_THS_NACK   0x0008
 
#define USB_THS_STALL   0x000c
 
#define USB_RHS_SHIFT   0
 
#define USB_RHS_MASK   0x0003
 
#define USB_RHS_NORMAL   0x0
 
#define USB_RHS_IGNORE_OUT   0x0001
 
#define USB_RHS_NACK   0x0002
 
#define USB_RHS_STALL   0x0003
 
#define USB_RTHS_MASK   0x000f
 
#define USB_CMD_STR_FIFO   0x80
 
#define USB_CMD_FLUSH_FIFO   0x40
 
#define USB_CMD_ISFT   0x20
 
#define USB_CMD_DSFT   0x10
 
#define USB_CMD_EP_MASK   0x03
 
#define USB_E_MSF_MASK   0x0800
 
#define USB_E_SFT_MASK   0x0400
 
#define USB_E_RESET_MASK   0x0200
 
#define USB_E_IDLE_MASK   0x0100
 
#define USB_E_TXE4_MASK   0x0080
 
#define USB_E_TXE3_MASK   0x0040
 
#define USB_E_TXE2_MASK   0x0020
 
#define USB_E_TXE1_MASK   0x0010
 
#define USB_E_SOF_MASK   0x0008
 
#define USB_E_BSY_MASK   0x0004
 
#define USB_E_TXB_MASK   0x0002
 
#define USB_E_RXB_MASK   0x0001
 
#define USB_FRAME_USAGE   90
 
#define FRAME_TIME_USAGE   (USB_FRAME_USAGE*10) /* frame time usage */
 
#define SW_FIX_TIME_BETWEEN_TRANSACTION   150 /* SW */
 
#define MAX_BYTES_PER_FRAME   (USB_FRAME_USAGE*15)
 
#define MAX_PERIODIC_FRAME_USAGE   90
 
#define DEFAULT_RING_LEN   8
 
#define DEFAULT_DATA_MEM   MEM_CACHABLE_SYS
 
#define URB_INPROGRESS   0
 
#define URB_DEL   1
 
#define US_BULK   0
 
#define US_BULK0   1
 
#define US_CTRL_SETUP   2
 
#define US_CTRL_DATA   1
 
#define US_CTRL_ACK   0
 
#define EP_ZERO   0
 
#define FRAME_IS_TRANSMITTED   0x00
 
#define FRAME_TIMER_END_TRANSMISSION   0x01
 
#define FRAME_DATA_END_TRANSMISSION   0x02
 
#define FRAME_END_TRANSMISSION   0x03
 
#define FRAME_IS_PREPARED   0x04
 
#define fhci_dbg(fhci, fmt, args...)   dev_dbg(fhci_to_hcd(fhci)->self.controller, fmt, ##args)
 
#define fhci_vdbg(fhci, fmt, args...)   dev_vdbg(fhci_to_hcd(fhci)->self.controller, fmt, ##args)
 
#define fhci_err(fhci, fmt, args...)   dev_err(fhci_to_hcd(fhci)->self.controller, fmt, ##args)
 
#define fhci_info(fhci, fmt, args...)   dev_info(fhci_to_hcd(fhci)->self.controller, fmt, ##args)
 
#define fhci_warn(fhci, fmt, args...)   dev_warn(fhci_to_hcd(fhci)->self.controller, fmt, ##args)
 

Enumerations

enum  fhci_gpios {
  GPIO_USBOE = 0, GPIO_USBTP, GPIO_USBTN, GPIO_USBRP,
  GPIO_USBRN, GPIO_SPEED, GPIO_POWER, NUM_GPIOS
}
 
enum  fhci_pins { PIN_USBOE = 0, PIN_USBTP, PIN_USBTN, NUM_PINS }
 
enum  fhci_ta_type { FHCI_TA_IN = 0, FHCI_TA_OUT, FHCI_TA_SETUP }
 
enum  fhci_tf_mode { FHCI_TF_CTRL = 0, FHCI_TF_ISO, FHCI_TF_BULK, FHCI_TF_INTR }
 
enum  fhci_speed { FHCI_FULL_SPEED, FHCI_LOW_SPEED }
 
enum  fhci_ed_state {
  FHCI_ED_NEW = 0, FHCI_ED_OPER, FHCI_ED_URB_DEL, FHCI_ED_SKIP,
  FHCI_ED_HALTED
}
 
enum  fhci_port_status {
  FHCI_PORT_POWER_OFF = 0, FHCI_PORT_DISABLED, FHCI_PORT_DISCONNECTING, FHCI_PORT_WAITING,
  FHCI_PORT_FULL, FHCI_PORT_LOW
}
 
enum  fhci_mem_alloc { MEM_CACHABLE_SYS = 0x00000001, MEM_NOCACHE_SYS = 0x00000004, MEM_SECONDARY = 0x00000002, MEM_PRAM = 0x00000008 }
 

Functions

void fhci_start_sof_timer (struct fhci_hcd *fhci)
 
void fhci_stop_sof_timer (struct fhci_hcd *fhci)
 
u16 fhci_get_sof_timer_count (struct fhci_usb *usb)
 
void fhci_usb_enable_interrupt (struct fhci_usb *usb)
 
void fhci_usb_disable_interrupt (struct fhci_usb *usb)
 
int fhci_ioports_check_bus_state (struct fhci_hcd *fhci)
 
void fhci_recycle_empty_td (struct fhci_hcd *fhci, struct td *td)
 
void fhci_recycle_empty_ed (struct fhci_hcd *fhci, struct ed *ed)
 
struct edfhci_get_empty_ed (struct fhci_hcd *fhci)
 
struct tdfhci_td_fill (struct fhci_hcd *fhci, struct urb *urb, struct urb_priv *urb_priv, struct ed *ed, u16 index, enum fhci_ta_type type, int toggle, u8 *data, u32 len, u16 interval, u16 start_frame, bool ioc)
 
void fhci_add_tds_to_ed (struct ed *ed, struct td **td_list, int number)
 
void fhci_config_transceiver (struct fhci_hcd *fhci, enum fhci_port_status status)
 
void fhci_port_disable (struct fhci_hcd *fhci)
 
void fhci_port_enable (void *lld)
 
void fhci_io_port_generate_reset (struct fhci_hcd *fhci)
 
void fhci_port_reset (void *lld)
 
int fhci_hub_status_data (struct usb_hcd *hcd, char *buf)
 
int fhci_hub_control (struct usb_hcd *hcd, u16 typeReq, u16 wValue, u16 wIndex, char *buf, u16 wLength)
 
void fhci_flush_bds (struct fhci_usb *usb)
 
void fhci_flush_actual_frame (struct fhci_usb *usb)
 
u32 fhci_host_transaction (struct fhci_usb *usb, struct packet *pkt, enum fhci_ta_type trans_type, u8 dest_addr, u8 dest_ep, enum fhci_tf_mode trans_mode, enum fhci_speed dest_speed, u8 data_toggle)
 
void fhci_host_transmit_actual_frame (struct fhci_usb *usb)
 
void fhci_tx_conf_interrupt (struct fhci_usb *usb)
 
void fhci_push_dummy_bd (struct endpoint *ep)
 
u32 fhci_create_ep (struct fhci_usb *usb, enum fhci_mem_alloc data_mem, u32 ring_len)
 
void fhci_init_ep_registers (struct fhci_usb *usb, struct endpoint *ep, enum fhci_mem_alloc data_mem)
 
void fhci_ep0_free (struct fhci_usb *usb)
 
void fhci_transaction_confirm (struct fhci_usb *usb, struct packet *pkt)
 
void fhci_flush_all_transmissions (struct fhci_usb *usb)
 
void fhci_schedule_transactions (struct fhci_usb *usb)
 
void fhci_device_connected_interrupt (struct fhci_hcd *fhci)
 
void fhci_device_disconnected_interrupt (struct fhci_hcd *fhci)
 
void fhci_queue_urb (struct fhci_hcd *fhci, struct urb *urb)
 
u32 fhci_transfer_confirm_callback (struct fhci_hcd *fhci)
 
irqreturn_t fhci_irq (struct usb_hcd *hcd)
 
irqreturn_t fhci_frame_limit_timer_irq (int irq, void *_hcd)
 
void fhci_urb_complete_free (struct fhci_hcd *fhci, struct urb *urb)
 
struct tdfhci_remove_td_from_ed (struct ed *ed)
 
struct tdfhci_remove_td_from_frame (struct fhci_time_frame *frame)
 
void fhci_move_td_from_ed_to_done_list (struct fhci_usb *usb, struct ed *ed)
 
struct tdfhci_peek_td_from_frame (struct fhci_time_frame *frame)
 
void fhci_add_td_to_frame (struct fhci_time_frame *frame, struct td *td)
 
struct tdfhci_remove_td_from_done_list (struct fhci_controller_list *p_list)
 
void fhci_done_td (struct urb *urb, struct td *td)
 
void fhci_del_ed_list (struct fhci_hcd *fhci, struct ed *ed)
 

Variables

struct tasklet_struct fhci_tasklet
 

Macro Definition Documentation

#define BUS_MODE_BO   0x18 /* Byte ordering */

Definition at line 110 of file fhci.h.

#define BUS_MODE_BO_BE   0x10 /* Byte ordering - Big-endian */

Definition at line 111 of file fhci.h.

#define BUS_MODE_DTB   0x02 /* Data bus */

Definition at line 112 of file fhci.h.

#define BUS_MODE_GBL   0x20 /* Global snooping */

Definition at line 109 of file fhci.h.

#define CRC_SIZE   2

Definition at line 42 of file fhci.h.

#define DEFAULT_DATA_MEM   MEM_CACHABLE_SYS

Definition at line 327 of file fhci.h.

#define DEFAULT_RING_LEN   8

Definition at line 326 of file fhci.h.

#define EP_ZERO   0

Definition at line 389 of file fhci.h.

#define fhci_dbg (   fhci,
  fmt,
  args... 
)    dev_dbg(fhci_to_hcd(fhci)->self.controller, fmt, ##args)

Definition at line 457 of file fhci.h.

#define fhci_err (   fhci,
  fmt,
  args... 
)    dev_err(fhci_to_hcd(fhci)->self.controller, fmt, ##args)

Definition at line 461 of file fhci.h.

#define fhci_info (   fhci,
  fmt,
  args... 
)    dev_info(fhci_to_hcd(fhci)->self.controller, fmt, ##args)

Definition at line 463 of file fhci.h.

#define FHCI_PRAM_SIZE   0x100

Definition at line 35 of file fhci.h.

#define fhci_vdbg (   fhci,
  fmt,
  args... 
)    dev_vdbg(fhci_to_hcd(fhci)->self.controller, fmt, ##args)

Definition at line 459 of file fhci.h.

#define fhci_warn (   fhci,
  fmt,
  args... 
)    dev_warn(fhci_to_hcd(fhci)->self.controller, fmt, ##args)

Definition at line 465 of file fhci.h.

#define FRAME_DATA_END_TRANSMISSION   0x02

Definition at line 419 of file fhci.h.

#define FRAME_END_TRANSMISSION   0x03

Definition at line 420 of file fhci.h.

#define FRAME_IS_PREPARED   0x04

Definition at line 421 of file fhci.h.

#define FRAME_IS_TRANSMITTED   0x00

Definition at line 417 of file fhci.h.

#define FRAME_TIME_USAGE   (USB_FRAME_USAGE*10) /* frame time usage */

Definition at line 275 of file fhci.h.

#define FRAME_TIMER_END_TRANSMISSION   0x01

Definition at line 418 of file fhci.h.

#define MAX_BYTES_PER_FRAME   (USB_FRAME_USAGE*15)

Definition at line 277 of file fhci.h.

#define MAX_EDS   32

Definition at line 37 of file fhci.h.

#define MAX_PERIODIC_FRAME_USAGE   90

Definition at line 278 of file fhci.h.

#define MAX_TDS   32

Definition at line 38 of file fhci.h.

#define PKT_DUMMY_PACKET   0x00002000 /* Dummy packet, used for mmm */

Definition at line 66 of file fhci.h.

#define PKT_FIRST_IN_FRAME   0x01000000 /* First packet in the frame */

Definition at line 55 of file fhci.h.

#define PKT_HOST_COMMAND   0x00004000 /* Host command packet */

Definition at line 65 of file fhci.h.

#define PKT_HOST_DATA   0x02000000 /* Data packet */

Definition at line 54 of file fhci.h.

#define PKT_IN_TOKEN_FRAME   0x00200000 /* IN token packet */

Definition at line 58 of file fhci.h.

#define PKT_LOW_SPEED_PACKET   0x00001000 /* Low-Speed packet */

Definition at line 67 of file fhci.h.

#define PKT_NACK_FRAME   0x00020000 /* NACK packet */

Definition at line 62 of file fhci.h.

#define PKT_NO_CRC   0x00008000 /* don't append CRC */

Definition at line 64 of file fhci.h.

#define PKT_NO_PID   0x00010000 /* No PID */

Definition at line 63 of file fhci.h.

#define PKT_OUT_TOKEN_FRAME   0x00100000 /* OUT token packet */

Definition at line 59 of file fhci.h.

#define PKT_PID_DATA0   0x80000000 /* PID - Data toggle zero */

Definition at line 48 of file fhci.h.

#define PKT_PID_DATA1   0x40000000 /* PID - Data toggle one */

Definition at line 49 of file fhci.h.

#define PKT_PID_SETUP   0x20000000 /* PID - Setup bit */

Definition at line 50 of file fhci.h.

#define PKT_SET_HOST_LAST   0x04000000 /* Last data packet */

Definition at line 53 of file fhci.h.

#define PKT_SETADDR_STATUS   0x08000000 /* Set address status bit */

Definition at line 52 of file fhci.h.

#define PKT_SETUP_STATUS   0x10000000 /* Setup status bit */

Definition at line 51 of file fhci.h.

#define PKT_SETUP_TOKEN_FRAME   0x00080000 /* SETUP token packet */

Definition at line 60 of file fhci.h.

#define PKT_STALL_FRAME   0x00040000 /* STALL packet */

Definition at line 61 of file fhci.h.

#define PKT_TOKEN_FRAME   0x00800000 /* Token packet */

Definition at line 56 of file fhci.h.

#define PKT_ZLP   0x00400000 /* Zero length packet */

Definition at line 57 of file fhci.h.

#define PROTOCOL_OVERHEAD   7

Definition at line 45 of file fhci.h.

#define PS_CONNECTED   2

Definition at line 76 of file fhci.h.

#define PS_DISCONNECTED   1

Definition at line 75 of file fhci.h.

#define PS_INT   0

Definition at line 74 of file fhci.h.

#define PS_MISSING   4

Definition at line 78 of file fhci.h.

#define PS_READY   3

Definition at line 77 of file fhci.h.

#define SW_FIX_TIME_BETWEEN_TRANSACTION   150 /* SW */

Definition at line 276 of file fhci.h.

#define TRANS_DISCARD   (-2)

Definition at line 71 of file fhci.h.

#define TRANS_FAIL   (-3)

Definition at line 72 of file fhci.h.

#define TRANS_INPROGRESS   (-1)

Definition at line 70 of file fhci.h.

#define TRANS_OK   (0)

Definition at line 69 of file fhci.h.

#define URB_DEL   1

Definition at line 378 of file fhci.h.

#define URB_INPROGRESS   0

Definition at line 377 of file fhci.h.

#define US_BULK   0

Definition at line 381 of file fhci.h.

#define US_BULK0   1

Definition at line 382 of file fhci.h.

#define US_CTRL_ACK   0

Definition at line 387 of file fhci.h.

#define US_CTRL_DATA   1

Definition at line 386 of file fhci.h.

#define US_CTRL_SETUP   2

Definition at line 385 of file fhci.h.

#define USB_CLOCK   48000000

Definition at line 33 of file fhci.h.

#define USB_CMD_DSFT   0x10

Definition at line 160 of file fhci.h.

#define USB_CMD_EP_MASK   0x03

Definition at line 161 of file fhci.h.

#define USB_CMD_FLUSH_FIFO   0x40

Definition at line 158 of file fhci.h.

#define USB_CMD_ISFT   0x20

Definition at line 159 of file fhci.h.

#define USB_CMD_STR_FIFO   0x80

Definition at line 157 of file fhci.h.

#define USB_E_BSY_MASK   0x0004

Definition at line 173 of file fhci.h.

#define USB_E_IDLE_MASK   0x0100

Definition at line 167 of file fhci.h.

#define USB_E_MSF_MASK   0x0800

Definition at line 164 of file fhci.h.

#define USB_E_RESET_MASK   0x0200

Definition at line 166 of file fhci.h.

#define USB_E_RXB_MASK   0x0001

Definition at line 175 of file fhci.h.

#define USB_E_SFT_MASK   0x0400

Definition at line 165 of file fhci.h.

#define USB_E_SOF_MASK   0x0008

Definition at line 172 of file fhci.h.

#define USB_E_TXB_MASK   0x0002

Definition at line 174 of file fhci.h.

#define USB_E_TXE1_MASK   0x0010

Definition at line 171 of file fhci.h.

#define USB_E_TXE2_MASK   0x0020

Definition at line 170 of file fhci.h.

#define USB_E_TXE3_MASK   0x0040

Definition at line 169 of file fhci.h.

#define USB_E_TXE4_MASK   0x0080

Definition at line 168 of file fhci.h.

#define USB_EP_MF   0x0020

Definition at line 137 of file fhci.h.

#define USB_EP_RTE   0x0010

Definition at line 138 of file fhci.h.

#define USB_EPNUM_MASK   0xF000

Definition at line 128 of file fhci.h.

#define USB_EPNUM_SHIFT   12

Definition at line 129 of file fhci.h.

#define USB_FRAME_USAGE   90

Definition at line 274 of file fhci.h.

#define USB_MODE_EN   0x01

Definition at line 117 of file fhci.h.

#define USB_MODE_HOST   0x02

Definition at line 118 of file fhci.h.

#define USB_MODE_LSS   0x80

Definition at line 122 of file fhci.h.

#define USB_MODE_RESUME   0x40

Definition at line 121 of file fhci.h.

#define USB_MODE_SFTE   0x08

Definition at line 120 of file fhci.h.

#define USB_MODE_TEST   0x04

Definition at line 119 of file fhci.h.

#define USB_RHS_IGNORE_OUT   0x0001

Definition at line 150 of file fhci.h.

#define USB_RHS_MASK   0x0003

Definition at line 148 of file fhci.h.

#define USB_RHS_NACK   0x0002

Definition at line 151 of file fhci.h.

#define USB_RHS_NORMAL   0x0

Definition at line 149 of file fhci.h.

#define USB_RHS_SHIFT   0

Definition at line 147 of file fhci.h.

#define USB_RHS_STALL   0x0003

Definition at line 152 of file fhci.h.

#define USB_RTHS_MASK   0x000f

Definition at line 154 of file fhci.h.

#define USB_SLVADDR_MASK   0x7F

Definition at line 125 of file fhci.h.

#define USB_TD_ERROR
Value:
USB_TD_RX_ER_CRC | USB_TD_RX_ER_OVERUN | USB_TD_RX_ER_PID | \
USB_TD_RX_DATA_UNDERUN | USB_TD_RX_DATA_OVERUN | \
USB_TD_TX_ER_NAK | USB_TD_TX_ER_STALL | \
USB_TD_TX_ER_TIMEOUT | USB_TD_TX_ER_UNDERUN)

Definition at line 95 of file fhci.h.

#define USB_TD_INPROGRESS   0x80000000 /* TD is being transmitted */

Definition at line 82 of file fhci.h.

#define USB_TD_OK   0x00000000 /* TD transmited or received ok */

Definition at line 81 of file fhci.h.

#define USB_TD_RX_DATA_OVERUN   0x01000000 /* longer than expected */

Definition at line 89 of file fhci.h.

#define USB_TD_RX_DATA_UNDERUN   0x02000000 /* shorter than expected */

Definition at line 88 of file fhci.h.

#define USB_TD_RX_ER_BITSTUFF   0x20000000 /* Frame Aborted-Received pkt */

Definition at line 84 of file fhci.h.

#define USB_TD_RX_ER_CRC   0x10000000 /* CRC error */

Definition at line 85 of file fhci.h.

#define USB_TD_RX_ER_NONOCT   0x40000000 /* Tx Non Octet Aligned Packet */

Definition at line 83 of file fhci.h.

#define USB_TD_RX_ER_OVERUN   0x08000000 /* Over - run occurred */

Definition at line 86 of file fhci.h.

#define USB_TD_RX_ER_PID   0x04000000 /* wrong PID received */

Definition at line 87 of file fhci.h.

#define USB_TD_TOGGLE_CARRY   2

Definition at line 104 of file fhci.h.

#define USB_TD_TOGGLE_DATA0   0

Definition at line 102 of file fhci.h.

#define USB_TD_TOGGLE_DATA1   1

Definition at line 103 of file fhci.h.

#define USB_TD_TX_ER_NAK   0x00800000 /* NAK handshake */

Definition at line 90 of file fhci.h.

#define USB_TD_TX_ER_STALL   0x00400000 /* STALL handshake */

Definition at line 91 of file fhci.h.

#define USB_TD_TX_ER_TIMEOUT   0x00200000 /* transmit time out */

Definition at line 92 of file fhci.h.

#define USB_TD_TX_ER_UNDERUN   0x00100000 /* transmit underrun */

Definition at line 93 of file fhci.h.

#define USB_THS_IGNORE_IN   0x0004

Definition at line 143 of file fhci.h.

#define USB_THS_MASK   0x000c

Definition at line 141 of file fhci.h.

#define USB_THS_NACK   0x0008

Definition at line 144 of file fhci.h.

#define USB_THS_NORMAL   0x0

Definition at line 142 of file fhci.h.

#define USB_THS_SHIFT   2

Definition at line 140 of file fhci.h.

#define USB_THS_STALL   0x000c

Definition at line 145 of file fhci.h.

#define USB_TRANS_BULK   0x0200

Definition at line 134 of file fhci.h.

#define USB_TRANS_CTR   0x0000

Definition at line 132 of file fhci.h.

#define USB_TRANS_INT   0x0100

Definition at line 133 of file fhci.h.

#define USB_TRANS_ISO   0x0300

Definition at line 135 of file fhci.h.

#define USB_TRANS_MODE_SHIFT   8

Definition at line 131 of file fhci.h.

Enumeration Type Documentation

Enumerator:
FHCI_ED_NEW 
FHCI_ED_OPER 
FHCI_ED_URB_DEL 
FHCI_ED_SKIP 
FHCI_ED_HALTED 

Definition at line 301 of file fhci.h.

enum fhci_gpios
Enumerator:
GPIO_USBOE 
GPIO_USBTP 
GPIO_USBTN 
GPIO_USBRP 
GPIO_USBRN 
GPIO_SPEED 
GPIO_POWER 
NUM_GPIOS 

Definition at line 226 of file fhci.h.

Enumerator:
MEM_CACHABLE_SYS 
MEM_NOCACHE_SYS 
MEM_SECONDARY 
MEM_PRAM 

Definition at line 318 of file fhci.h.

enum fhci_pins
Enumerator:
PIN_USBOE 
PIN_USBTP 
PIN_USBTN 
NUM_PINS 

Definition at line 238 of file fhci.h.

Enumerator:
FHCI_PORT_POWER_OFF 
FHCI_PORT_DISABLED 
FHCI_PORT_DISCONNECTING 
FHCI_PORT_WAITING 
FHCI_PORT_FULL 
FHCI_PORT_LOW 

Definition at line 309 of file fhci.h.

enum fhci_speed
Enumerator:
FHCI_FULL_SPEED 
FHCI_LOW_SPEED 

Definition at line 295 of file fhci.h.

Enumerator:
FHCI_TA_IN 
FHCI_TA_OUT 
FHCI_TA_SETUP 

Definition at line 281 of file fhci.h.

Enumerator:
FHCI_TF_CTRL 
FHCI_TF_ISO 
FHCI_TF_BULK 
FHCI_TF_INTR 

Definition at line 288 of file fhci.h.

Function Documentation

void fhci_add_td_to_frame ( struct fhci_time_frame frame,
struct td td 
)

Definition at line 57 of file fhci-q.c.

void fhci_add_tds_to_ed ( struct ed ed,
struct td **  td_list,
int  number 
)

Definition at line 62 of file fhci-q.c.

void fhci_config_transceiver ( struct fhci_hcd fhci,
enum fhci_port_status  status 
)

Definition at line 55 of file fhci-hub.c.

u32 fhci_create_ep ( struct fhci_usb usb,
enum fhci_mem_alloc  data_mem,
u32  ring_len 
)

Definition at line 152 of file fhci-tds.c.

void fhci_del_ed_list ( struct fhci_hcd fhci,
struct ed ed 
)

Definition at line 269 of file fhci-q.c.

void fhci_device_connected_interrupt ( struct fhci_hcd fhci)

Definition at line 453 of file fhci-sched.c.

void fhci_device_disconnected_interrupt ( struct fhci_hcd fhci)

Definition at line 428 of file fhci-sched.c.

void fhci_done_td ( struct urb urb,
struct td td 
)

Definition at line 218 of file fhci-q.c.

void fhci_ep0_free ( struct fhci_usb usb)

Definition at line 99 of file fhci-tds.c.

void fhci_flush_actual_frame ( struct fhci_usb usb)

Definition at line 527 of file fhci-tds.c.

void fhci_flush_all_transmissions ( struct fhci_usb usb)

Definition at line 130 of file fhci-sched.c.

void fhci_flush_bds ( struct fhci_usb usb)

Definition at line 472 of file fhci-tds.c.

irqreturn_t fhci_frame_limit_timer_irq ( int  irq,
void _hcd 
)

Definition at line 508 of file fhci-sched.c.

struct ed* fhci_get_empty_ed ( struct fhci_hcd fhci)
read

Definition at line 65 of file fhci-mem.c.

u16 fhci_get_sof_timer_count ( struct fhci_usb usb)

Definition at line 59 of file fhci-hcd.c.

u32 fhci_host_transaction ( struct fhci_usb usb,
struct packet pkt,
enum fhci_ta_type  trans_type,
u8  dest_addr,
u8  dest_ep,
enum fhci_tf_mode  trans_mode,
enum fhci_speed  dest_speed,
u8  data_toggle 
)

Definition at line 381 of file fhci-tds.c.

void fhci_host_transmit_actual_frame ( struct fhci_usb usb)

Definition at line 594 of file fhci-tds.c.

int fhci_hub_control ( struct usb_hcd *  hcd,
u16  typeReq,
u16  wValue,
u16  wIndex,
char buf,
u16  wLength 
)

Definition at line 206 of file fhci-hub.c.

int fhci_hub_status_data ( struct usb_hcd *  hcd,
char buf 
)

Definition at line 181 of file fhci-hub.c.

void fhci_init_ep_registers ( struct fhci_usb usb,
struct endpoint ep,
enum fhci_mem_alloc  data_mem 
)

Definition at line 246 of file fhci-tds.c.

void fhci_io_port_generate_reset ( struct fhci_hcd fhci)

Definition at line 132 of file fhci-hub.c.

int fhci_ioports_check_bus_state ( struct fhci_hcd fhci)

Definition at line 150 of file fhci-hcd.c.

irqreturn_t fhci_irq ( struct usb_hcd *  hcd)

Definition at line 546 of file fhci-sched.c.

void fhci_move_td_from_ed_to_done_list ( struct fhci_usb usb,
struct ed ed 
)

Definition at line 144 of file fhci-q.c.

struct td* fhci_peek_td_from_frame ( struct fhci_time_frame frame)
read

Definition at line 99 of file fhci-q.c.

void fhci_port_disable ( struct fhci_hcd fhci)

Definition at line 83 of file fhci-hub.c.

void fhci_port_enable ( void lld)

Definition at line 113 of file fhci-hub.c.

void fhci_port_reset ( void lld)

Definition at line 150 of file fhci-hub.c.

void fhci_push_dummy_bd ( struct endpoint ep)

Definition at line 86 of file fhci-tds.c.

void fhci_queue_urb ( struct fhci_hcd fhci,
struct urb urb 
)

Definition at line 701 of file fhci-sched.c.

void fhci_recycle_empty_ed ( struct fhci_hcd fhci,
struct ed ed 
)

Definition at line 83 of file fhci-mem.c.

void fhci_recycle_empty_td ( struct fhci_hcd fhci,
struct td td 
)

Definition at line 59 of file fhci-mem.c.

struct td* fhci_remove_td_from_done_list ( struct fhci_controller_list p_list)
read

Definition at line 131 of file fhci-q.c.

struct td* fhci_remove_td_from_ed ( struct ed ed)
read

Definition at line 111 of file fhci-q.c.

struct td* fhci_remove_td_from_frame ( struct fhci_time_frame frame)
read

Definition at line 86 of file fhci-q.c.

void fhci_schedule_transactions ( struct fhci_usb usb)

Definition at line 362 of file fhci-sched.c.

void fhci_start_sof_timer ( struct fhci_hcd fhci)

Definition at line 36 of file fhci-hcd.c.

void fhci_stop_sof_timer ( struct fhci_hcd fhci)

Definition at line 49 of file fhci-hcd.c.

struct td* fhci_td_fill ( struct fhci_hcd fhci,
struct urb urb,
struct urb_priv urb_priv,
struct ed ed,
u16  index,
enum fhci_ta_type  type,
int  toggle,
u8 data,
u32  len,
u16  interval,
u16  start_frame,
bool  ioc 
)
read

Definition at line 89 of file fhci-mem.c.

void fhci_transaction_confirm ( struct fhci_usb usb,
struct packet pkt 
)

Definition at line 44 of file fhci-sched.c.

u32 fhci_transfer_confirm_callback ( struct fhci_hcd fhci)

Definition at line 687 of file fhci-sched.c.

void fhci_tx_conf_interrupt ( struct fhci_usb usb)

Definition at line 580 of file fhci-tds.c.

void fhci_urb_complete_free ( struct fhci_hcd fhci,
struct urb urb 
)

Definition at line 193 of file fhci-q.c.

void fhci_usb_disable_interrupt ( struct fhci_usb usb)

Definition at line 102 of file fhci-hcd.c.

void fhci_usb_enable_interrupt ( struct fhci_usb usb)

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

Variable Documentation

struct tasklet_struct fhci_tasklet