#include <linux/config.h>#include <linux/module.h>#include <linux/errno.h>#include <linux/signal.h>#include <linux/sched.h>#include <linux/interrupt.h>#include <linux/tty.h>#include <linux/tty_flip.h>#include <linux/serial.h>#include <linux/serial_reg.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 <linux/sysrq.h>#include <asm/system.h>#include <asm/oplib.h>#include <asm/io.h>#include <asm/ebus.h>#include <asm/irq.h>#include <asm/uaccess.h>#include <asm/bitops.h>#include "sunserial.h"#include "sunkbd.h"#include "sunmouse.h"Include dependency graph for su.c:

Go to the source code of this file.
Defines | |
| #define | SERIAL_PARANOIA_CHECK |
| #define | CONFIG_SERIAL_NOPAUSE_IO |
| #define | SERIAL_DO_RESTART |
| #define | RS_ISR_PASS_LIMIT 256 |
| #define | IRQ_4M(n) ((n)|0x20) |
| #define | DBG_CNT(s) |
| #define | BAUD_BASE (1846200 / 16) |
| #define | SU_PROPSIZE 128 |
| #define | WAKEUP_CHARS 256 |
| #define | NR_PORTS 4 |
| #define | MIN(a, b) ((a) < (b) ? (a) : (b)) |
| #define | serial_in(info, off) su_inb(info, off) |
| #define | serial_inp(info, off) su_inb(info, off) |
| #define | serial_out(info, off, val) su_outb(info, off, val) |
| #define | serial_outp(info, off, val) su_outb(info, off, val) |
| #define | RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) |
Enumerations | |
| enum | su_type { SU_PORT_NONE, SU_PORT_MS, SU_PORT_KBD, SU_PORT_PORT } |
Functions | |
| static | DECLARE_TASK_QUEUE (tq_serial) |
| static void | autoconfig (struct su_struct *info) |
| static void | change_speed (struct su_struct *info, struct termios *old) |
| static void | su_wait_until_sent (struct tty_struct *tty, int timeout) |
| static int | serial_paranoia_check (struct su_struct *info, kdev_t device, const char *routine) |
| static unsigned int | su_inb (struct su_struct *info, unsigned long offset) |
| static void | su_outb (struct su_struct *info, unsigned long offset, int value) |
| static void | su_stop (struct tty_struct *tty) |
| static void | su_start (struct tty_struct *tty) |
| static __inline__ void | su_sched_event (struct su_struct *info, int event) |
| static __inline__ void | receive_kbd_ms_chars (struct su_struct *info, struct pt_regs *regs, int is_brk) |
| static __inline__ void | receive_serial_chars (struct su_struct *info, int *status, struct pt_regs *regs) |
| static __inline__ void | transmit_chars (struct su_struct *info, int *intr_done) |
| static __inline__ void | check_modem_status (struct su_struct *info) |
| static void | su_kbd_ms_interrupt (int irq, void *dev_id, struct pt_regs *regs) |
| static void | su_serial_interrupt (int irq, void *dev_id, struct pt_regs *regs) |
| static void | do_serial_bh (void) |
| static void | do_softint (void *private_) |
| static int | startup (struct su_struct *info) |
| static void | shutdown (struct su_struct *info) |
| static __inline__ int | su_get_baud_rate (struct su_struct *info) |
| static void | su_put_char (struct tty_struct *tty, unsigned char ch) |
| static void | su_put_char_kbd (unsigned char c) |
| static void | su_change_mouse_baud (int baud) |
| static void | su_flush_chars (struct tty_struct *tty) |
| static int | su_write (struct tty_struct *tty, int from_user, const unsigned char *buf, int count) |
| static int | su_write_room (struct tty_struct *tty) |
| static int | su_chars_in_buffer (struct tty_struct *tty) |
| static void | su_flush_buffer (struct tty_struct *tty) |
| static void | su_send_xchar (struct tty_struct *tty, char ch) |
| static void | su_throttle (struct tty_struct *tty) |
| static void | su_unthrottle (struct tty_struct *tty) |
| static int | get_serial_info (struct su_struct *info, struct serial_struct *retinfo) |
| static int | get_lsr_info (struct su_struct *info, unsigned int *value) |
| static int | get_modem_info (struct su_struct *info, unsigned int *value) |
| static int | set_modem_info (struct su_struct *info, unsigned int cmd, unsigned int *value) |
| static void | su_break (struct tty_struct *tty, int break_state) |
| static int | su_ioctl (struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) |
| static void | su_set_termios (struct tty_struct *tty, struct termios *old_termios) |
| static void | su_close (struct tty_struct *tty, struct file *filp) |
| static void | su_hangup (struct tty_struct *tty) |
| static int | block_til_ready (struct tty_struct *tty, struct file *filp, struct su_struct *info) |
| static int | su_open (struct tty_struct *tty, struct file *filp) |
| static __inline__ int | line_info (char *buf, struct su_struct *info) |
| int | su_read_proc (char *page, char **start, off_t off, int count, int *eof, void *data) |
| __initfunc (static __inline__ void show_su_version(void)) | |
| __initfunc (int su_serial_init(void)) | |
| __initfunc (void su_probe_any(struct su_probe_scan *t, int sunode)) | |
| __initfunc (int su_probe(unsigned long *memory_start)) | |
Variables | |
| static char * | su_typev [] = { "???", "mouse", "kbd", "serial" } |
| static char * | serial_name = "PCIO serial driver" |
| static char | serial_version [16] |
| static struct tty_driver serial_driver | callout_driver |
| static int | serial_refcount |
| static struct serial_uart_config | uart_config [] |
| static struct su_struct | su_table [NR_PORTS] |
| 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 |
| int | su_num_ports = 0 |
|
|
Definition at line 87 of file su.c. Referenced by __initfunc(). |
|
|
|
|
|
|
|
|
Definition at line 32 of file su.c. Referenced by autoconfig(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 266 of file su.c. Referenced by autoconfig(), block_til_ready(), check_modem_status(), get_lsr_info(), get_modem_info(), kgdb_init(), line_info(), receive_chars(), receive_chars_pio(), rs_interrupt_single(), rs_wait_until_sent(), shutdown(), startup(), su_kbd_ms_interrupt(), su_put_char_kbd(), su_serial_interrupt(), and transmit_chars_pio(). |
|
|
Definition at line 267 of file su.c. Referenced by autoconfig(), block_til_ready(), change_speed(), detect_uart_irq(), elsa_interrupt(), elsa_interrupt_ipac(), mshutdown(), mstartup(), receive_chars(), receive_kbd_ms_chars(), receive_serial_chars(), rs_break(), rs_interrupt_elsa(), rs_interrupt_single(), rs_wait_until_sent(), shutdown(), startup(), su_break(), su_kbd_ms_interrupt(), su_serial_interrupt(), and su_wait_until_sent(). |
|
|
|
Definition at line 269 of file su.c. Referenced by autoconfig(), change_speed(), detect_uart_irq(), elsa_interrupt(), modem_write_cmd(), mshutdown(), mstartup(), rs_break(), shutdown(), startup(), transmit_chars(), and write_modem(). |
|
|
|
|
|
Definition at line 98 of file su.c. Referenced by __initfunc(). |
|
|
|
|
|
|
|
|
Definition at line 2646 of file su.c. References su_probe_scan::devices, ENODEV, su_struct::is_console, kbd_ops, su_probe_scan::kbnode, su_probe_scan::kbx, len, su_probe_scan::msnode, su_probe_scan::msx, su_struct::port_node, su_struct::port_type, printk, prom_finddevice(), prom_getchild(), prom_getproperty(), prom_root_node, prom_searchsiblings(), su_probe_scan::prop, sunserial_operations::rs_change_mouse_baud, rs_ops, su_change_mouse_baud(), SU_PORT_KBD, SU_PORT_MS, SU_PROPSIZE, sun_compute_shiftstate(), sun_getkeycode(), sun_getledstate(), sun_kbd_init(), sun_setkeycode(), sun_setledstate(), sunkbd_setinitfunc(), and sunserial_setinitfunc(). Here is the call graph for this function: ![]() |
|
|
Definition at line 2612 of file su.c. References su_struct::is_console, len, su_struct::port_node, su_struct::port_type, prom_getchild(), prom_getproperty(), prom_getsibling(), strncmp(), SU_PORT_KBD, SU_PORT_MS, SU_PORT_PORT, and SU_PROPSIZE. Here is the call graph for this function: ![]() |
|
|
|
Definition at line 2265 of file su.c. References KERN_INFO, p, printk, revision, serial_name, serial_version, strchr, strcpy, and version. |
|
|
Definition at line 2285 of file su.c. References __irq_itoa, linux_ebus_device::base_address, cli, dev, serial_uart_config::dfl_xmit_fifo_size, for_each_ebus, for_each_ebusdev, su_struct::irq, IRQ_4M, linux_ebus_device::irqs, su_struct::magic, su_struct::name, su_struct::port, PORT_16450, PORT_16550, PORT_16550A, PORT_16650, PORT_16650V2, PORT_16750, PORT_8250, su_struct::port_node, su_struct::port_type, PORT_UNKNOWN, printk, prom_apply_obio_ranges(), prom_getproperty(), linux_ebus_device::prom_node, prom_printf, request_region, restore_flags, save_flags, serial_in, serial_inp, SERIAL_MAGIC, serial_outp, sparc_alloc_io(), sprintf(), su_typev, su_struct::type, UART_EFR, UART_FCR, UART_FCR7_64BYTE, UART_FCR_CLEAR_RCVR, UART_FCR_CLEAR_XMIT, UART_FCR_ENABLE_FIFO, UART_IER, UART_IIR, UART_LCR, UART_LCR_DLAB, UART_MCR, UART_MCR_LOOP, UART_MSR, UART_RX, UART_SCR, x00, xBF, and su_struct::xmit_fifo_size. Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 1925 of file su.c. References ASYNC_CALLOUT_ACTIVE, ASYNC_CLOSING, ASYNC_HUP_NOTIFY, ASYNC_INITIALIZED, ASYNC_NORMAL_ACTIVE, ASYNC_PGRP_LOCKOUT, ASYNC_SESSION_LOCKOUT, su_struct::blocked_open, CBAUD, cli, CLOCAL, su_struct::close_wait, su_struct::count, current, EAGAIN, EBUSY, ERESTARTSYS, su_struct::flags, interruptible_sleep_on(), su_struct::line, NULL, O_NONBLOCK, su_struct::open_wait, su_struct::pgrp, printk, restore_flags, save_flags, schedule(), serial_in, serial_inp, serial_out, SERIAL_TYPE_CALLOUT, su_struct::session, signal_pending, TASK_INTERRUPTIBLE, TASK_RUNNING, tty_hung_up_p(), UART_MCR, UART_MCR_DTR, UART_MCR_RTS, UART_MSR, and UART_MSR_DCD. Here is the call graph for this function: ![]() |
|
||||||||||||
|
Definition at line 959 of file su.c. References ASYNC_CHECK_CD, ASYNC_CTS_FLOW, ASYNC_HARDPPS_CD, ASYNC_SPD_CUST, ASYNC_SPD_MASK, baud, termios::c_cflag, CBAUD, cli, CLOCAL, CMSPAR, CREAD, CRTSCTS, CS5, CS6, CS7, CS8, CSIZE, CSTOPB, serial_uart_config::flags, HZ, PARENB, PARODD, PORT_16750, restore_flags, save_flags, serial_out, serial_outp, su_get_baud_rate(), SU_PORT_PORT, tty_get_baud_rate(), UART_DLL, UART_DLM, UART_EFR, UART_EFR_CTS, UART_FCR, UART_FCR7_64BYTE, UART_FCR_ENABLE_FIFO, UART_FCR_TRIGGER_1, UART_FCR_TRIGGER_8, UART_IER, UART_IER_MSI, UART_LCR, UART_LCR_DLAB, UART_LCR_EPAR, UART_LCR_PARITY, UART_LCR_SPAR, UART_LSR_BI, UART_LSR_DR, UART_LSR_FE, UART_LSR_OE, UART_LSR_PE, UART_LSR_THRE, UART_STARTECH, UART_USE_FIFO, xBF, and xff. Here is the call graph for this function: ![]() |
|
|
Definition at line 517 of file su.c. References ASYNC_CALLOUT_ACTIVE, ASYNC_CALLOUT_NOHUP, ASYNC_CHECK_CD, ASYNC_CTS_FLOW, ASYNC_HARDPPS_CD, async_icount::cts, async_icount::dcd, su_struct::delta_msr_wait, async_icount::dsr, su_struct::flags, su_struct::icount, su_struct::IER, su_struct::line, su_struct::open_wait, printk, async_icount::rng, RS_EVENT_WRITE_WAKEUP, serial_in, serial_out, status, su_sched_event(), su_struct::tty, tty_hangup(), UART_IER, UART_IER_THRI, UART_MSR, UART_MSR_ANY_DELTA, UART_MSR_CTS, UART_MSR_DCD, UART_MSR_DCTS, UART_MSR_DDCD, UART_MSR_DDSR, and UART_MSR_TERI. Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 678 of file su.c. References run_task_queue(). Here is the call graph for this function: ![]() |
|
|
Definition at line 683 of file su.c. References su_struct::event, RS_EVENT_WRITE_WAKEUP, test_and_clear_bit, su_struct::tty, and tty. |
|
||||||||||||
|
Definition at line 1459 of file su.c. References cli, put_user, restore_flags, result, save_flags, serial_in, status, TIOCSER_TEMT, UART_LSR, and UART_LSR_TEMT. |
|
||||||||||||
|
Definition at line 1474 of file su.c. References cli, su_struct::MCR, put_user, restore_flags, result, save_flags, serial_in, status, TIOCM_CAR, TIOCM_CTS, TIOCM_DSR, TIOCM_DTR, TIOCM_OUT1, TIOCM_OUT2, TIOCM_RNG, TIOCM_RTS, UART_MCR_DTR, UART_MCR_OUT1, UART_MCR_OUT2, UART_MCR_RTS, UART_MSR, UART_MSR_CTS, UART_MSR_DCD, UART_MSR_DSR, and UART_MSR_RI. |
|
||||||||||||
|
Definition at line 1421 of file su.c. References su_struct::baud_base, su_struct::close_delay, su_struct::closing_wait, copy_to_user, su_struct::custom_divisor, EFAULT, su_struct::flags, su_struct::irq, su_struct::line, memset, su_struct::port, su_struct::type, and su_struct::xmit_fifo_size. |
|
||||||||||||
|
Definition at line 2163 of file su.c. References __irq_itoa, su_struct::baud_base, async_icount::brk, cli, async_icount::frame, su_struct::icount, su_struct::irq, su_struct::line, su_struct::MCR, async_icount::overrun, async_icount::parity, su_struct::port, PORT_UNKNOWN, su_struct::quot, restore_flags, ret, async_icount::rx, save_flags, serial_in, sprintf(), status, strcat, async_icount::tx, su_struct::type, UART_MCR, UART_MCR_DTR, UART_MCR_RTS, UART_MSR, UART_MSR_CTS, UART_MSR_DCD, UART_MSR_DSR, and UART_MSR_RI. Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 345 of file su.c. References batten_down_hatches(), l1a_kbd_state::kbd_id, l1a_kbd_state::l1_down, l1a_state, su_struct::port_type, serial_inp, status, su_inb(), SU_PORT_KBD, sun_mouse_inbyte(), SUNKBD_A, sunkbd_inchar(), SUNKBD_L1, SUNKBD_RESET, SUNKBD_UP, UART_LSR, UART_LSR_DR, and UART_RX. Referenced by su_kbd_ms_interrupt(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 380 of file su.c. References ASYNC_SAK, batten_down_hatches(), async_icount::brk, do_SAK(), async_icount::frame, ignored, async_icount::overrun, async_icount::parity, printk, async_icount::rx, serial_inp, tty, tty_flip_buffer_push, UART_LSR, UART_LSR_BI, UART_LSR_DR, UART_LSR_FE, UART_LSR_OE, UART_LSR_PE, and UART_RX. Referenced by su_serial_interrupt(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 222 of file su.c. References kdevname(), su_struct::magic, printk, and SERIAL_MAGIC. Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Definition at line 1498 of file su.c. References cli, EINVAL, error, get_user, su_struct::MCR, restore_flags, save_flags, serial_out, TIOCM_DTR, TIOCM_OUT1, TIOCM_OUT2, TIOCM_RTS, TIOCMBIC, TIOCMBIS, TIOCMSET, UART_MCR, UART_MCR_DTR, UART_MCR_OUT1, UART_MCR_OUT2, and UART_MCR_RTS. |
|
|
Definition at line 872 of file su.c. References ASYNC_INITIALIZED, cli, su_struct::delta_msr_wait, serial_uart_config::flags, su_struct::flags, free_irq(), free_page, HUPCL, su_struct::IER, su_struct::irq, su_struct::MCR, PORT_16750, restore_flags, save_flags, serial_in, serial_inp, serial_out, serial_outp, set_bit, su_struct::tty, UART_EFR, UART_EFR_ECB, UART_FCR, UART_FCR_CLEAR_RCVR, UART_FCR_CLEAR_XMIT, UART_IER, UART_IERX_SLEEP, UART_LCR, UART_LCR_SBC, UART_MCR, UART_MCR_DTR, UART_MCR_OUT2, UART_MCR_RTS, UART_RX, UART_STARTECH, x00, xBF, and su_struct::xmit_buf. Here is the call graph for this function: ![]() |
|
|
|