Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
ucc_uart.c File Reference
#include <linux/module.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/io.h>
#include <linux/of_platform.h>
#include <linux/dma-mapping.h>
#include <linux/fs_uart_pd.h>
#include <asm/ucc_slow.h>
#include <linux/firmware.h>
#include <asm/reg.h>

Go to the source code of this file.

Data Structures

struct  ucc_uart_pram
 
struct  uart_qe_port
 

Macros

#define UCC_SLOW_GUMR_H_SUART   0x00004000 /* Soft-UART */
 
#define SERIAL_QE_MAJOR   204
 
#define SERIAL_QE_MINOR   46
 
#define UCC_MAX_UART   4
 
#define RX_NUM_FIFO   4
 
#define TX_NUM_FIFO   4
 
#define RX_BUF_SIZE   32
 
#define TX_BUF_SIZE   32
 
#define UCC_WAIT_CLOSING   100
 
#define UCC_UART_SUPSMR_SL   0x8000
 
#define UCC_UART_SUPSMR_RPM_MASK   0x6000
 
#define UCC_UART_SUPSMR_RPM_ODD   0x0000
 
#define UCC_UART_SUPSMR_RPM_LOW   0x2000
 
#define UCC_UART_SUPSMR_RPM_EVEN   0x4000
 
#define UCC_UART_SUPSMR_RPM_HIGH   0x6000
 
#define UCC_UART_SUPSMR_PEN   0x1000
 
#define UCC_UART_SUPSMR_TPM_MASK   0x0C00
 
#define UCC_UART_SUPSMR_TPM_ODD   0x0000
 
#define UCC_UART_SUPSMR_TPM_LOW   0x0400
 
#define UCC_UART_SUPSMR_TPM_EVEN   0x0800
 
#define UCC_UART_SUPSMR_TPM_HIGH   0x0C00
 
#define UCC_UART_SUPSMR_FRZ   0x0100
 
#define UCC_UART_SUPSMR_UM_MASK   0x00c0
 
#define UCC_UART_SUPSMR_UM_NORMAL   0x0000
 
#define UCC_UART_SUPSMR_UM_MAN_MULTI   0x0040
 
#define UCC_UART_SUPSMR_UM_AUTO_MULTI   0x00c0
 
#define UCC_UART_SUPSMR_CL_MASK   0x0030
 
#define UCC_UART_SUPSMR_CL_8   0x0030
 
#define UCC_UART_SUPSMR_CL_7   0x0020
 
#define UCC_UART_SUPSMR_CL_6   0x0010
 
#define UCC_UART_SUPSMR_CL_5   0x0000
 
#define UCC_UART_TX_STATE_AHDLC   0x00
 
#define UCC_UART_TX_STATE_UART   0x01
 
#define UCC_UART_TX_STATE_X1   0x00
 
#define UCC_UART_TX_STATE_X16   0x80
 
#define UCC_UART_PRAM_ALIGNMENT   0x100
 
#define UCC_UART_SIZE_OF_BD   UCC_SLOW_SIZE_OF_BD
 
#define NUM_CONTROL_CHARS   8
 

Functions

struct ucc_uart_pram __attribute__ ((packed))
 
void qe_uart_set_mctrl (struct uart_port *port, unsigned int mctrl)
 
 MODULE_DEVICE_TABLE (of, ucc_uart_match)
 
 module_init (ucc_uart_init)
 
 module_exit (ucc_uart_exit)
 
 MODULE_DESCRIPTION ("Freescale QUICC Engine (QE) UART")
 
 MODULE_AUTHOR ("Timur Tabi <[email protected]>")
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_ALIAS_CHARDEV_MAJOR (SERIAL_QE_MAJOR)
 

Variables

struct ucc_slow_pram common
 
u8 res1 [8]
 
__be16 maxidl
 
__be16 idlc
 
__be16 brkcr
 
__be16 parec
 
__be16 frmec
 
__be16 nosec
 
__be16 brkec
 
__be16 brkln
 
__be16 uaddr [2]
 
__be16 rtemp
 
__be16 toseq
 
__be16 cchars [8]
 
__be16 rccm
 
__be16 rccr
 
__be16 rlbc
 
__be16 res2
 
__be32 res3
 
u8 res4
 
u8 res5 [3]
 
__be32 res6
 
__be32 res7
 
__be32 res8
 
__be32 res9
 
__be32 res10
 
__be32 res11
 
__be32 res12
 
__be32 res13
 
__be16 supsmr
 
__be16 res92
 
__be32 rx_state
 
__be32 rx_cnt
 
u8 rx_length
 
u8 rx_bitmark
 
u8 rx_temp_dlst_qe
 
u8 res14 [0xBC-0x9F]
 
__be32 dump_ptr
 
__be32 rx_frame_rem
 
u8 rx_frame_rem_size
 
u8 tx_mode
 
__be16 tx_state
 
u8 res15 [0xD0-0xC8]
 
__be32 resD0
 
u8 resD4
 
__be16 resD5
 
struct uart_qe_port __attribute__
 

Macro Definition Documentation

#define NUM_CONTROL_CHARS   8

Definition at line 170 of file ucc_uart.c.

#define RX_BUF_SIZE   32

Definition at line 76 of file ucc_uart.c.

#define RX_NUM_FIFO   4

Definition at line 70 of file ucc_uart.c.

#define SERIAL_QE_MAJOR   204

Definition at line 63 of file ucc_uart.c.

#define SERIAL_QE_MINOR   46

Definition at line 64 of file ucc_uart.c.

#define TX_BUF_SIZE   32

Definition at line 79 of file ucc_uart.c.

#define TX_NUM_FIFO   4

Definition at line 73 of file ucc_uart.c.

#define UCC_MAX_UART   4

Definition at line 67 of file ucc_uart.c.

#define UCC_SLOW_GUMR_H_SUART   0x00004000 /* Soft-UART */

Definition at line 42 of file ucc_uart.c.

#define UCC_UART_PRAM_ALIGNMENT   0x100

Definition at line 167 of file ucc_uart.c.

#define UCC_UART_SIZE_OF_BD   UCC_SLOW_SIZE_OF_BD

Definition at line 169 of file ucc_uart.c.

#define UCC_UART_SUPSMR_CL_5   0x0000

Definition at line 160 of file ucc_uart.c.

#define UCC_UART_SUPSMR_CL_6   0x0010

Definition at line 159 of file ucc_uart.c.

#define UCC_UART_SUPSMR_CL_7   0x0020

Definition at line 158 of file ucc_uart.c.

#define UCC_UART_SUPSMR_CL_8   0x0030

Definition at line 157 of file ucc_uart.c.

#define UCC_UART_SUPSMR_CL_MASK   0x0030

Definition at line 156 of file ucc_uart.c.

#define UCC_UART_SUPSMR_FRZ   0x0100

Definition at line 151 of file ucc_uart.c.

#define UCC_UART_SUPSMR_PEN   0x1000

Definition at line 145 of file ucc_uart.c.

#define UCC_UART_SUPSMR_RPM_EVEN   0x4000

Definition at line 143 of file ucc_uart.c.

#define UCC_UART_SUPSMR_RPM_HIGH   0x6000

Definition at line 144 of file ucc_uart.c.

#define UCC_UART_SUPSMR_RPM_LOW   0x2000

Definition at line 142 of file ucc_uart.c.

#define UCC_UART_SUPSMR_RPM_MASK   0x6000

Definition at line 140 of file ucc_uart.c.

#define UCC_UART_SUPSMR_RPM_ODD   0x0000

Definition at line 141 of file ucc_uart.c.

#define UCC_UART_SUPSMR_SL   0x8000

Definition at line 139 of file ucc_uart.c.

#define UCC_UART_SUPSMR_TPM_EVEN   0x0800

Definition at line 149 of file ucc_uart.c.

#define UCC_UART_SUPSMR_TPM_HIGH   0x0C00

Definition at line 150 of file ucc_uart.c.

#define UCC_UART_SUPSMR_TPM_LOW   0x0400

Definition at line 148 of file ucc_uart.c.

#define UCC_UART_SUPSMR_TPM_MASK   0x0C00

Definition at line 146 of file ucc_uart.c.

#define UCC_UART_SUPSMR_TPM_ODD   0x0000

Definition at line 147 of file ucc_uart.c.

#define UCC_UART_SUPSMR_UM_AUTO_MULTI   0x00c0

Definition at line 155 of file ucc_uart.c.

#define UCC_UART_SUPSMR_UM_MAN_MULTI   0x0040

Definition at line 154 of file ucc_uart.c.

#define UCC_UART_SUPSMR_UM_MASK   0x00c0

Definition at line 152 of file ucc_uart.c.

#define UCC_UART_SUPSMR_UM_NORMAL   0x0000

Definition at line 153 of file ucc_uart.c.

#define UCC_UART_TX_STATE_AHDLC   0x00

Definition at line 162 of file ucc_uart.c.

#define UCC_UART_TX_STATE_UART   0x01

Definition at line 163 of file ucc_uart.c.

#define UCC_UART_TX_STATE_X1   0x00

Definition at line 164 of file ucc_uart.c.

#define UCC_UART_TX_STATE_X16   0x80

Definition at line 165 of file ucc_uart.c.

#define UCC_WAIT_CLOSING   100

Definition at line 86 of file ucc_uart.c.

Function Documentation

struct ucc_uart_pram __attribute__ ( (packed)  )
read

mcontroller : adapter info structure for old mimd_t apps

: base address : irq number : number of logical drives : pci bus : pci device : pci function : pci id : vendor id : slot number : unique id

Definition at line 171 of file esd_usb2.c.

MODULE_ALIAS_CHARDEV_MAJOR ( SERIAL_QE_MAJOR  )
MODULE_AUTHOR ( "Timur Tabi <[email protected]>"  )
MODULE_DESCRIPTION ( "Freescale QUICC Engine (QE) UART )
MODULE_DEVICE_TABLE ( of  ,
ucc_uart_match   
)
module_exit ( ucc_uart_exit  )
module_init ( ucc_uart_init  )
MODULE_LICENSE ( "GPL v2 )
void qe_uart_set_mctrl ( struct uart_port port,
unsigned int  mctrl 
)

Definition at line 282 of file ucc_uart.c.

Variable Documentation

__be16 brkcr

Definition at line 141 of file ucc_uart.c.

__be16 brkec

Definition at line 145 of file ucc_uart.c.

__be16 brkln

Definition at line 146 of file ucc_uart.c.

__be16 cchars[8]

Definition at line 150 of file ucc_uart.c.

struct ucc_slow_pram common

Definition at line 137 of file ucc_uart.c.

__be32 dump_ptr

Definition at line 175 of file ucc_uart.c.

__be16 frmec

Definition at line 143 of file ucc_uart.c.

__be16 idlc

Definition at line 140 of file ucc_uart.c.

__be16 maxidl

Definition at line 139 of file ucc_uart.c.

__be16 nosec

Definition at line 144 of file ucc_uart.c.

__be16 parec

Definition at line 142 of file ucc_uart.c.

__be16 rccm

Definition at line 151 of file ucc_uart.c.

__be16 rccr

Definition at line 152 of file ucc_uart.c.

u8 res1[8]

Definition at line 138 of file ucc_uart.c.

__be32 res10

Definition at line 162 of file ucc_uart.c.

__be32 res11

Definition at line 163 of file ucc_uart.c.

__be32 res12

Definition at line 164 of file ucc_uart.c.

__be32 res13

Definition at line 165 of file ucc_uart.c.

u8 res14[0xBC-0x9F]

Definition at line 174 of file ucc_uart.c.

u8 res15[0xD0-0xC8]

Definition at line 180 of file ucc_uart.c.

__be16 res2

Definition at line 154 of file ucc_uart.c.

__be32 res3

Definition at line 155 of file ucc_uart.c.

u8 res4

Definition at line 156 of file ucc_uart.c.

u8 res5[3]

Definition at line 157 of file ucc_uart.c.

__be32 res6

Definition at line 158 of file ucc_uart.c.

__be32 res7

Definition at line 159 of file ucc_uart.c.

__be32 res8

Definition at line 160 of file ucc_uart.c.

__be32 res9

Definition at line 161 of file ucc_uart.c.

__be16 res92

Definition at line 168 of file ucc_uart.c.

__be32 resD0

Definition at line 181 of file ucc_uart.c.

u8 resD4

Definition at line 182 of file ucc_uart.c.

__be16 resD5

Definition at line 183 of file ucc_uart.c.

__be16 rlbc

Definition at line 153 of file ucc_uart.c.

__be16 rtemp

Definition at line 148 of file ucc_uart.c.

u8 rx_bitmark

Definition at line 172 of file ucc_uart.c.

__be32 rx_cnt

Definition at line 170 of file ucc_uart.c.

__be32 rx_frame_rem

Definition at line 176 of file ucc_uart.c.

u8 rx_frame_rem_size

Definition at line 177 of file ucc_uart.c.

u8 rx_length

Definition at line 171 of file ucc_uart.c.

__be32 rx_state

Definition at line 169 of file ucc_uart.c.

u8 rx_temp_dlst_qe

Definition at line 173 of file ucc_uart.c.

__be16 supsmr

Definition at line 167 of file ucc_uart.c.

__be16 toseq

Definition at line 149 of file ucc_uart.c.

u8 tx_mode

Definition at line 178 of file ucc_uart.c.

__be16 tx_state

Definition at line 179 of file ucc_uart.c.

Definition at line 147 of file ucc_uart.c.