Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/uart/uart_tty.c
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
#include <dev/uart/uart.h> | #include <dev/uart/uart.h> | ||||
#include <dev/uart/uart_bus.h> | #include <dev/uart/uart_bus.h> | ||||
#include <dev/uart/uart_cpu.h> | #include <dev/uart/uart_cpu.h> | ||||
#include "uart_if.h" | #include "uart_if.h" | ||||
static cn_probe_t uart_cnprobe; | static cn_probe_t uart_cnprobe; | ||||
static cn_init_t uart_cninit; | static cn_init_t uart_cninit; | ||||
static cn_init_t uart_cnresume; | |||||
static cn_term_t uart_cnterm; | static cn_term_t uart_cnterm; | ||||
static cn_getc_t uart_cngetc; | static cn_getc_t uart_cngetc; | ||||
static cn_putc_t uart_cnputc; | static cn_putc_t uart_cnputc; | ||||
static cn_grab_t uart_cngrab; | static cn_grab_t uart_cngrab; | ||||
static cn_ungrab_t uart_cnungrab; | static cn_ungrab_t uart_cnungrab; | ||||
static tsw_open_t uart_tty_open; | static tsw_open_t uart_tty_open; | ||||
static tsw_close_t uart_tty_close; | static tsw_close_t uart_tty_close; | ||||
static tsw_outwakeup_t uart_tty_outwakeup; | static tsw_outwakeup_t uart_tty_outwakeup; | ||||
static tsw_inwakeup_t uart_tty_inwakeup; | static tsw_inwakeup_t uart_tty_inwakeup; | ||||
static tsw_ioctl_t uart_tty_ioctl; | static tsw_ioctl_t uart_tty_ioctl; | ||||
static tsw_param_t uart_tty_param; | static tsw_param_t uart_tty_param; | ||||
static tsw_modem_t uart_tty_modem; | static tsw_modem_t uart_tty_modem; | ||||
static tsw_free_t uart_tty_free; | static tsw_free_t uart_tty_free; | ||||
static tsw_busy_t uart_tty_busy; | static tsw_busy_t uart_tty_busy; | ||||
CONSOLE_DRIVER(uart); | CONSOLE_DRIVER( | ||||
uart, | |||||
.cn_resume = uart_cnresume, | |||||
); | |||||
static struct uart_devinfo uart_console; | static struct uart_devinfo uart_console; | ||||
static void | static void | ||||
uart_cnprobe(struct consdev *cp) | uart_cnprobe(struct consdev *cp) | ||||
{ | { | ||||
cp->cn_pri = CN_DEAD; | cp->cn_pri = CN_DEAD; | ||||
Show All 26 Lines | uart_cninit(struct consdev *cp) | ||||
* the unit number will be. | * the unit number will be. | ||||
*/ | */ | ||||
di = cp->cn_arg; | di = cp->cn_arg; | ||||
KASSERT(di->cookie == NULL, ("foo")); | KASSERT(di->cookie == NULL, ("foo")); | ||||
di->cookie = cp; | di->cookie = cp; | ||||
di->type = UART_DEV_CONSOLE; | di->type = UART_DEV_CONSOLE; | ||||
uart_add_sysdev(di); | uart_add_sysdev(di); | ||||
uart_init(di); | uart_init(di); | ||||
} | |||||
static void | |||||
uart_cnresume(struct consdev *cp) | |||||
{ | |||||
uart_init(cp->cn_arg); | |||||
} | } | ||||
static void | static void | ||||
uart_cnterm(struct consdev *cp) | uart_cnterm(struct consdev *cp) | ||||
{ | { | ||||
uart_term(cp->cn_arg); | uart_term(cp->cn_arg); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 319 Lines • Show Last 20 Lines |