summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-10-21 12:14:54 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-10-21 12:14:54 +0000
commita6be094cde992072567c10146b1caffc51c4623c (patch)
tree0a8af7309789a38da34bbe4e420bc4cfc12d6c36 /sys/arch
parent1da94e2b155f35110f0ee5f3426a2209db7532e5 (diff)
Fix lies in comments, and apply some KNF and unused or duplicate prototype
removals.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sgi/hpc/zs.c4
-rw-r--r--sys/arch/sparc/dev/zs.c20
-rw-r--r--sys/arch/sparc64/dev/zs.c48
3 files changed, 28 insertions, 44 deletions
diff --git a/sys/arch/sgi/hpc/zs.c b/sys/arch/sgi/hpc/zs.c
index 4ff3aeba452..0b1c1bedc77 100644
--- a/sys/arch/sgi/hpc/zs.c
+++ b/sys/arch/sgi/hpc/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.10 2012/09/29 18:54:39 miod Exp $ */
+/* $OpenBSD: zs.c,v 1.11 2013/10/21 12:14:51 miod Exp $ */
/* $NetBSD: zs.c,v 1.37 2011/02/20 07:59:50 matt Exp $ */
/*-
@@ -34,7 +34,7 @@
* Zilog Z8530 Dual UART driver (machine-dependent part)
*
* Runs two serial lines per chip using slave drivers.
- * Plain tty/async lines use the zs_async slave.
+ * Plain tty/async lines use the zstty slave.
*/
#include <sys/param.h>
diff --git a/sys/arch/sparc/dev/zs.c b/sys/arch/sparc/dev/zs.c
index cde41bde908..237f663f2c5 100644
--- a/sys/arch/sparc/dev/zs.c
+++ b/sys/arch/sparc/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.52 2013/09/15 09:49:21 miod Exp $ */
+/* $OpenBSD: zs.c,v 1.53 2013/10/21 12:14:52 miod Exp $ */
/* $NetBSD: zs.c,v 1.50 1997/10/18 00:00:40 gwr Exp $ */
/*-
@@ -34,8 +34,8 @@
* Zilog Z8530 Dual UART driver (machine-dependent part)
*
* Runs two serial lines per chip using slave drivers.
- * Plain tty/async lines use the zs_async slave.
- * Sun keyboard/mouse uses the zs_kbd/zs_ms slaves.
+ * Plain tty/async lines use the zstty slave.
+ * Sun keyboard/mouse uses the zskbd/zsms slaves.
*/
#include <sys/param.h>
@@ -503,7 +503,7 @@ zs_set_speed(cs, bps)
int
zs_set_modes(cs, cflag)
struct zs_chanstate *cs;
- int cflag; /* bits per second */
+ int cflag;
{
int s;
@@ -577,7 +577,8 @@ zs_write_reg(cs, reg, val)
ZS_DELAY();
}
-u_char zs_read_csr(cs)
+u_char
+zs_read_csr(cs)
struct zs_chanstate *cs;
{
register u_char val;
@@ -587,7 +588,8 @@ u_char zs_read_csr(cs)
return val;
}
-void zs_write_csr(cs, val)
+void
+zs_write_csr(cs, val)
struct zs_chanstate *cs;
u_char val;
{
@@ -595,7 +597,8 @@ void zs_write_csr(cs, val)
ZS_DELAY();
}
-u_char zs_read_data(cs)
+u_char
+zs_read_data(cs)
struct zs_chanstate *cs;
{
register u_char val;
@@ -605,7 +608,8 @@ u_char zs_read_data(cs)
return val;
}
-void zs_write_data(cs, val)
+void
+zs_write_data(cs, val)
struct zs_chanstate *cs;
u_char val;
{
diff --git a/sys/arch/sparc64/dev/zs.c b/sys/arch/sparc64/dev/zs.c
index 287e80d42b2..ad7d5b5080d 100644
--- a/sys/arch/sparc64/dev/zs.c
+++ b/sys/arch/sparc64/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.24 2013/04/21 14:44:16 sebastia Exp $ */
+/* $OpenBSD: zs.c,v 1.25 2013/10/21 12:14:53 miod Exp $ */
/* $NetBSD: zs.c,v 1.29 2001/05/30 15:24:24 lukem Exp $ */
/*-
@@ -34,8 +34,8 @@
* Zilog Z8530 Dual UART driver (machine-dependent part)
*
* Runs two serial lines per chip using slave drivers.
- * Plain tty/async lines use the zs_async slave.
- * Sun keyboard/mouse uses the zs_kbd/zs_ms slaves.
+ * Plain tty/async lines use the zstty slave.
+ * Sun keyboard/mouse uses the zskbd/zsms slaves.
*/
#include <sys/param.h>
@@ -170,7 +170,6 @@ extern int stdinnode;
extern int fbnode;
/* Interrupt handlers. */
-int zscheckintr(void *);
static int zshard(void *);
static void zssoft(void *);
@@ -179,10 +178,6 @@ static int zs_get_speed(struct zs_chanstate *);
/* Console device support */
static int zs_console_flags(int, int, int);
-/* Power management hooks */
-int zs_enable(struct zs_chanstate *);
-void zs_disable(struct zs_chanstate *);
-
/*
* Is the zs chip present?
*/
@@ -494,25 +489,6 @@ zshard(arg)
return (rval);
}
-int
-zscheckintr(arg)
- void *arg;
-{
- struct zsc_softc *zsc;
- int unit, rval;
-
- rval = 0;
- for (unit = 0; unit < zs_cd.cd_ndevs; unit++) {
-
- zsc = zs_cd.cd_devs[unit];
- if (zsc == NULL)
- continue;
- rval = (zshard((void *)zsc) || rval);
- }
- return (rval);
-}
-
-
/*
* We need this only for TTY_DEBUG purposes.
*/
@@ -595,7 +571,7 @@ zs_set_speed(cs, bps)
int
zs_set_modes(cs, cflag)
struct zs_chanstate *cs;
- int cflag; /* bits per second */
+ int cflag;
{
int s;
@@ -680,7 +656,8 @@ zs_read_csr(cs)
return (val);
}
-void zs_write_csr(cs, val)
+void
+zs_write_csr(cs, val)
struct zs_chanstate *cs;
u_char val;
{
@@ -688,7 +665,8 @@ void zs_write_csr(cs, val)
ZS_DELAY();
}
-u_char zs_read_data(cs)
+u_char
+zs_read_data(cs)
struct zs_chanstate *cs;
{
u_char val;
@@ -698,7 +676,8 @@ u_char zs_read_data(cs)
return (val);
}
-void zs_write_data(cs, val)
+void
+zs_write_data(cs, val)
struct zs_chanstate *cs;
u_char val;
{
@@ -849,8 +828,10 @@ zscnpollc(dev, on)
* being generated.
*/
- if (on) swallow_zsintrs++;
- else swallow_zsintrs--;
+ if (on)
+ swallow_zsintrs++;
+ else
+ swallow_zsintrs--;
}
int
@@ -896,4 +877,3 @@ zs_console_flags(promunit, node, channel)
return (flags);
}
-