Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sc26xx.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/major.h>
#include <linux/circ_buf.h>
#include <linux/serial.h>
#include <linux/sysrq.h>
#include <linux/console.h>
#include <linux/spinlock.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/irq.h>
#include <linux/io.h>
#include <linux/serial_core.h>

Go to the source code of this file.

Data Structures

struct  uart_sc26xx_port
 

Macros

#define SC26XX_MAJOR   204
 
#define SC26XX_MINOR_START   205
 
#define SC26XX_NR   2
 
#define RD_ISR   0x14
 
#define RD_IPR   0x34
 
#define WR_ACR   0x10
 
#define WR_IMR   0x14
 
#define WR_OPCR   0x34
 
#define WR_OPR_SET   0x38
 
#define WR_OPR_CLR   0x3C
 
#define READ_SC(p, r)   readb((p)->membase + RD_##r)
 
#define WRITE_SC(p, r, v)   writeb((v), (p)->membase + WR_##r)
 
#define RD_PORT_MRx   0x00
 
#define RD_PORT_SR   0x04
 
#define RD_PORT_RHR   0x0c
 
#define WR_PORT_MRx   0x00
 
#define WR_PORT_CSR   0x04
 
#define WR_PORT_CR   0x08
 
#define WR_PORT_THR   0x0c
 
#define SR_BREAK   (1 << 7)
 
#define SR_FRAME   (1 << 6)
 
#define SR_PARITY   (1 << 5)
 
#define SR_OVERRUN   (1 << 4)
 
#define SR_TXRDY   (1 << 2)
 
#define SR_RXRDY   (1 << 0)
 
#define CR_RES_MR   (1 << 4)
 
#define CR_RES_RX   (2 << 4)
 
#define CR_RES_TX   (3 << 4)
 
#define CR_STRT_BRK   (6 << 4)
 
#define CR_STOP_BRK   (7 << 4)
 
#define CR_DIS_TX   (1 << 3)
 
#define CR_ENA_TX   (1 << 2)
 
#define CR_DIS_RX   (1 << 1)
 
#define CR_ENA_RX   (1 << 0)
 
#define ISR_RXRDYB   (1 << 5)
 
#define ISR_TXRDYB   (1 << 4)
 
#define ISR_RXRDYA   (1 << 1)
 
#define ISR_TXRDYA   (1 << 0)
 
#define IMR_RXRDY   (1 << 1)
 
#define IMR_TXRDY   (1 << 0)
 
#define READ_SC_PORT(p, r)   read_sc_port(p, RD_PORT_##r)
 
#define WRITE_SC_PORT(p, r, v)   write_sc_port(p, WR_PORT_##r, v)
 
#define SC26XX_CONSOLE   NULL
 

Functions

 module_platform_driver (sc26xx_driver)
 
 MODULE_AUTHOR ("Thomas Bogendörfer")
 
 MODULE_DESCRIPTION ("SC681/SC2692 serial driver")
 
 MODULE_VERSION ("1.0")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS ("platform:SC26xx")
 

Macro Definition Documentation

#define CR_DIS_RX   (1 << 1)

Definition at line 88 of file sc26xx.c.

#define CR_DIS_TX   (1 << 3)

Definition at line 86 of file sc26xx.c.

#define CR_ENA_RX   (1 << 0)

Definition at line 89 of file sc26xx.c.

#define CR_ENA_TX   (1 << 2)

Definition at line 87 of file sc26xx.c.

#define CR_RES_MR   (1 << 4)

Definition at line 81 of file sc26xx.c.

#define CR_RES_RX   (2 << 4)

Definition at line 82 of file sc26xx.c.

#define CR_RES_TX   (3 << 4)

Definition at line 83 of file sc26xx.c.

#define CR_STOP_BRK   (7 << 4)

Definition at line 85 of file sc26xx.c.

#define CR_STRT_BRK   (6 << 4)

Definition at line 84 of file sc26xx.c.

#define IMR_RXRDY   (1 << 1)

Definition at line 98 of file sc26xx.c.

#define IMR_TXRDY   (1 << 0)

Definition at line 99 of file sc26xx.c.

#define ISR_RXRDYA   (1 << 1)

Definition at line 94 of file sc26xx.c.

#define ISR_RXRDYB   (1 << 5)

Definition at line 92 of file sc26xx.c.

#define ISR_TXRDYA   (1 << 0)

Definition at line 95 of file sc26xx.c.

#define ISR_TXRDYB   (1 << 4)

Definition at line 93 of file sc26xx.c.

#define RD_IPR   0x34

Definition at line 51 of file sc26xx.c.

#define RD_ISR   0x14

Definition at line 50 of file sc26xx.c.

#define RD_PORT_MRx   0x00

Definition at line 64 of file sc26xx.c.

#define RD_PORT_RHR   0x0c

Definition at line 66 of file sc26xx.c.

#define RD_PORT_SR   0x04

Definition at line 65 of file sc26xx.c.

#define READ_SC (   p,
  r 
)    readb((p)->membase + RD_##r)

Definition at line 60 of file sc26xx.c.

#define READ_SC_PORT (   p,
  r 
)    read_sc_port(p, RD_PORT_##r)

Definition at line 112 of file sc26xx.c.

#define SC26XX_CONSOLE   NULL

Definition at line 604 of file sc26xx.c.

#define SC26XX_MAJOR   204

Definition at line 34 of file sc26xx.c.

#define SC26XX_MINOR_START   205

Definition at line 35 of file sc26xx.c.

#define SC26XX_NR   2

Definition at line 36 of file sc26xx.c.

#define SR_BREAK   (1 << 7)

Definition at line 74 of file sc26xx.c.

#define SR_FRAME   (1 << 6)

Definition at line 75 of file sc26xx.c.

#define SR_OVERRUN   (1 << 4)

Definition at line 77 of file sc26xx.c.

#define SR_PARITY   (1 << 5)

Definition at line 76 of file sc26xx.c.

#define SR_RXRDY   (1 << 0)

Definition at line 79 of file sc26xx.c.

#define SR_TXRDY   (1 << 2)

Definition at line 78 of file sc26xx.c.

#define WR_ACR   0x10

Definition at line 53 of file sc26xx.c.

#define WR_IMR   0x14

Definition at line 54 of file sc26xx.c.

#define WR_OPCR   0x34

Definition at line 55 of file sc26xx.c.

#define WR_OPR_CLR   0x3C

Definition at line 57 of file sc26xx.c.

#define WR_OPR_SET   0x38

Definition at line 56 of file sc26xx.c.

#define WR_PORT_CR   0x08

Definition at line 70 of file sc26xx.c.

#define WR_PORT_CSR   0x04

Definition at line 69 of file sc26xx.c.

#define WR_PORT_MRx   0x00

Definition at line 68 of file sc26xx.c.

#define WR_PORT_THR   0x0c

Definition at line 71 of file sc26xx.c.

#define WRITE_SC (   p,
  r,
  v 
)    writeb((v), (p)->membase + WR_##r)

Definition at line 61 of file sc26xx.c.

#define WRITE_SC_PORT (   p,
  r,
  v 
)    write_sc_port(p, WR_PORT_##r, v)

Definition at line 113 of file sc26xx.c.

Function Documentation

MODULE_ALIAS ( "platform:SC26xx"  )
MODULE_AUTHOR ( "Thomas Bogendörfer )
MODULE_DESCRIPTION ( "SC681/SC2692 serial driver )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( sc26xx_driver  )
MODULE_VERSION ( "1.0"  )