diff options
author | phk <phk@FreeBSD.org> | 2003-02-20 20:54:45 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-02-20 20:54:45 +0000 |
commit | 72688ad7fe6ac65cbfc2c4d260ba7d901bf1bcc2 (patch) | |
tree | fe84e49e8fed83b0535fa5e72d7341488cc6b288 /sys/alpha | |
parent | f5440b21c3c89d9d1d989bbed1147a6d7e678e41 (diff) | |
download | FreeBSD-src-72688ad7fe6ac65cbfc2c4d260ba7d901bf1bcc2.zip FreeBSD-src-72688ad7fe6ac65cbfc2c4d260ba7d901bf1bcc2.tar.gz |
Change the console interface to pass a "struct consdev *" instead of a
dev_t to the method functions.
The dev_t can still be found at struct consdev *->cn_dev.
Add a void *cn_arg element to struct consdev which the drivers can use
for retrieving their softc.
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/machdep.c | 1 | ||||
-rw-r--r-- | sys/alpha/alpha/mp_machdep.c | 1 | ||||
-rw-r--r-- | sys/alpha/alpha/prom.c | 10 | ||||
-rw-r--r-- | sys/alpha/alpha/promcons.c | 4 | ||||
-rw-r--r-- | sys/alpha/alpha/vm_machdep.c | 1 | ||||
-rw-r--r-- | sys/alpha/include/prom.h | 6 | ||||
-rw-r--r-- | sys/alpha/mcbus/mcpcia.c | 1 | ||||
-rw-r--r-- | sys/alpha/osf1/osf1_signal.c | 1 | ||||
-rw-r--r-- | sys/alpha/tlsb/zs_tlsb.c | 18 |
9 files changed, 22 insertions, 21 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 614f50b..3e7dcbb 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -111,6 +111,7 @@ #include <sys/bio.h> #include <sys/buf.h> #include <sys/bus.h> +#include <sys/cons.h> #include <sys/mbuf.h> #include <sys/vmmeter.h> #include <sys/msgbuf.h> diff --git a/sys/alpha/alpha/mp_machdep.c b/sys/alpha/alpha/mp_machdep.c index ed32a65..f709628 100644 --- a/sys/alpha/alpha/mp_machdep.c +++ b/sys/alpha/alpha/mp_machdep.c @@ -30,6 +30,7 @@ #include <sys/systm.h> #include <sys/ktr.h> #include <sys/proc.h> +#include <sys/cons.h> #include <sys/lock.h> #include <sys/malloc.h> #include <sys/mutex.h> diff --git a/sys/alpha/alpha/prom.c b/sys/alpha/alpha/prom.c index ba914c5..58c9cf9 100644 --- a/sys/alpha/alpha/prom.c +++ b/sys/alpha/alpha/prom.c @@ -129,9 +129,7 @@ static void leave_prom(critical_t); * of the console area. */ void -promcnputc(dev, c) - dev_t dev; - int c; +promcnputc(struct consdev *cp, int c) { prom_return_t ret; unsigned char *to = (unsigned char *)0x20000000; @@ -153,8 +151,7 @@ promcnputc(dev, c) * Wait for the prom to get a real char and pass it back. */ int -promcngetc(dev) - dev_t dev; +promcngetc(struct consdev *cp) { prom_return_t ret; register_t s; @@ -174,8 +171,7 @@ promcngetc(dev) * If a char is ready, return it, otherwise return -1. */ int -promcncheckc(dev) - dev_t dev; +promcncheckc(struct consdev *cp) { prom_return_t ret; register_t s; diff --git a/sys/alpha/alpha/promcons.c b/sys/alpha/alpha/promcons.c index 276de20..6445625 100644 --- a/sys/alpha/alpha/promcons.c +++ b/sys/alpha/alpha/promcons.c @@ -209,7 +209,7 @@ promstart(tp) tp->t_state |= TS_BUSY; while (tp->t_outq.c_cc != 0) - promcnputc(tp->t_dev, getc(&tp->t_outq)); + promcnputc(NULL, getc(&tp->t_outq)); tp->t_state &= ~TS_BUSY; ttwwakeup(tp); @@ -240,7 +240,7 @@ promtimeout(v) struct tty *tp = v; int c; - while ((c = promcncheckc(tp->t_dev)) != -1) { + while ((c = promcncheckc(NULL)) != -1) { if (tp->t_state & TS_ISOPEN) (*linesw[tp->t_line].l_rint)(c, tp); } diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index 73f2343..28bb44e 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -73,6 +73,7 @@ #include <sys/malloc.h> #include <sys/bio.h> #include <sys/buf.h> +#include <sys/cons.h> #include <sys/mutex.h> #include <sys/vnode.h> #include <sys/vmmeter.h> diff --git a/sys/alpha/include/prom.h b/sys/alpha/include/prom.h index b242f1d..05cb4fb 100644 --- a/sys/alpha/include/prom.h +++ b/sys/alpha/include/prom.h @@ -97,9 +97,9 @@ int prom_getenv(int, char *, int); #ifdef _KERNEL void promcnattach(int); void promcndetach(void); -void promcnputc(dev_t, int); -int promcngetc(dev_t); -int promcncheckc(dev_t); +cn_putc_t promcnputc; +cn_getc_t promcngetc; +cn_checkc_t promcncheckc; u_int64_t prom_dispatch(u_int64_t, u_int64_t, u_int64_t, u_int64_t, u_int64_t); diff --git a/sys/alpha/mcbus/mcpcia.c b/sys/alpha/mcbus/mcpcia.c index 615b32f..d1b5af5 100644 --- a/sys/alpha/mcbus/mcpcia.c +++ b/sys/alpha/mcbus/mcpcia.c @@ -34,6 +34,7 @@ #include <sys/module.h> #include <sys/mutex.h> #include <sys/bus.h> +#include <sys/cons.h> #include <machine/bus.h> #include <machine/md_var.h> #include <sys/proc.h> diff --git a/sys/alpha/osf1/osf1_signal.c b/sys/alpha/osf1/osf1_signal.c index c5be828..b1369ed 100644 --- a/sys/alpha/osf1/osf1_signal.c +++ b/sys/alpha/osf1/osf1_signal.c @@ -66,6 +66,7 @@ #include <vm/vm_pager.h> #include <sys/user.h> #include <sys/ptrace.h> +#include <sys/cons.h> #include <machine/clock.h> #include <machine/md_var.h> #include <machine/reg.h> diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 5a72a74..c22e4fc 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -216,9 +216,9 @@ zs_putc(caddr_t base, int chan, int c) /* * Console support */ -int zs_cngetc(dev_t); -int zs_cncheckc(dev_t); -void zs_cnputc(dev_t, int); +cn_getc_t zs_cngetc; +cn_checkc_t zs_cncheckc; +cn_putc_t zs_cnputc; static caddr_t zs_console_addr; CONS_DRIVER(zs, NULL, NULL, NULL, zs_cngetc, zs_cncheckc, zs_cnputc, NULL); @@ -237,28 +237,28 @@ zs_cnattach(vm_offset_t base, vm_offset_t offset) } int -zs_cngetc(dev_t dev) +zs_cngetc(struct consdev *cp) { int s = spltty(); - int c = zs_getc(zs_console_addr, minor(dev)); + int c = zs_getc(zs_console_addr, minor(cp->cn_dev)); splx(s); return c; } int -zs_cncheckc(dev_t dev) +zs_cncheckc(struct consdev *cp) { int s = spltty(); - int c = zs_maygetc(zs_console_addr, minor(dev)); + int c = zs_maygetc(zs_console_addr, minor(cp->cn_dev)); splx(s); return c; } void -zs_cnputc(dev_t dev, int c) +zs_cnputc(struct consdev *cp, int c) { int s = spltty(); - zs_putc(zs_console_addr, minor(dev), c); + zs_putc(zs_console_addr, minor(cp->cn_dev), c); splx(s); } |