#include <linux/config.h>#include <linux/module.h>#include <linux/errno.h>#include <linux/signal.h>#include <linux/sched.h>#include <linux/timer.h>#include <linux/interrupt.h>#include <linux/tty.h>#include <linux/tty_flip.h>#include <linux/serial.h>#include <linux/major.h>#include <linux/string.h>#include <linux/fcntl.h>#include <linux/ptrace.h>#include <linux/ioport.h>#include <linux/mm.h>#include <linux/malloc.h>#include <linux/init.h>#include <linux/delay.h>#include <asm/system.h>#include <asm/io.h>#include <asm/irq.h>#include <asm/uaccess.h>#include <asm/bitops.h>#include <asm/serial.h>#include <asm/baget/baget.h>Include dependency graph for vacserial.c:

Go to the source code of this file.
Defines | |
| #define | CONFIG_SERIAL_NOPAUSE_IO |
| #define | SERIAL_DO_RESTART |
| #define | CONFIG_SERIAL_SHARE_IRQ |
| #define | RS_STROBE_TIME (10*HZ) |
| #define | RS_ISR_PASS_LIMIT 2 |
| #define | IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) |
| #define | SERIAL_INLINE |
| #define | DBG_CNT(s) |
| #define | QUAD_UART_SPEED |
| #define | BAGET_VAC_UART_IRQ 0x35 |
| #define | _INLINE_ inline |
| #define | WAKEUP_CHARS 256 |
| #define | VAC_UART_TYPE 1 |
| #define | NR_PORTS (sizeof(rs_table)/sizeof(struct serial_state)) |
| #define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
| #define | VAC_UART_MODE 0 |
| #define | VAC_UART_TX 1 |
| #define | VAC_UART_RX 2 |
| #define | VAC_UART_INT_MASK 3 |
| #define | VAC_UART_INT_STATUS 4 |
| #define | VAC_UART_REG_NR 5 |
| #define | VAC_INT_CTRL_UART_ENABLE (VAC_INT_CTRL_TIMER_PIO10|VAC_INT_CTRL_UART_B_PIO7|VAC_INT_CTRL_UART_A_PIO7) |
| #define | VAC_INT_CTRL_UART_DISABLE(info) |
| #define | rs_interrupt_single rs_interrupt |
| #define | RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) |
| #define | SERIAL_OPT |
Functions | |
| static | DECLARE_TASK_QUEUE (tq_serial) |
| static void | autoconfig (struct serial_state *info) |
| static void | change_speed (struct async_struct *info) |
| static void | rs_wait_until_sent (struct tty_struct *tty, int timeout) |
| static int | serial_paranoia_check (struct async_struct *info, kdev_t device, const char *routine) |
| static int | uart_offset_map (unsigned long port, int reg_index) |
| static unsigned int | serial_inw (struct async_struct *info, int offset) |
| static unsigned int | serial_inp (struct async_struct *info, int offset) |
| static unsigned int | serial_in (struct async_struct *info, int offset) |
| static void | serial_outw (struct async_struct *info, int offset, int value) |
| static void | serial_outp (struct async_struct *info, int offset, int value) |
| static void | serial_out (struct async_struct *info, int offset, int value) |
| static void | rs_stop (struct tty_struct *tty) |
| static void | rs_start (struct tty_struct *tty) |
| static _INLINE_ void | rs_sched_event (struct async_struct *info, int event) |
| static _INLINE_ void | receive_chars (struct async_struct *info, int *status) |
| static _INLINE_ void | transmit_chars (struct async_struct *info, int *intr_done) |
| static _INLINE_ void | check_modem_status (struct async_struct *info) |
| static void | intr_begin (struct async_struct *info) |
| static void | intr_end (struct async_struct *info) |
| static void | rs_interrupt (int irq, void *dev_id, struct pt_regs *regs) |
| static void | do_serial_bh (void) |
| static void | do_softint (void *private_) |
| static void | figure_IRQ_timeout (int irq) |
| static int | startup (struct async_struct *info) |
| static void | shutdown (struct async_struct *info) |
| static unsigned short | vac_uart_mode_fixup (unsigned short cval) |
| static void | rs_put_char (struct tty_struct *tty, unsigned char ch) |
| static void | rs_flush_chars (struct tty_struct *tty) |
| static int | rs_write (struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
| static int | rs_write_room (struct tty_struct *tty) |
| static int | rs_chars_in_buffer (struct tty_struct *tty) |
| static void | rs_flush_buffer (struct tty_struct *tty) |
| static void | rs_send_xchar (struct tty_struct *tty, char ch) |
| static void | rs_throttle (struct tty_struct *tty) |
| static void | rs_unthrottle (struct tty_struct *tty) |
| static int | get_serial_info (struct async_struct *info, struct serial_struct *retinfo) |
| static int | set_serial_info (struct async_struct *info, struct serial_struct *new_info) |
| static int | get_lsr_info (struct async_struct *info, unsigned int *value) |
| static int | get_modem_info (struct async_struct *info, unsigned int *value) |
| static int | set_modem_info (struct async_struct *info, unsigned int cmd, unsigned int *value) |
| static int | do_autoconfig (struct async_struct *info) |
| static void | rs_break (struct tty_struct *tty, int break_state) |
| static int | rs_ioctl (struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
| static void | rs_set_termios (struct tty_struct *tty, struct termios *old_termios) |
| static void | rs_close (struct tty_struct *tty, struct file *filp) |
| static void | rs_hangup (struct tty_struct *tty) |
| static int | block_til_ready (struct tty_struct *tty, struct file *filp, struct async_struct *info) |
| static int | get_async_struct (int line, struct async_struct **ret_info) |
| static int | rs_open (struct tty_struct *tty, struct file *filp) |
| static int | line_info (char *buf, struct serial_state *state) |
| int | rs_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data) |
| static _INLINE_ void | show_serial_version (void) |
| int | register_serial (struct serial_struct *req) |
| void | unregister_serial (int line) |
| EXPORT_SYMBOL (register_serial) | |
| EXPORT_SYMBOL (unregister_serial) | |
| static void | rs_timer (void) |
| __initfunc (int rs_init(void)) | |
Variables | |
| static char * | serial_name = "VAC Serial driver" |
| static char * | serial_version = "4.26" |
| static struct tty_driver serial_driver | callout_driver |
| static int | serial_refcount |
| static struct async_struct * | IRQ_ports [NR_IRQS] |
| static int | IRQ_timeout [NR_IRQS] |
| static struct serial_uart_config | uart_config [] |
| static struct serial_state | rs_table [] |
| static struct tty_struct * | serial_table [NR_PORTS] |
| static struct termios * | serial_termios [NR_PORTS] |
| static struct termios * | serial_termios_locked [NR_PORTS] |
| static unsigned char * | tmp_buf |
| static struct semaphore | tmp_buf_sem = MUTEX |
|
|
Definition at line 89 of file vacserial.c. |
|
|
Definition at line 73 of file vacserial.c. |
|
|
Definition at line 10 of file vacserial.c. |
|
|
Definition at line 13 of file vacserial.c. |
|
|
Definition at line 33 of file vacserial.c. Referenced by ip2_close(), rs_8xx_close(), rs_close(), and su_close(). |
|
|
Definition at line 25 of file vacserial.c. Referenced by mxser_initbrd(), shutdown(), and startup(). |
|
|
Definition at line 147 of file vacserial.c. |
|
|
Definition at line 140 of file vacserial.c. Referenced by __initfunc(), cd2401_tx_interrupt(), cy_open(), esp_open(), m68k_register_serial(), m68k_rs_init(), register_serial(), rs_8xx_open(), rs_8xx_read_proc(), rs_open(), rs_read_proc(), sab82532_open(), serial167_init(), serial_paranoia_check(), set_serial_info(), and uart_offset_map(). |
|
|
Definition at line 36 of file vacserial.c. |
|
|
|
Definition at line 567 of file vacserial.c. Referenced by rs_timer(), shutdown(), and startup(). |
|
|
Definition at line 23 of file vacserial.c. Referenced by rs_interrupt(), rs_interrupt_elsa(), rs_interrupt_single(), and su_serial_interrupt(). |
|
|
Definition at line 22 of file vacserial.c. Referenced by rs_timer(). |
|
|
Definition at line 11 of file vacserial.c. |
|
|
Definition at line 27 of file vacserial.c. |
|
|
|
|
|
Value: (VAC_INT_CTRL_TIMER_PIO10 | \ ((info->port == VAC_UART_A_TX) ? \ (VAC_INT_CTRL_UART_A_DISABLE|VAC_INT_CTRL_UART_B_PIO7) : \ (VAC_INT_CTRL_UART_A_PIO7|VAC_INT_CTRL_UART_B_DISABLE))) Definition at line 476 of file vacserial.c. Referenced by intr_end(). |
|
|
Definition at line 473 of file vacserial.c. Referenced by intr_end(). |
|
|
Definition at line 191 of file vacserial.c. Referenced by autoconfig(), change_speed(), intr_begin(), intr_end(), rs_close(), rs_flush_chars(), rs_send_xchar(), rs_start(), rs_stop(), rs_timer(), rs_write(), shutdown(), startup(), and transmit_chars(). |
|
|
Definition at line 192 of file vacserial.c. Referenced by get_lsr_info(), receive_chars(), rs_interrupt(), rs_wait_until_sent(), and startup(). |
|
|
Definition at line 188 of file vacserial.c. Referenced by change_speed(), rs_break(), shutdown(), and startup(). |
|
|
Definition at line 194 of file vacserial.c. Referenced by uart_offset_map(). |
|
|
Definition at line 190 of file vacserial.c. Referenced by autoconfig(), receive_chars(), and startup(). |
|
|
Definition at line 189 of file vacserial.c. Referenced by transmit_chars(). |
|
|
Definition at line 126 of file vacserial.c. Referenced by autoconfig(). |
|
|
Definition at line 101 of file vacserial.c. Referenced by cd2401_tx_interrupt(), cyy_interrupt(), cyz_handle_tx(), hpdca_ser_interrupt(), isicom_tx(), mgsl_isr_transmit_data(), moxa_poll(), mxser_transmit_chars(), normal_poll(), rp_do_transmit(), rp_write(), ser_interrupt(), transmit_chars(), transmit_chars_dma(), and transmit_chars_pio(). |
|
|
|
Definition at line 2213 of file vacserial.c. References cli, serial_uart_config::dfl_xmit_fifo_size, serial_state::flags, async_struct::flags, async_struct::magic, serial_state::port, async_struct::port, restore_flags, save_flags, serial_in, SERIAL_MAGIC, serial_outp, serial_state::type, VAC_UART_INT_MASK, VAC_UART_RX, VAC_UART_TYPE, and serial_state::xmit_fifo_size. Referenced by __initfunc(), do_autoconfig(), m68k_register_serial(), and register_serial(). |
|
||||||||||||||||
|
Definition at line 1821 of file vacserial.c. References ASYNC_CALLOUT_ACTIVE, ASYNC_CLOSING, ASYNC_HUP_NOTIFY, ASYNC_INITIALIZED, ASYNC_NORMAL_ACTIVE, ASYNC_PGRP_LOCKOUT, ASYNC_SESSION_LOCKOUT, baget_printk(), async_struct::blocked_open, termios::c_cflag, cli, CLOCAL, async_struct::close_wait, serial_state::count, current, EAGAIN, EBUSY, ERESTARTSYS, async_struct::flags, interruptible_sleep_on(), async_struct::line, serial_state::line, serial_state::normal_termios, NULL, O_NONBLOCK, async_struct::open_wait, async_struct::pgrp, restore_flags, save_flags, schedule(), SERIAL_TYPE_CALLOUT, async_struct::session, signal_pending, async_struct::state, state, TASK_INTERRUPTIBLE, TASK_RUNNING, and tty_hung_up_p(). Referenced by aurora_open(), cy_open(), dz_open(), esp_open(), isicom_open(), mgsl_open(), pc_open(), rc_open(), rp_open(), rs_8xx_open(), rs_open(), sab82532_open(), su_open(), sx_open(), and zs_open(). Here is the call graph for this function: ![]() |
|
|
|
Definition at line 458 of file vacserial.c. References async_struct::open_wait, RS_EVENT_WRITE_WAKEUP, and rs_sched_event(). Referenced by rs_8xx_interrupt(), rs_interrupt(), rs_interrupt_single(), ser_vbl_int(), and su_serial_interrupt(). Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 1428 of file vacserial.c. References autoconfig(), CAP_SYS_ADMIN, capable, EBUSY, EPERM, shutdown(), and startup(). Referenced by rs_ioctl(). Here is the call graph for this function: ![]() |
|
|
Definition at line 585 of file vacserial.c. References run_task_queue(). Referenced by __initfunc(), m68k_rs_init(), macserial_init(), and rs_init(). Here is the call graph for this function: ![]() |
|
|
Definition at line 590 of file vacserial.c. References async_struct::event, RS_EVENT_WRITE_WAKEUP, test_and_clear_bit, async_struct::tty, and tty. Referenced by __initfunc(), aurora_init_drivers(), get_async_struct(), m68k_rs_init(), macserial_init(), post_fep_init(), rc_init_drivers(), rs_init(), serial167_init(), and sx_init_drivers(). |
|
|
|
|
|
|
|
|
Definition at line 621 of file vacserial.c. References HZ, IRQ_timeout, and timeout. Referenced by shutdown(), and startup(). |
|
||||||||||||
|
Definition at line 1947 of file vacserial.c. References serial_state::count, do_softint(), ENOMEM, serial_state::flags, serial_state::info, kfree_s(), kmalloc(), memset, serial_state::port, SERIAL_MAGIC, and serial_state::xmit_fifo_size. Referenced by rs_8xx_open(), and rs_open(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 1390 of file vacserial.c. References cli, put_user, restore_flags, result, save_flags, serial_inw(), status, TIOCSER_TEMT, VAC_UART_INT_STATUS, and VAC_UART_STATUS_TX_EMPTY. Referenced by cy_ioctl(), dz_ioctl(), edge_ioctl(), rs_8xx_ioctl(), rs_ioctl(), sab82532_ioctl(), su_ioctl(), and zs_ioctl(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 1404 of file vacserial.c. References put_user, result, TIOCM_CAR, and TIOCM_DSR. Referenced by cy_ioctl(), edge_ioctl(), mgsl_ioctl_common(), pl2303_ioctl(), rp_ioctl(), rs_8xx_ioctl(), rs_ioctl(), sab82532_ioctl(), su_ioctl(), and zs_ioctl(). |
|
||||||||||||
|
Definition at line 1239 of file vacserial.c. References serial_state::baud_base, serial_state::close_delay, serial_state::closing_wait, copy_to_user, serial_state::custom_divisor, EFAULT, serial_state::flags, serial_state::hub6, serial_state::irq, serial_state::line, memset, serial_state::port, async_struct::state, state, serial_state::type, and serial_state::xmit_fifo_size. Referenced by cy_ioctl(), dz_ioctl(), edge_ioctl(), ip2_ioctl(), ip2_ipl_ioctl(), rs_ioctl(), sab82532_ioctl(), su_ioctl(), and zs_ioctl(). |
|
|
Definition at line 486 of file vacserial.c. References serial_outw(), and VAC_UART_INT_MASK. Referenced by rs_interrupt(). Here is the call graph for this function: ![]() |
|
|
Definition at line 491 of file vacserial.c. References async_struct::IER, serial_outw(), VAC_INT_CTRL, VAC_INT_CTRL_UART_DISABLE, VAC_INT_CTRL_UART_ENABLE, vac_outw, and VAC_UART_INT_MASK. Referenced by rs_interrupt(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 2094 of file vacserial.c. References serial_state::baud_base, async_icount::brk, serial_state::flags, async_struct::flags, async_icount::frame, serial_state::icount, serial_state::info, serial_state::irq, serial_state::line, async_struct::magic, async_icount::overrun, async_icount::parity, async_struct::port, serial_state::port, PORT_UNKNOWN, async_struct::quot, ret, async_icount::rx, SERIAL_MAGIC, sprintf(), async_struct::tty, async_icount::tx, and serial_state::type. Referenced by mgsl_read_proc(), rs_8xx_read_proc(), rs_read_proc(), sab82532_read_proc(), and su_read_proc(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 326 of file vacserial.c. References ASYNC_SAK, baget_printk(), async_icount::brk, do_SAK(), async_struct::flags, async_icount::frame, serial_state::icount, async_struct::ignore_status_mask, ignored, async_icount::overrun, async_icount::parity, async_struct::read_status_mask, async_icount::rx, rx, serial_inw(), async_struct::state, async_struct::tty, tty, tty_flip_buffer_push, VAC_UART_INT_STATUS, VAC_UART_RX, VAC_UART_RX_DATA_MASK, VAC_UART_STATUS_RX_BREAK_CHANGE, VAC_UART_STATUS_RX_ERR_FRAME, VAC_UART_STATUS_RX_ERR_OVERRUN, VAC_UART_STATUS_RX_ERR_PARITY, and VAC_UART_STATUS_RX_READY. Referenced by dz_interrupt(), mac_SCC_interrupt(), rs_8xx_interrupt(), rs_interrupt(), rs_interrupt_elsa(), rs_interrupt_single(), sab82532_interrupt(), and zs_interrupt(). Here is the call graph for this function: ![]() |
|
|
Definition at line 2448 of file vacserial.c. References autoconfig(), cli, count, serial_struct::flags, |