Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
netx-serial.c File Reference
#include <linux/device.h>
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/sysrq.h>
#include <linux/platform_device.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <mach/hardware.h>
#include <mach/netx-regs.h>

Go to the source code of this file.

Data Structures

struct  netx_port
 

Macros

#define SERIAL_NX_MAJOR   204
 
#define MINOR_START   170
 
#define SR_FE   (1<<0)
 
#define SR_PE   (1<<1)
 
#define SR_BE   (1<<2)
 
#define SR_OE   (1<<3)
 
#define LINE_CR_BRK   (1<<0)
 
#define LINE_CR_PEN   (1<<1)
 
#define LINE_CR_EPS   (1<<2)
 
#define LINE_CR_STP2   (1<<3)
 
#define LINE_CR_FEN   (1<<4)
 
#define LINE_CR_5BIT   (0<<5)
 
#define LINE_CR_6BIT   (1<<5)
 
#define LINE_CR_7BIT   (2<<5)
 
#define LINE_CR_8BIT   (3<<5)
 
#define LINE_CR_BITS_MASK   (3<<5)
 
#define CR_UART_EN   (1<<0)
 
#define CR_SIREN   (1<<1)
 
#define CR_SIRLP   (1<<2)
 
#define CR_MSIE   (1<<3)
 
#define CR_RIE   (1<<4)
 
#define CR_TIE   (1<<5)
 
#define CR_RTIE   (1<<6)
 
#define CR_LBE   (1<<7)
 
#define FR_CTS   (1<<0)
 
#define FR_DSR   (1<<1)
 
#define FR_DCD   (1<<2)
 
#define FR_BUSY   (1<<3)
 
#define FR_RXFE   (1<<4)
 
#define FR_TXFF   (1<<5)
 
#define FR_RXFF   (1<<6)
 
#define FR_TXFE   (1<<7)
 
#define IIR_MIS   (1<<0)
 
#define IIR_RIS   (1<<1)
 
#define IIR_TIS   (1<<2)
 
#define IIR_RTIS   (1<<3)
 
#define IIR_MASK   0xf
 
#define RTS_CR_AUTO   (1<<0)
 
#define RTS_CR_RTS   (1<<1)
 
#define RTS_CR_COUNT   (1<<2)
 
#define RTS_CR_MOD2   (1<<3)
 
#define RTS_CR_RTS_POL   (1<<4)
 
#define RTS_CR_CTS_CTR   (1<<5)
 
#define RTS_CR_CTS_POL   (1<<6)
 
#define RTS_CR_STICK   (1<<7)
 
#define UART_PORT_SIZE   0x40
 
#define DRIVER_NAME   "netx-uart"
 
#define NETX_CONSOLE   NULL
 

Enumerations

enum  uart_regs {
  UART_DR = 0x00, UART_SR = 0x04, UART_LINE_CR = 0x08, UART_BAUDDIV_MSB = 0x0c,
  UART_BAUDDIV_LSB = 0x10, UART_CR = 0x14, UART_FR = 0x18, UART_IIR = 0x1c,
  UART_ILPR = 0x20, UART_RTS_CR = 0x24, UART_RTS_LEAD = 0x28, UART_RTS_TRAIL = 0x2c,
  UART_DRV_ENABLE = 0x30, UART_BRM_CR = 0x34, UART_RXFIFO_IRQLEVEL = 0x38, UART_TXFIFO_IRQLEVEL = 0x3c
}
 

Functions

 module_init (netx_serial_init)
 
 module_exit (netx_serial_exit)
 
 MODULE_AUTHOR ("Sascha Hauer")
 
 MODULE_DESCRIPTION ("NetX serial port driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:"DRIVER_NAME)
 

Macro Definition Documentation

#define CR_LBE   (1<<7)

Definition at line 85 of file netx-serial.c.

#define CR_MSIE   (1<<3)

Definition at line 81 of file netx-serial.c.

#define CR_RIE   (1<<4)

Definition at line 82 of file netx-serial.c.

#define CR_RTIE   (1<<6)

Definition at line 84 of file netx-serial.c.

#define CR_SIREN   (1<<1)

Definition at line 79 of file netx-serial.c.

#define CR_SIRLP   (1<<2)

Definition at line 80 of file netx-serial.c.

#define CR_TIE   (1<<5)

Definition at line 83 of file netx-serial.c.

#define CR_UART_EN   (1<<0)

Definition at line 78 of file netx-serial.c.

#define DRIVER_NAME   "netx-uart"

Definition at line 112 of file netx-serial.c.

#define FR_BUSY   (1<<3)

Definition at line 90 of file netx-serial.c.

#define FR_CTS   (1<<0)

Definition at line 87 of file netx-serial.c.

#define FR_DCD   (1<<2)

Definition at line 89 of file netx-serial.c.

#define FR_DSR   (1<<1)

Definition at line 88 of file netx-serial.c.

#define FR_RXFE   (1<<4)

Definition at line 91 of file netx-serial.c.

#define FR_RXFF   (1<<6)

Definition at line 93 of file netx-serial.c.

#define FR_TXFE   (1<<7)

Definition at line 94 of file netx-serial.c.

#define FR_TXFF   (1<<5)

Definition at line 92 of file netx-serial.c.

#define IIR_MASK   0xf

Definition at line 100 of file netx-serial.c.

#define IIR_MIS   (1<<0)

Definition at line 96 of file netx-serial.c.

#define IIR_RIS   (1<<1)

Definition at line 97 of file netx-serial.c.

#define IIR_RTIS   (1<<3)

Definition at line 99 of file netx-serial.c.

#define IIR_TIS   (1<<2)

Definition at line 98 of file netx-serial.c.

#define LINE_CR_5BIT   (0<<5)

Definition at line 72 of file netx-serial.c.

#define LINE_CR_6BIT   (1<<5)

Definition at line 73 of file netx-serial.c.

#define LINE_CR_7BIT   (2<<5)

Definition at line 74 of file netx-serial.c.

#define LINE_CR_8BIT   (3<<5)

Definition at line 75 of file netx-serial.c.

#define LINE_CR_BITS_MASK   (3<<5)

Definition at line 76 of file netx-serial.c.

#define LINE_CR_BRK   (1<<0)

Definition at line 67 of file netx-serial.c.

#define LINE_CR_EPS   (1<<2)

Definition at line 69 of file netx-serial.c.

#define LINE_CR_FEN   (1<<4)

Definition at line 71 of file netx-serial.c.

#define LINE_CR_PEN   (1<<1)

Definition at line 68 of file netx-serial.c.

#define LINE_CR_STP2   (1<<3)

Definition at line 70 of file netx-serial.c.

#define MINOR_START   170

Definition at line 41 of file netx-serial.c.

#define NETX_CONSOLE   NULL

Definition at line 646 of file netx-serial.c.

#define RTS_CR_AUTO   (1<<0)

Definition at line 102 of file netx-serial.c.

#define RTS_CR_COUNT   (1<<2)

Definition at line 104 of file netx-serial.c.

#define RTS_CR_CTS_CTR   (1<<5)

Definition at line 107 of file netx-serial.c.

#define RTS_CR_CTS_POL   (1<<6)

Definition at line 108 of file netx-serial.c.

#define RTS_CR_MOD2   (1<<3)

Definition at line 105 of file netx-serial.c.

#define RTS_CR_RTS   (1<<1)

Definition at line 103 of file netx-serial.c.

#define RTS_CR_RTS_POL   (1<<4)

Definition at line 106 of file netx-serial.c.

#define RTS_CR_STICK   (1<<7)

Definition at line 109 of file netx-serial.c.

#define SERIAL_NX_MAJOR   204

Definition at line 40 of file netx-serial.c.

#define SR_BE   (1<<2)

Definition at line 64 of file netx-serial.c.

#define SR_FE   (1<<0)

Definition at line 62 of file netx-serial.c.

#define SR_OE   (1<<3)

Definition at line 65 of file netx-serial.c.

#define SR_PE   (1<<1)

Definition at line 63 of file netx-serial.c.

#define UART_PORT_SIZE   0x40

Definition at line 111 of file netx-serial.c.

Enumeration Type Documentation

enum uart_regs
Enumerator:
UART_DR 
UART_SR 
UART_LINE_CR 
UART_BAUDDIV_MSB 
UART_BAUDDIV_LSB 
UART_CR 
UART_FR 
UART_IIR 
UART_ILPR 
UART_RTS_CR 
UART_RTS_LEAD 
UART_RTS_TRAIL 
UART_DRV_ENABLE 
UART_BRM_CR 
UART_RXFIFO_IRQLEVEL 
UART_TXFIFO_IRQLEVEL 

Definition at line 43 of file netx-serial.c.

Function Documentation

MODULE_ALIAS ( "platform:"  DRIVER_NAME)
MODULE_AUTHOR ( "Sascha Hauer"  )
MODULE_DESCRIPTION ( "NetX serial port driver )
module_exit ( netx_serial_exit  )
module_init ( netx_serial_init  )
MODULE_LICENSE ( "GPL"  )