Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
ucc_fast.h File Reference
#include <linux/kernel.h>
#include <asm/immap_qe.h>
#include <asm/qe.h>
#include <asm/ucc.h>

Go to the source code of this file.

Data Structures

struct  ucc_fast_info
 
struct  ucc_fast_private
 

Macros

#define R_E   0x80000000 /* buffer empty */
 
#define R_W   0x20000000 /* wrap bit */
 
#define R_I   0x10000000 /* interrupt on reception */
 
#define R_L   0x08000000 /* last */
 
#define R_F   0x04000000 /* first */
 
#define T_R   0x80000000 /* ready bit */
 
#define T_W   0x20000000 /* wrap bit */
 
#define T_I   0x10000000 /* interrupt on completion */
 
#define T_L   0x08000000 /* last */
 
#define UCC_FAST_RX_ALIGN   4
 
#define UCC_FAST_MRBLR_ALIGNMENT   4
 
#define UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT   8
 
#define UCC_FAST_URFS_MIN_VAL   0x88
 
#define UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR   8
 

Enumerations

enum  ucc_fast_channel_protocol_mode {
  UCC_FAST_PROTOCOL_MODE_HDLC = 0x00000000, UCC_FAST_PROTOCOL_MODE_RESERVED01 = 0x00000001, UCC_FAST_PROTOCOL_MODE_RESERVED_QMC = 0x00000002, UCC_FAST_PROTOCOL_MODE_RESERVED02 = 0x00000003,
  UCC_FAST_PROTOCOL_MODE_RESERVED_UART = 0x00000004, UCC_FAST_PROTOCOL_MODE_RESERVED03 = 0x00000005, UCC_FAST_PROTOCOL_MODE_RESERVED_EX_MAC_1 = 0x00000006, UCC_FAST_PROTOCOL_MODE_RESERVED_EX_MAC_2 = 0x00000007,
  UCC_FAST_PROTOCOL_MODE_RESERVED_BISYNC = 0x00000008, UCC_FAST_PROTOCOL_MODE_RESERVED04 = 0x00000009, UCC_FAST_PROTOCOL_MODE_ATM = 0x0000000A, UCC_FAST_PROTOCOL_MODE_RESERVED05 = 0x0000000B,
  UCC_FAST_PROTOCOL_MODE_ETHERNET = 0x0000000C, UCC_FAST_PROTOCOL_MODE_RESERVED06 = 0x0000000D, UCC_FAST_PROTOCOL_MODE_POS = 0x0000000E, UCC_FAST_PROTOCOL_MODE_RESERVED07 = 0x0000000F
}
 
enum  ucc_fast_transparent_txrx { UCC_FAST_GUMR_TRANSPARENT_TTX_TRX_NORMAL = 0x00000000, UCC_FAST_GUMR_TRANSPARENT_TTX_TRX_TRANSPARENT = 0x18000000 }
 
enum  ucc_fast_diag_mode { UCC_FAST_DIAGNOSTIC_NORMAL = 0x0, UCC_FAST_DIAGNOSTIC_LOCAL_LOOP_BACK = 0x40000000, UCC_FAST_DIAGNOSTIC_AUTO_ECHO = 0x80000000, UCC_FAST_DIAGNOSTIC_LOOP_BACK_AND_ECHO = 0xC0000000 }
 
enum  ucc_fast_sync_len { UCC_FAST_SYNC_LEN_NOT_USED = 0x0, UCC_FAST_SYNC_LEN_AUTOMATIC = 0x00004000, UCC_FAST_SYNC_LEN_8_BIT = 0x00008000, UCC_FAST_SYNC_LEN_16_BIT = 0x0000C000 }
 
enum  ucc_fast_ready_to_send { UCC_FAST_SEND_IDLES_BETWEEN_FRAMES = 0x00000000, UCC_FAST_SEND_FLAGS_BETWEEN_FRAMES = 0x00002000 }
 
enum  ucc_fast_rx_decoding_method { UCC_FAST_RX_ENCODING_NRZ = 0x00000000, UCC_FAST_RX_ENCODING_NRZI = 0x00000800, UCC_FAST_RX_ENCODING_RESERVED0 = 0x00001000, UCC_FAST_RX_ENCODING_RESERVED1 = 0x00001800 }
 
enum  ucc_fast_tx_encoding_method { UCC_FAST_TX_ENCODING_NRZ = 0x00000000, UCC_FAST_TX_ENCODING_NRZI = 0x00000100, UCC_FAST_TX_ENCODING_RESERVED0 = 0x00000200, UCC_FAST_TX_ENCODING_RESERVED1 = 0x00000300 }
 
enum  ucc_fast_transparent_tcrc { UCC_FAST_16_BIT_CRC = 0x00000000, UCC_FAST_CRC_RESERVED0 = 0x00000040, UCC_FAST_32_BIT_CRC = 0x00000080, UCC_FAST_CRC_RESERVED1 = 0x000000C0 }
 

Functions

int ucc_fast_init (struct ucc_fast_info *uf_info, struct ucc_fast_private **uccf_ret)
 
void ucc_fast_free (struct ucc_fast_private *uccf)
 
void ucc_fast_enable (struct ucc_fast_private *uccf, enum comm_dir mode)
 
void ucc_fast_disable (struct ucc_fast_private *uccf, enum comm_dir mode)
 
void ucc_fast_irq (struct ucc_fast_private *uccf)
 
void ucc_fast_transmit_on_demand (struct ucc_fast_private *uccf)
 
u32 ucc_fast_get_qe_cr_subblock (int uccf_num)
 
void ucc_fast_dump_regs (struct ucc_fast_private *uccf)
 

Macro Definition Documentation

#define R_E   0x80000000 /* buffer empty */

Definition at line 25 of file ucc_fast.h.

#define R_F   0x04000000 /* first */

Definition at line 29 of file ucc_fast.h.

#define R_I   0x10000000 /* interrupt on reception */

Definition at line 27 of file ucc_fast.h.

#define R_L   0x08000000 /* last */

Definition at line 28 of file ucc_fast.h.

#define R_W   0x20000000 /* wrap bit */

Definition at line 26 of file ucc_fast.h.

#define T_I   0x10000000 /* interrupt on completion */

Definition at line 34 of file ucc_fast.h.

#define T_L   0x08000000 /* last */

Definition at line 35 of file ucc_fast.h.

#define T_R   0x80000000 /* ready bit */

Definition at line 32 of file ucc_fast.h.

#define T_W   0x20000000 /* wrap bit */

Definition at line 33 of file ucc_fast.h.

#define UCC_FAST_MRBLR_ALIGNMENT   4

Definition at line 39 of file ucc_fast.h.

#define UCC_FAST_RECEIVE_VIRTUAL_FIFO_SIZE_FUDGE_FACTOR   8

Definition at line 44 of file ucc_fast.h.

#define UCC_FAST_RX_ALIGN   4

Definition at line 38 of file ucc_fast.h.

#define UCC_FAST_URFS_MIN_VAL   0x88

Definition at line 43 of file ucc_fast.h.

#define UCC_FAST_VIRT_FIFO_REGS_ALIGNMENT   8

Definition at line 40 of file ucc_fast.h.

Enumeration Type Documentation

Enumerator:
UCC_FAST_PROTOCOL_MODE_HDLC 
UCC_FAST_PROTOCOL_MODE_RESERVED01 
UCC_FAST_PROTOCOL_MODE_RESERVED_QMC 
UCC_FAST_PROTOCOL_MODE_RESERVED02 
UCC_FAST_PROTOCOL_MODE_RESERVED_UART 
UCC_FAST_PROTOCOL_MODE_RESERVED03 
UCC_FAST_PROTOCOL_MODE_RESERVED_EX_MAC_1 
UCC_FAST_PROTOCOL_MODE_RESERVED_EX_MAC_2 
UCC_FAST_PROTOCOL_MODE_RESERVED_BISYNC 
UCC_FAST_PROTOCOL_MODE_RESERVED04 
UCC_FAST_PROTOCOL_MODE_ATM 
UCC_FAST_PROTOCOL_MODE_RESERVED05 
UCC_FAST_PROTOCOL_MODE_ETHERNET 
UCC_FAST_PROTOCOL_MODE_RESERVED06 
UCC_FAST_PROTOCOL_MODE_POS 
UCC_FAST_PROTOCOL_MODE_RESERVED07 

Definition at line 47 of file ucc_fast.h.

Enumerator:
UCC_FAST_DIAGNOSTIC_NORMAL 
UCC_FAST_DIAGNOSTIC_LOCAL_LOOP_BACK 
UCC_FAST_DIAGNOSTIC_AUTO_ECHO 
UCC_FAST_DIAGNOSTIC_LOOP_BACK_AND_ECHO 

Definition at line 73 of file ucc_fast.h.

Enumerator:
UCC_FAST_SEND_IDLES_BETWEEN_FRAMES 
UCC_FAST_SEND_FLAGS_BETWEEN_FRAMES 

Definition at line 89 of file ucc_fast.h.

Enumerator:
UCC_FAST_RX_ENCODING_NRZ 
UCC_FAST_RX_ENCODING_NRZI 
UCC_FAST_RX_ENCODING_RESERVED0 
UCC_FAST_RX_ENCODING_RESERVED1 

Definition at line 95 of file ucc_fast.h.

Enumerator:
UCC_FAST_SYNC_LEN_NOT_USED 
UCC_FAST_SYNC_LEN_AUTOMATIC 
UCC_FAST_SYNC_LEN_8_BIT 
UCC_FAST_SYNC_LEN_16_BIT 

Definition at line 81 of file ucc_fast.h.

Enumerator:
UCC_FAST_16_BIT_CRC 
UCC_FAST_CRC_RESERVED0 
UCC_FAST_32_BIT_CRC 
UCC_FAST_CRC_RESERVED1 

Definition at line 111 of file ucc_fast.h.

Enumerator:
UCC_FAST_GUMR_TRANSPARENT_TTX_TRX_NORMAL 
UCC_FAST_GUMR_TRANSPARENT_TTX_TRX_TRANSPARENT 

Definition at line 67 of file ucc_fast.h.

Enumerator:
UCC_FAST_TX_ENCODING_NRZ 
UCC_FAST_TX_ENCODING_NRZI 
UCC_FAST_TX_ENCODING_RESERVED0 
UCC_FAST_TX_ENCODING_RESERVED1 

Definition at line 103 of file ucc_fast.h.

Function Documentation

void ucc_fast_disable ( struct ucc_fast_private uccf,
enum comm_dir  mode 
)

Definition at line 118 of file ucc_fast.c.

void ucc_fast_dump_regs ( struct ucc_fast_private uccf)

Definition at line 31 of file ucc_fast.c.

void ucc_fast_enable ( struct ucc_fast_private uccf,
enum comm_dir  mode 
)

Definition at line 97 of file ucc_fast.c.

void ucc_fast_free ( struct ucc_fast_private uccf)

Definition at line 348 of file ucc_fast.c.

u32 ucc_fast_get_qe_cr_subblock ( int  uccf_num)

Definition at line 75 of file ucc_fast.c.

int ucc_fast_init ( struct ucc_fast_info uf_info,
struct ucc_fast_private **  uccf_ret 
)

Definition at line 139 of file ucc_fast.c.

void ucc_fast_irq ( struct ucc_fast_private uccf)
void ucc_fast_transmit_on_demand ( struct ucc_fast_private uccf)

Definition at line 91 of file ucc_fast.c.