Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
altera_uart.c File Reference
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/console.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/io.h>
#include <linux/altera_uart.h>

Go to the source code of this file.

Data Structures

struct  altera_uart
 

Macros

#define DRV_NAME   "altera_uart"
 
#define SERIAL_ALTERA_MAJOR   204
 
#define SERIAL_ALTERA_MINOR   213
 
#define ALTERA_UART_SIZE   32
 
#define ALTERA_UART_RXDATA_REG   0
 
#define ALTERA_UART_TXDATA_REG   4
 
#define ALTERA_UART_STATUS_REG   8
 
#define ALTERA_UART_CONTROL_REG   12
 
#define ALTERA_UART_DIVISOR_REG   16
 
#define ALTERA_UART_EOP_REG   20
 
#define ALTERA_UART_STATUS_PE_MSK   0x0001 /* parity error */
 
#define ALTERA_UART_STATUS_FE_MSK   0x0002 /* framing error */
 
#define ALTERA_UART_STATUS_BRK_MSK   0x0004 /* break */
 
#define ALTERA_UART_STATUS_ROE_MSK   0x0008 /* RX overrun error */
 
#define ALTERA_UART_STATUS_TOE_MSK   0x0010 /* TX overrun error */
 
#define ALTERA_UART_STATUS_TMT_MSK   0x0020 /* TX shift register state */
 
#define ALTERA_UART_STATUS_TRDY_MSK   0x0040 /* TX ready */
 
#define ALTERA_UART_STATUS_RRDY_MSK   0x0080 /* RX ready */
 
#define ALTERA_UART_STATUS_E_MSK   0x0100 /* exception condition */
 
#define ALTERA_UART_STATUS_DCTS_MSK   0x0400 /* CTS logic-level change */
 
#define ALTERA_UART_STATUS_CTS_MSK   0x0800 /* CTS logic state */
 
#define ALTERA_UART_STATUS_EOP_MSK   0x1000 /* EOP written/read */
 
#define ALTERA_UART_CONTROL_PE_MSK   0x0001 /* ...parity error */
 
#define ALTERA_UART_CONTROL_FE_MSK   0x0002 /* ...framing error */
 
#define ALTERA_UART_CONTROL_BRK_MSK   0x0004 /* ...break */
 
#define ALTERA_UART_CONTROL_ROE_MSK   0x0008 /* ...RX overrun */
 
#define ALTERA_UART_CONTROL_TOE_MSK   0x0010 /* ...TX overrun */
 
#define ALTERA_UART_CONTROL_TMT_MSK   0x0020 /* ...TX shift register empty */
 
#define ALTERA_UART_CONTROL_TRDY_MSK   0x0040 /* ...TX ready */
 
#define ALTERA_UART_CONTROL_RRDY_MSK   0x0080 /* ...RX ready */
 
#define ALTERA_UART_CONTROL_E_MSK   0x0100 /* ...exception*/
 
#define ALTERA_UART_CONTROL_TRBK_MSK   0x0200 /* TX break */
 
#define ALTERA_UART_CONTROL_DCTS_MSK   0x0400 /* Interrupt on CTS change */
 
#define ALTERA_UART_CONTROL_RTS_MSK   0x0800 /* RTS signal */
 
#define ALTERA_UART_CONTROL_EOP_MSK   0x1000 /* Interrupt on EOP */
 
#define ALTERA_UART_CONSOLE   NULL
 

Functions

 module_init (altera_uart_init)
 
 module_exit (altera_uart_exit)
 
 MODULE_DESCRIPTION ("Altera UART driver")
 
 MODULE_AUTHOR ("Thomas Chou <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:"DRV_NAME)
 
 MODULE_ALIAS_CHARDEV_MAJOR (SERIAL_ALTERA_MAJOR)
 

Macro Definition Documentation

#define ALTERA_UART_CONSOLE   NULL

Definition at line 495 of file altera_uart.c.

#define ALTERA_UART_CONTROL_BRK_MSK   0x0004 /* ...break */

Definition at line 65 of file altera_uart.c.

#define ALTERA_UART_CONTROL_DCTS_MSK   0x0400 /* Interrupt on CTS change */

Definition at line 74 of file altera_uart.c.

#define ALTERA_UART_CONTROL_E_MSK   0x0100 /* ...exception*/

Definition at line 71 of file altera_uart.c.

#define ALTERA_UART_CONTROL_EOP_MSK   0x1000 /* Interrupt on EOP */

Definition at line 76 of file altera_uart.c.

#define ALTERA_UART_CONTROL_FE_MSK   0x0002 /* ...framing error */

Definition at line 64 of file altera_uart.c.

#define ALTERA_UART_CONTROL_PE_MSK   0x0001 /* ...parity error */

Definition at line 63 of file altera_uart.c.

#define ALTERA_UART_CONTROL_REG   12

Definition at line 45 of file altera_uart.c.

#define ALTERA_UART_CONTROL_ROE_MSK   0x0008 /* ...RX overrun */

Definition at line 66 of file altera_uart.c.

#define ALTERA_UART_CONTROL_RRDY_MSK   0x0080 /* ...RX ready */

Definition at line 70 of file altera_uart.c.

#define ALTERA_UART_CONTROL_RTS_MSK   0x0800 /* RTS signal */

Definition at line 75 of file altera_uart.c.

#define ALTERA_UART_CONTROL_TMT_MSK   0x0020 /* ...TX shift register empty */

Definition at line 68 of file altera_uart.c.

#define ALTERA_UART_CONTROL_TOE_MSK   0x0010 /* ...TX overrun */

Definition at line 67 of file altera_uart.c.

#define ALTERA_UART_CONTROL_TRBK_MSK   0x0200 /* TX break */

Definition at line 73 of file altera_uart.c.

#define ALTERA_UART_CONTROL_TRDY_MSK   0x0040 /* ...TX ready */

Definition at line 69 of file altera_uart.c.

#define ALTERA_UART_DIVISOR_REG   16

Definition at line 46 of file altera_uart.c.

#define ALTERA_UART_EOP_REG   20

Definition at line 47 of file altera_uart.c.

#define ALTERA_UART_RXDATA_REG   0

Definition at line 42 of file altera_uart.c.

#define ALTERA_UART_SIZE   32

Definition at line 40 of file altera_uart.c.

#define ALTERA_UART_STATUS_BRK_MSK   0x0004 /* break */

Definition at line 51 of file altera_uart.c.

#define ALTERA_UART_STATUS_CTS_MSK   0x0800 /* CTS logic state */

Definition at line 59 of file altera_uart.c.

#define ALTERA_UART_STATUS_DCTS_MSK   0x0400 /* CTS logic-level change */

Definition at line 58 of file altera_uart.c.

#define ALTERA_UART_STATUS_E_MSK   0x0100 /* exception condition */

Definition at line 57 of file altera_uart.c.

#define ALTERA_UART_STATUS_EOP_MSK   0x1000 /* EOP written/read */

Definition at line 60 of file altera_uart.c.

#define ALTERA_UART_STATUS_FE_MSK   0x0002 /* framing error */

Definition at line 50 of file altera_uart.c.

#define ALTERA_UART_STATUS_PE_MSK   0x0001 /* parity error */

Definition at line 49 of file altera_uart.c.

#define ALTERA_UART_STATUS_REG   8

Definition at line 44 of file altera_uart.c.

#define ALTERA_UART_STATUS_ROE_MSK   0x0008 /* RX overrun error */

Definition at line 52 of file altera_uart.c.

#define ALTERA_UART_STATUS_RRDY_MSK   0x0080 /* RX ready */

Definition at line 56 of file altera_uart.c.

#define ALTERA_UART_STATUS_TMT_MSK   0x0020 /* TX shift register state */

Definition at line 54 of file altera_uart.c.

#define ALTERA_UART_STATUS_TOE_MSK   0x0010 /* TX overrun error */

Definition at line 53 of file altera_uart.c.

#define ALTERA_UART_STATUS_TRDY_MSK   0x0040 /* TX ready */

Definition at line 55 of file altera_uart.c.

#define ALTERA_UART_TXDATA_REG   4

Definition at line 43 of file altera_uart.c.

#define DRV_NAME   "altera_uart"

Definition at line 31 of file altera_uart.c.

#define SERIAL_ALTERA_MAJOR   204

Definition at line 32 of file altera_uart.c.

#define SERIAL_ALTERA_MINOR   213

Definition at line 33 of file altera_uart.c.

Function Documentation

MODULE_ALIAS ( "platform:"  DRV_NAME)
MODULE_ALIAS_CHARDEV_MAJOR ( SERIAL_ALTERA_MAJOR  )
MODULE_AUTHOR ( "Thomas Chou <[email protected]>"  )
MODULE_DESCRIPTION ( "Altera UART driver )
module_exit ( altera_uart_exit  )
module_init ( altera_uart_init  )
MODULE_LICENSE ( "GPL"  )