Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
fhci-tds.c File Reference
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/list.h>
#include <linux/io.h>
#include <linux/usb.h>
#include <linux/usb/hcd.h>
#include "fhci.h"

Go to the source code of this file.

Data Structures

struct  usb_td
 

Macros

#define DUMMY_BD_BUFFER   0xdeadbeef
 
#define DUMMY2_BD_BUFFER   0xbaadf00d
 
#define TD_R   0x8000 /* ready bit */
 
#define TD_W   0x2000 /* wrap bit */
 
#define TD_I   0x1000 /* interrupt on completion */
 
#define TD_L   0x0800 /* last */
 
#define TD_TC   0x0400 /* transmit CRC */
 
#define TD_CNF   0x0200 /* CNF - Must be always 1 */
 
#define TD_LSP   0x0100 /* Low-speed transaction */
 
#define TD_PID   0x00c0 /* packet id */
 
#define TD_RXER   0x0020 /* Rx error or not */
 
#define TD_NAK   0x0010 /* No ack. */
 
#define TD_STAL   0x0008 /* Stall received */
 
#define TD_TO   0x0004 /* time out */
 
#define TD_UN   0x0002 /* underrun */
 
#define TD_NO   0x0010 /* Rx Non Octet Aligned Packet */
 
#define TD_AB   0x0008 /* Frame Aborted */
 
#define TD_CR   0x0004 /* CRC Error */
 
#define TD_OV   0x0002 /* Overrun */
 
#define TD_BOV   0x0001 /* Buffer Overrun */
 
#define TD_ERRORS
 
#define TD_PID_DATA0   0x0080 /* Data 0 toggle */
 
#define TD_PID_DATA1   0x00c0 /* Data 1 toggle */
 
#define TD_PID_TOGGLE   0x00c0 /* Data 0/1 toggle mask */
 
#define TD_TOK_SETUP   0x0000
 
#define TD_TOK_OUT   0x4000
 
#define TD_TOK_IN   0x8000
 
#define TD_ISO   0x1000
 
#define TD_ENDP   0x0780
 
#define TD_ADDR   0x007f
 
#define TD_ENDP_SHIFT   7
 

Functions

void fhci_push_dummy_bd (struct endpoint *ep)
 
void fhci_ep0_free (struct fhci_usb *usb)
 
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)
 
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_flush_bds (struct fhci_usb *usb)
 
void fhci_flush_actual_frame (struct fhci_usb *usb)
 
void fhci_tx_conf_interrupt (struct fhci_usb *usb)
 
void fhci_host_transmit_actual_frame (struct fhci_usb *usb)
 

Variables

struct usb_td __attribute__
 

Macro Definition Documentation

#define DUMMY2_BD_BUFFER   0xbaadf00d

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

#define DUMMY_BD_BUFFER   0xdeadbeef

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

#define TD_AB   0x0008 /* Frame Aborted */

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

#define TD_ADDR   0x007f

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

#define TD_BOV   0x0001 /* Buffer Overrun */

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

#define TD_CNF   0x0200 /* CNF - Must be always 1 */

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

#define TD_CR   0x0004 /* CRC Error */

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

#define TD_ENDP   0x0780

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

#define TD_ENDP_SHIFT   7

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

#define TD_ERRORS
Value:
TD_NO | TD_AB | TD_CR | TD_OV | TD_BOV)

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

#define TD_I   0x1000 /* interrupt on completion */

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

#define TD_ISO   0x1000

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

#define TD_L   0x0800 /* last */

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

#define TD_LSP   0x0100 /* Low-speed transaction */

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

#define TD_NAK   0x0010 /* No ack. */

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

#define TD_NO   0x0010 /* Rx Non Octet Aligned Packet */

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

#define TD_OV   0x0002 /* Overrun */

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

#define TD_PID   0x00c0 /* packet id */

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

#define TD_PID_DATA0   0x0080 /* Data 0 toggle */

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

#define TD_PID_DATA1   0x00c0 /* Data 1 toggle */

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

#define TD_PID_TOGGLE   0x00c0 /* Data 0/1 toggle mask */

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

#define TD_R   0x8000 /* ready bit */

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

#define TD_RXER   0x0020 /* Rx error or not */

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

#define TD_STAL   0x0008 /* Stall received */

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

#define TD_TC   0x0400 /* transmit CRC */

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

#define TD_TO   0x0004 /* time out */

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

#define TD_TOK_IN   0x8000

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

#define TD_TOK_OUT   0x4000

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

#define TD_TOK_SETUP   0x0000

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

#define TD_UN   0x0002 /* underrun */

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

#define TD_W   0x2000 /* wrap bit */

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

Function Documentation

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_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_bds ( struct fhci_usb usb)

Definition at line 472 of file fhci-tds.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.

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_push_dummy_bd ( struct endpoint ep)

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

void fhci_tx_conf_interrupt ( struct fhci_usb usb)

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

Variable Documentation