Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sa1100.c File Reference
#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 <linux/io.h>
#include <asm/irq.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <asm/mach/serial_sa1100.h>

Go to the source code of this file.

Data Structures

struct  sa1100_port
 

Macros

#define SERIAL_SA1100_MAJOR   204
 
#define MINOR_START   5
 
#define NR_PORTS   3
 
#define SA1100_ISR_PASS_LIMIT   256
 
#define SM_TO_UTSR0(x)   ((x) & 0xff)
 
#define SM_TO_UTSR1(x)   ((x) >> 8)
 
#define UTSR0_TO_SM(x)   ((x))
 
#define UTSR1_TO_SM(x)   ((x) << 8)
 
#define UART_GET_UTCR0(sport)   __raw_readl((sport)->port.membase + UTCR0)
 
#define UART_GET_UTCR1(sport)   __raw_readl((sport)->port.membase + UTCR1)
 
#define UART_GET_UTCR2(sport)   __raw_readl((sport)->port.membase + UTCR2)
 
#define UART_GET_UTCR3(sport)   __raw_readl((sport)->port.membase + UTCR3)
 
#define UART_GET_UTSR0(sport)   __raw_readl((sport)->port.membase + UTSR0)
 
#define UART_GET_UTSR1(sport)   __raw_readl((sport)->port.membase + UTSR1)
 
#define UART_GET_CHAR(sport)   __raw_readl((sport)->port.membase + UTDR)
 
#define UART_PUT_UTCR0(sport, v)   __raw_writel((v),(sport)->port.membase + UTCR0)
 
#define UART_PUT_UTCR1(sport, v)   __raw_writel((v),(sport)->port.membase + UTCR1)
 
#define UART_PUT_UTCR2(sport, v)   __raw_writel((v),(sport)->port.membase + UTCR2)
 
#define UART_PUT_UTCR3(sport, v)   __raw_writel((v),(sport)->port.membase + UTCR3)
 
#define UART_PUT_UTSR0(sport, v)   __raw_writel((v),(sport)->port.membase + UTSR0)
 
#define UART_PUT_UTSR1(sport, v)   __raw_writel((v),(sport)->port.membase + UTSR1)
 
#define UART_PUT_CHAR(sport, v)   __raw_writel((v),(sport)->port.membase + UTDR)
 
#define UART_PORT_SIZE   0x24
 
#define MCTRL_TIMEOUT   (250*HZ/1000)
 
#define SA1100_CONSOLE   NULL
 

Functions

void __devinit sa1100_register_uart_fns (struct sa1100_port_fns *fns)
 
void __init sa1100_register_uart (int idx, int port)
 
 module_init (sa1100_serial_init)
 
 module_exit (sa1100_serial_exit)
 
 MODULE_AUTHOR ("Deep Blue Solutions Ltd")
 
 MODULE_DESCRIPTION ("SA1100 generic serial port driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_ALIAS_CHARDEV_MAJOR (SERIAL_SA1100_MAJOR)
 
 MODULE_ALIAS ("platform:sa11x0-uart")
 

Macro Definition Documentation

#define MCTRL_TIMEOUT   (250*HZ/1000)

Definition at line 87 of file sa1100.c.

#define MINOR_START   5

Definition at line 46 of file sa1100.c.

#define NR_PORTS   3

Definition at line 48 of file sa1100.c.

#define SA1100_CONSOLE   NULL

Definition at line 807 of file sa1100.c.

#define SA1100_ISR_PASS_LIMIT   256

Definition at line 50 of file sa1100.c.

#define SERIAL_SA1100_MAJOR   204

Definition at line 45 of file sa1100.c.

#define SM_TO_UTSR0 (   x)    ((x) & 0xff)

Definition at line 55 of file sa1100.c.

#define SM_TO_UTSR1 (   x)    ((x) >> 8)

Definition at line 56 of file sa1100.c.

#define UART_GET_CHAR (   sport)    __raw_readl((sport)->port.membase + UTDR)

Definition at line 66 of file sa1100.c.

#define UART_GET_UTCR0 (   sport)    __raw_readl((sport)->port.membase + UTCR0)

Definition at line 60 of file sa1100.c.

#define UART_GET_UTCR1 (   sport)    __raw_readl((sport)->port.membase + UTCR1)

Definition at line 61 of file sa1100.c.

#define UART_GET_UTCR2 (   sport)    __raw_readl((sport)->port.membase + UTCR2)

Definition at line 62 of file sa1100.c.

#define UART_GET_UTCR3 (   sport)    __raw_readl((sport)->port.membase + UTCR3)

Definition at line 63 of file sa1100.c.

#define UART_GET_UTSR0 (   sport)    __raw_readl((sport)->port.membase + UTSR0)

Definition at line 64 of file sa1100.c.

#define UART_GET_UTSR1 (   sport)    __raw_readl((sport)->port.membase + UTSR1)

Definition at line 65 of file sa1100.c.

#define UART_PORT_SIZE   0x24

Definition at line 79 of file sa1100.c.

#define UART_PUT_CHAR (   sport,
  v 
)    __raw_writel((v),(sport)->port.membase + UTDR)

Definition at line 74 of file sa1100.c.

#define UART_PUT_UTCR0 (   sport,
  v 
)    __raw_writel((v),(sport)->port.membase + UTCR0)

Definition at line 68 of file sa1100.c.

#define UART_PUT_UTCR1 (   sport,
  v 
)    __raw_writel((v),(sport)->port.membase + UTCR1)

Definition at line 69 of file sa1100.c.

#define UART_PUT_UTCR2 (   sport,
  v 
)    __raw_writel((v),(sport)->port.membase + UTCR2)

Definition at line 70 of file sa1100.c.

#define UART_PUT_UTCR3 (   sport,
  v 
)    __raw_writel((v),(sport)->port.membase + UTCR3)

Definition at line 71 of file sa1100.c.

#define UART_PUT_UTSR0 (   sport,
  v 
)    __raw_writel((v),(sport)->port.membase + UTSR0)

Definition at line 72 of file sa1100.c.

#define UART_PUT_UTSR1 (   sport,
  v 
)    __raw_writel((v),(sport)->port.membase + UTSR1)

Definition at line 73 of file sa1100.c.

#define UTSR0_TO_SM (   x)    ((x))

Definition at line 57 of file sa1100.c.

#define UTSR1_TO_SM (   x)    ((x) << 8)

Definition at line 58 of file sa1100.c.

Function Documentation

MODULE_ALIAS ( "platform:sa11x0-uart )
MODULE_ALIAS_CHARDEV_MAJOR ( SERIAL_SA1100_MAJOR  )
MODULE_AUTHOR ( "Deep Blue Solutions Ltd"  )
MODULE_DESCRIPTION ( "SA1100 generic serial port driver )
module_exit ( sa1100_serial_exit  )
module_init ( sa1100_serial_init  )
MODULE_LICENSE ( "GPL"  )
void __init sa1100_register_uart ( int  idx,
int  port 
)

Definition at line 651 of file sa1100.c.

void __devinit sa1100_register_uart_fns ( struct sa1100_port_fns fns)

Definition at line 640 of file sa1100.c.