Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
8250.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/console.h>
#include <linux/sysrq.h>
#include <linux/delay.h>
#include <linux/platform_device.h>
#include <linux/tty.h>
#include <linux/ratelimit.h>
#include <linux/tty_flip.h>
#include <linux/serial_reg.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
#include <linux/serial_8250.h>
#include <linux/nmi.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <asm/io.h>
#include <asm/irq.h>
#include "8250.h"
#include <asm/serial.h>

Go to the source code of this file.

Data Structures

struct  irq_info


#define DEBUG_AUTOCONF(fmt...)   do { } while (0)
#define DEBUG_INTR(fmt...)   do { } while (0)
#define PASS_LIMIT   512
#define CONFIG_HUB6   1
#define NR_IRQ_HASH   32 /* Can be adjusted later */
#define PRESL(x)   ((x) & 0x30)


void serial8250_clear_and_reinit_fifos (struct uart_8250_port *p)
 EXPORT_SYMBOL_GPL (serial8250_clear_and_reinit_fifos)
unsigned char serial8250_rx_chars (struct uart_8250_port *up, unsigned char lsr)
 EXPORT_SYMBOL_GPL (serial8250_rx_chars)
void serial8250_tx_chars (struct uart_8250_port *up)
 EXPORT_SYMBOL_GPL (serial8250_tx_chars)
unsigned int serial8250_modem_status (struct uart_8250_port *up)
 EXPORT_SYMBOL_GPL (serial8250_modem_status)
int serial8250_handle_irq (struct uart_port *port, unsigned int iir)
 EXPORT_SYMBOL_GPL (serial8250_handle_irq)
void serial8250_do_set_termios (struct uart_port *port, struct ktermios *termios, struct ktermios *old)
 EXPORT_SYMBOL (serial8250_do_set_termios)
void serial8250_do_pm (struct uart_port *port, unsigned int state, unsigned int oldstate)
 EXPORT_SYMBOL (serial8250_do_pm)
void serial8250_set_isa_configurator (void(*v)(int port, struct uart_port *up, unsigned short *capabilities))
 EXPORT_SYMBOL (serial8250_set_isa_configurator)
int __init early_serial_setup (struct uart_port *port)
void serial8250_suspend_port (int line)
void serial8250_resume_port (int line)
int serial8250_register_8250_port (struct uart_8250_port *up)
 EXPORT_SYMBOL (serial8250_register_8250_port)
void serial8250_unregister_port (int line)
 EXPORT_SYMBOL (serial8250_unregister_port)
 module_init (serial8250_init)
 module_exit (serial8250_exit)
 EXPORT_SYMBOL (serial8250_suspend_port)
 EXPORT_SYMBOL (serial8250_resume_port)
 MODULE_DESCRIPTION ("Generic 8250/16x50 serial driver")
 module_param (share_irqs, uint, 0644)
 MODULE_PARM_DESC (share_irqs,"Share IRQs with other non-8250/16x50 devices"" (unsafe)")
 module_param (nr_uarts, uint, 0644)
 MODULE_PARM_DESC (nr_uarts,"Maximum number of UARTs supported. (1-"__MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS)")")
 module_param (skip_txen_test, uint, 0644)
 MODULE_PARM_DESC (skip_txen_test,"Skip checking for the TXEN bug at init time")

Macro Definition Documentation


Definition at line 85 of file 8250.c.

#define CONFIG_HUB6   1

Definition at line 99 of file 8250.c.

#define DEBUG_AUTOCONF (   fmt...)    do { } while (0)

Definition at line 74 of file 8250.c.

#define DEBUG_INTR (   fmt...)    do { } while (0)

Definition at line 80 of file 8250.c.

#define NR_IRQ_HASH   32 /* Can be adjusted later */

Definition at line 131 of file 8250.c.

#define PASS_LIMIT   512

Definition at line 83 of file 8250.c.

#define PRESL (   x)    ((x) & 0x30)

Definition at line 2902 of file 8250.c.


Definition at line 108 of file 8250.c.


Definition at line 115 of file 8250.c.

Function Documentation

int __init early_serial_setup ( struct uart_port port)

Definition at line 2920 of file 8250.c.

EXPORT_SYMBOL ( serial8250_do_set_termios  )
EXPORT_SYMBOL ( serial8250_do_pm  )
EXPORT_SYMBOL ( serial8250_set_isa_configurator  )
EXPORT_SYMBOL ( serial8250_register_8250_port  )
EXPORT_SYMBOL ( serial8250_unregister_port  )
EXPORT_SYMBOL ( serial8250_suspend_port  )
EXPORT_SYMBOL ( serial8250_resume_port  )
EXPORT_SYMBOL_GPL ( serial8250_clear_and_reinit_fifos  )
EXPORT_SYMBOL_GPL ( serial8250_rx_chars  )
EXPORT_SYMBOL_GPL ( serial8250_tx_chars  )
EXPORT_SYMBOL_GPL ( serial8250_modem_status  )
EXPORT_SYMBOL_GPL ( serial8250_handle_irq  )
MODULE_DESCRIPTION ( "Generic 8250/16x50 serial driver"  )
module_exit ( serial8250_exit  )
module_init ( serial8250_init  )
module_param ( share_irqs  ,
uint  ,
module_param ( nr_uarts  ,
uint  ,
module_param ( skip_txen_test  ,
uint  ,
MODULE_PARM_DESC ( share_irqs  ,
"Share IRQs with other non-8250/16x50 devices"" (unsafe)"   
MODULE_PARM_DESC ( nr_uarts  ,
"Maximum number of UARTs supported. (1-"__MODULE_STRING(CONFIG_SERIAL_8250_NR_UARTS)")"   
MODULE_PARM_DESC ( skip_txen_test  ,
"Skip checking for the TXEN bug at init time  
void serial8250_clear_and_reinit_fifos ( struct uart_8250_port p)

Definition at line 560 of file 8250.c.

void serial8250_do_pm ( struct uart_port port,
unsigned int  state,
unsigned int  oldstate 

Definition at line 2418 of file 8250.c.

void serial8250_do_set_termios ( struct uart_port port,
struct ktermios termios,
struct ktermios old 

Definition at line 2206 of file 8250.c.

int serial8250_handle_irq ( struct uart_port port,
unsigned int  iir 

Definition at line 1484 of file 8250.c.

unsigned int serial8250_modem_status ( struct uart_8250_port up)

Definition at line 1456 of file 8250.c.

int serial8250_register_8250_port ( struct uart_8250_port up)

serial8250_register_8250_port - register a serial port : serial port template

Configure the serial port specified by the request. If the port exists and is in use, it is hung up and unregistered first.

The port is then probed and if necessary the IRQ is autodetected If this fails an error is returned.

On success the port is ready to use and the line number is returned.

Definition at line 3151 of file 8250.c.

void serial8250_resume_port ( int  line)

serial8250_resume_port - resume one serial port serial line number

Resume one serial port.

Definition at line 2973 of file 8250.c.

unsigned char serial8250_rx_chars ( struct uart_8250_port up,
unsigned char  lsr 

Definition at line 1342 of file 8250.c.

void serial8250_set_isa_configurator ( void(*)(int port, struct uart_port *up, unsigned short *capabilities v)

Definition at line 2673 of file 8250.c.

void serial8250_suspend_port ( int  line)

serial8250_suspend_port - suspend one serial port serial line number

Suspend one serial port.

Definition at line 2962 of file 8250.c.

void serial8250_tx_chars ( struct uart_8250_port up)

Definition at line 1416 of file 8250.c.

void serial8250_unregister_port ( int  line)

serial8250_unregister_port - remove a 16x50 serial port at runtime serial line number

Remove one serial port. This may not be called from interrupt context. We hand the port back to the our control.

Definition at line 3225 of file 8250.c.