summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/dev/abtn.c15
-rw-r--r--sys/arch/macppc/dev/adb.c17
-rw-r--r--sys/arch/macppc/dev/aed.c55
-rw-r--r--sys/arch/macppc/dev/akbd.c57
-rw-r--r--sys/arch/macppc/dev/ams.c37
-rw-r--r--sys/arch/macppc/dev/apm.c45
-rw-r--r--sys/arch/macppc/dev/awacs.c130
-rw-r--r--sys/arch/macppc/dev/dbdma.c25
-rw-r--r--sys/arch/macppc/dev/if_bm.c120
-rw-r--r--sys/arch/macppc/dev/macintr.c63
-rw-r--r--sys/arch/macppc/dev/openpic.c95
-rw-r--r--sys/arch/macppc/dev/pm_direct.c65
-rw-r--r--sys/arch/macppc/dev/uni_n.c23
-rw-r--r--sys/arch/macppc/dev/z8530sc.c31
-rw-r--r--sys/arch/macppc/dev/z8530tty.c125
-rw-r--r--sys/arch/macppc/dev/zs.c43
16 files changed, 283 insertions, 663 deletions
diff --git a/sys/arch/macppc/dev/abtn.c b/sys/arch/macppc/dev/abtn.c
index bd79f6279cc..a8c54e87ba3 100644
--- a/sys/arch/macppc/dev/abtn.c
+++ b/sys/arch/macppc/dev/abtn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: abtn.c,v 1.7 2003/07/07 22:05:40 pvalchev Exp $ */
+/* $OpenBSD: abtn.c,v 1.8 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: abtn.c,v 1.1 1999/07/12 17:48:26 tsubai Exp $ */
/*-
@@ -61,10 +61,7 @@ struct cfdriver abtn_cd = {
};
int
-abtn_match(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+abtn_match(struct device *parent, void *cf, void *aux)
{
struct adb_attach_args *aa = aux;
@@ -76,9 +73,7 @@ abtn_match(parent, cf, aux)
}
void
-abtn_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+abtn_attach(struct device *parent, struct device *self, void *aux)
{
struct abtn_softc *sc = (struct abtn_softc *)self;
struct adb_attach_args *aa = aux;
@@ -97,9 +92,7 @@ abtn_attach(parent, self, aux)
}
void
-abtn_adbcomplete(buffer, data, adb_command)
- caddr_t buffer, data;
- int adb_command;
+abtn_adbcomplete(caddr_t buffer, caddr_t data, int adb_command)
{
u_int cmd, brightness;
diff --git a/sys/arch/macppc/dev/adb.c b/sys/arch/macppc/dev/adb.c
index 667cf783bee..1594c950975 100644
--- a/sys/arch/macppc/dev/adb.c
+++ b/sys/arch/macppc/dev/adb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adb.c,v 1.7 2002/09/15 09:01:58 deraadt Exp $ */
+/* $OpenBSD: adb.c,v 1.8 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: adb.c,v 1.6 1999/08/16 06:28:09 tsubai Exp $ */
/*-
@@ -76,10 +76,7 @@ struct cfdriver adb_cd = {
};
int
-adbmatch(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+adbmatch(struct device *parent, void *cf, void *aux)
{
struct confargs *ca = aux;
@@ -109,9 +106,7 @@ extern clock_read_t *clock_read;
void
-adbattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+adbattach(struct device *parent, struct device *self, void *aux)
{
struct adb_softc *sc = (struct adb_softc *)self;
struct confargs *ca = aux;
@@ -135,7 +130,7 @@ adbattach(parent, self, aux)
ADBReInit();
mac_intr_establish(parent, ca->ca_intr[0], IST_LEVEL, IPL_HIGH,
- adb_intr, sc, "adb");
+ adb_intr, sc, "adb");
/* init powerpc globals which control RTC functionality */
clock_read = NULL;
@@ -197,9 +192,7 @@ adbattach(parent, self, aux)
}
int
-adbprint(args, name)
- void *args;
- const char *name;
+adbprint(void *args, const char *name)
{
struct adb_attach_args *aa_args = (struct adb_attach_args *)args;
int rv = UNCONF;
diff --git a/sys/arch/macppc/dev/aed.c b/sys/arch/macppc/dev/aed.c
index 1f15ff08d64..ff8fa050725 100644
--- a/sys/arch/macppc/dev/aed.c
+++ b/sys/arch/macppc/dev/aed.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aed.c,v 1.6 2002/09/15 09:01:58 deraadt Exp $ */
+/* $OpenBSD: aed.c,v 1.7 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: aed.c,v 1.5 2000/03/23 06:40:33 thorpej Exp $ */
/*
@@ -78,10 +78,7 @@ struct cfattach aed_ca = {
};
int
-aedmatch(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+aedmatch(struct device *parent, void *cf, void *aux)
{
struct adb_attach_args *aa_args = (struct adb_attach_args *)aux;
static int aed_matched = 0;
@@ -95,9 +92,7 @@ aedmatch(parent, cf, aux)
}
void
-aedattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+aedattach(struct device *parent, struct device *self, void *aux)
{
struct adb_attach_args *aa_args = (struct adb_attach_args *)aux;
struct aed_softc *sc = (struct aed_softc *)self;
@@ -136,8 +131,7 @@ aedattach(parent, self, aux)
* the handoff function.
*/
void
-aed_input(event)
- adb_event_t *event;
+aed_input(adb_event_t *event)
{
adb_event_t new_event = *event;
@@ -168,8 +162,7 @@ aed_input(event)
* the corresponding mouse button event.
*/
void
-aed_emulate_mouse(event)
- adb_event_t *event;
+aed_emulate_mouse(adb_event_t *event)
{
static int emulmodkey_down = 0;
adb_event_t new_event;
@@ -305,8 +298,7 @@ aed_emulate_mouse(event)
* ticks in the future.
*/
void
-aed_kbdrpt(kstate)
- void *kstate;
+aed_kbdrpt(void *kstate)
{
struct aed_softc *aed_sc = (struct aed_softc *)kstate;
@@ -330,17 +322,16 @@ aed_kbdrpt(kstate)
* appropriate subsystem.
*/
void
-aed_dokeyupdown(event)
- adb_event_t *event;
+aed_dokeyupdown(adb_event_t *event)
{
int kbd_key;
kbd_key = ADBK_KEYVAL(event->u.k.key);
if (ADBK_PRESS(event->u.k.key) && keyboard[kbd_key][0] != 0) {
/* ignore shift & control */
- if (aed_sc->sc_repeating != -1) {
+ if (aed_sc->sc_repeating != -1)
timeout_del(&aed_sc->sc_repeat_ch);
- }
+
aed_sc->sc_rptevent = *event;
aed_sc->sc_repeating = kbd_key;
timeout_add(&aed_sc->sc_repeat_ch, aed_sc->sc_rptdelay);
@@ -359,8 +350,7 @@ aed_dokeyupdown(event)
* and we are not polling.
*/
void
-aed_handoff(event)
- adb_event_t *event;
+aed_handoff(adb_event_t *event)
{
if (aed_sc->sc_open && !adb_polling)
aed_enqevent(event);
@@ -370,8 +360,7 @@ aed_handoff(event)
* Place the event in the event queue and wakeup any waiting processes.
*/
void
-aed_enqevent(event)
- adb_event_t *event;
+aed_enqevent(adb_event_t *event)
{
int s;
@@ -401,10 +390,7 @@ aed_enqevent(event)
}
int
-aedopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+aedopen(dev_t dev, int flag, int mode, struct proc *p)
{
int unit;
int error = 0;
@@ -431,10 +417,7 @@ aedopen(dev, flag, mode, p)
int
-aedclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+aedclose(dev_t dev, int flag, int mode, struct proc *p)
{
int s = spladb();
@@ -447,10 +430,7 @@ aedclose(dev, flag, mode, p)
int
-aedread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
+aedread(dev_t dev, struct uio *uio, int flag)
{
int s, error;
int willfit;
@@ -506,12 +486,7 @@ aedwrite(dev, uio, flag)
int
-aedioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+aedioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
switch (cmd) {
case ADBIOCDEVSINFO:
diff --git a/sys/arch/macppc/dev/akbd.c b/sys/arch/macppc/dev/akbd.c
index f787ee85889..e62ee90b6ac 100644
--- a/sys/arch/macppc/dev/akbd.c
+++ b/sys/arch/macppc/dev/akbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: akbd.c,v 1.14 2002/09/15 09:01:58 deraadt Exp $ */
+/* $OpenBSD: akbd.c,v 1.15 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: akbd.c,v 1.13 2001/01/25 14:08:55 tsubai Exp $ */
/*
@@ -115,10 +115,7 @@ struct wskbd_mapdata akbd_keymapdata = {
static int akbd_is_console;
static int
-akbdmatch(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+akbdmatch(struct device *parent, void *cf, void *aux)
{
struct adb_attach_args *aa_args = aux;
@@ -129,9 +126,7 @@ akbdmatch(parent, cf, aux)
}
static void
-akbdattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+akbdattach(struct device *parent, struct device *self, void *aux)
{
ADBSetInfoBlock adbinfo;
struct akbd_softc *sc = (struct akbd_softc *)self;
@@ -267,10 +262,7 @@ akbdattach(parent, self, aux)
* an ADB event record.
*/
void
-kbd_adbcomplete(buffer, data_area, adb_command)
- caddr_t buffer;
- caddr_t data_area;
- int adb_command;
+kbd_adbcomplete(caddr_t buffer, caddr_t data_area, int adb_command)
{
adb_event_t event;
struct akbd_softc *ksc;
@@ -312,9 +304,7 @@ kbd_adbcomplete(buffer, data_area, adb_command)
* button emulation handler first.
*/
static void
-kbd_processevent(event, ksc)
- adb_event_t *event;
- struct akbd_softc *ksc;
+kbd_processevent(adb_event_t *event, struct akbd_softc *ksc)
{
adb_event_t new_event;
@@ -342,8 +332,7 @@ kbd_processevent(event, ksc)
* Get the actual hardware LED state and convert it to softc format.
*/
static u_char
-getleds(addr)
- int addr;
+getleds(int addr)
{
short cmd;
u_char buffer[9], leds;
@@ -367,9 +356,7 @@ getleds(addr)
* actual keyboard register format
*/
static int
-setleds(ksc, leds)
- struct akbd_softc *ksc;
- u_char leds;
+setleds(struct akbd_softc *ksc, u_char leds)
{
int addr;
short cmd;
@@ -408,8 +395,7 @@ setleds(ksc, leds)
* Toggle all of the LED's on and off, just for show.
*/
static void
-blinkleds(ksc)
- struct akbd_softc *ksc;
+blinkleds(struct akbd_softc *ksc)
{
int addr, i;
u_char blinkleds, origleds;
@@ -434,27 +420,18 @@ blinkleds(ksc)
#endif
int
-akbd_enable(v, on)
- void *v;
- int on;
+akbd_enable(void *v, int on)
{
return 0;
}
void
-akbd_set_leds(v, on)
- void *v;
- int on;
+akbd_set_leds(void *v, int on)
{
}
int
-akbd_ioctl(v, cmd, data, flag, p)
- void *v;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+akbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
{
#ifdef WSDISPLAY_COMPAT_RAWKBD
struct akbd_softc *sc = v;
@@ -501,8 +478,7 @@ akbd_rawrepeat(void *v)
static int polledkey;
int
-akbd_intr(event)
- adb_event_t *event;
+akbd_intr(adb_event_t *event)
{
int key, press, val;
int type;
@@ -601,10 +577,7 @@ akbd_cnattach()
}
void
-akbd_cngetc(v, type, data)
- void *v;
- u_int *type;
- int *data;
+akbd_cngetc(void *v, u_int *type, int *data)
{
int key, press, val;
int s;
@@ -631,8 +604,6 @@ akbd_cngetc(v, type, data)
}
void
-akbd_cnpollc(v, on)
- void *v;
- int on;
+akbd_cnpollc(void *v, int on)
{
}
diff --git a/sys/arch/macppc/dev/ams.c b/sys/arch/macppc/dev/ams.c
index 91e68c53a7d..cd3d18a169e 100644
--- a/sys/arch/macppc/dev/ams.c
+++ b/sys/arch/macppc/dev/ams.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ams.c,v 1.6 2002/09/15 09:01:58 deraadt Exp $ */
+/* $OpenBSD: ams.c,v 1.7 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: ams.c,v 1.11 2000/12/19 03:13:40 tsubai Exp $ */
/*
@@ -81,10 +81,7 @@ const struct wsmouse_accessops ams_accessops = {
};
static int
-amsmatch(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+amsmatch(struct device *parent, void *cf, void *aux)
{
struct adb_attach_args *aa_args = aux;
@@ -95,9 +92,7 @@ amsmatch(parent, cf, aux)
}
static void
-amsattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+amsattach(struct device *parent, struct device *self, void *aux)
{
ADBSetInfoBlock adbinfo;
struct ams_softc *sc = (struct ams_softc *)self;
@@ -210,8 +205,7 @@ amsattach(parent, self, aux)
* Mouse Systems A^3 Mouse, Logitech non-EMP MouseMan
*/
void
-ems_init(sc)
- struct ams_softc *sc;
+ems_init(struct ams_softc *sc)
{
int adbaddr;
short cmd;
@@ -401,10 +395,7 @@ ems_init(sc)
* an ADB event record.
*/
void
-ms_adbcomplete(buffer, data_area, adb_command)
- caddr_t buffer;
- caddr_t data_area;
- int adb_command;
+ms_adbcomplete(caddr_t buffer, caddr_t data_area, int adb_command)
{
adb_event_t event;
struct ams_softc *sc;
@@ -461,9 +452,7 @@ ms_adbcomplete(buffer, data_area, adb_command)
* x- and y-axis motion, and handoff the event to the appropriate subsystem.
*/
static void
-ms_processevent(event, sc)
- adb_event_t *event;
- struct ams_softc *sc;
+ms_processevent(adb_event_t *event, struct ams_softc *sc)
{
adb_event_t new_event;
int i, button_bit, max_byte, mask, buttons;
@@ -530,19 +519,13 @@ ms_processevent(event, sc)
}
int
-ams_enable(v)
- void *v;
+ams_enable(void *v)
{
return 0;
}
int
-ams_ioctl(v, cmd, data, flag, p)
- void *v;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+ams_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
{
switch (cmd) {
case WSMOUSEIO_GTYPE:
@@ -550,12 +533,10 @@ ams_ioctl(v, cmd, data, flag, p)
return (0);
}
-
return -1;
}
void
-ams_disable(v)
- void *v;
+ams_disable(void *v)
{
}
diff --git a/sys/arch/macppc/dev/apm.c b/sys/arch/macppc/dev/apm.c
index 349028810a0..f4f67a929df 100644
--- a/sys/arch/macppc/dev/apm.c
+++ b/sys/arch/macppc/dev/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.7 2002/09/15 09:01:58 deraadt Exp $ */
+/* $OpenBSD: apm.c,v 1.8 2003/10/16 03:31:25 drahn Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
@@ -113,9 +113,7 @@ struct filterops apmread_filtops =
int
-apmmatch(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+apmmatch(struct device *parent, void *match, void *aux)
{
struct adb_attach_args *aa = (void *)aux;
if (aa->origaddr != ADBADDR_APM ||
@@ -130,9 +128,7 @@ apmmatch(parent, match, aux)
}
void
-apmattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+apmattach(struct device *parent, struct device *self, void *aux)
{
struct pmu_battery_info info;
@@ -143,10 +139,7 @@ apmattach(parent, self, aux)
}
int
-apmopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+apmopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct apm_softc *sc;
int error = 0;
@@ -186,10 +179,7 @@ apmopen(dev, flag, mode, p)
}
int
-apmclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
+apmclose(dev_t dev, int flag, int mode, struct proc *p)
{
struct apm_softc *sc;
@@ -212,12 +202,7 @@ apmclose(dev, flag, mode, p)
}
int
-apmioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+apmioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
struct apm_softc *sc;
struct pmu_battery_info batt;
@@ -296,13 +281,12 @@ apmioctl(dev, cmd, data, flag, p)
((batt.cur_charge * 3600) / (-batt.draw)) / 60;
/* XXX - Arbitrary */
- if (power->battery_life > 60) {
+ if (power->battery_life > 60)
power->battery_state = APM_BATT_HIGH;
- } else if (power->battery_life < 10) {
+ else if (power->battery_life < 10)
power->battery_state = APM_BATT_CRITICAL;
- } else {
+ else
power->battery_state = APM_BATT_LOW;
- }
}
break;
@@ -315,8 +299,7 @@ apmioctl(dev, cmd, data, flag, p)
}
void
-filt_apmrdetach(kn)
- struct knote *kn;
+filt_apmrdetach(struct knote *kn)
{
struct apm_softc *sc = (struct apm_softc *)kn->kn_hook;
@@ -324,9 +307,7 @@ filt_apmrdetach(kn)
}
int
-filt_apmread(kn, hint)
- struct knote *kn;
- long hint;
+filt_apmread(struct knote *kn, long hint)
{
/* XXX weird kqueue_scan() semantics */
if (hint && !kn->kn_data)
@@ -336,9 +317,7 @@ filt_apmread(kn, hint)
}
int
-apmkqfilter(dev, kn)
- dev_t dev;
- struct knote *kn;
+apmkqfilter(dev_t dev, struct knote *kn)
{
struct apm_softc *sc;
diff --git a/sys/arch/macppc/dev/awacs.c b/sys/arch/macppc/dev/awacs.c
index 60d860df60e..7b01af735fb 100644
--- a/sys/arch/macppc/dev/awacs.c
+++ b/sys/arch/macppc/dev/awacs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: awacs.c,v 1.15 2003/06/16 03:45:40 jason Exp $ */
+/* $OpenBSD: awacs.c,v 1.16 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: awacs.c,v 1.4 2001/02/26 21:07:51 wiz Exp $ */
/*-
@@ -240,10 +240,7 @@ const struct awacs_speed_tab {
};
int
-awacs_match(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+awacs_match(struct device *parent, void *match, void *aux)
{
struct confargs *ca = aux;
@@ -266,10 +263,7 @@ awacs_match(parent, match, aux)
}
void
-awacs_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+awacs_attach(struct device *parent, struct device *self, void *aux)
{
struct awacs_softc *sc = (struct awacs_softc *)self;
struct confargs *ca = aux;
@@ -304,17 +298,17 @@ awacs_attach(parent, self, aux)
cirq_type = oirq_type = iirq_type = IST_LEVEL;
}
mac_intr_establish(parent, cirq, cirq_type, IPL_AUDIO, awacs_intr,
- sc, "awacs");
+ sc, "awacs");
mac_intr_establish(parent, oirq, oirq_type, IPL_AUDIO, awacs_tx_intr,
- sc, "awacs/tx");
+ sc, "awacs/tx");
mac_intr_establish(parent, iirq, iirq_type, IPL_AUDIO, awacs_rx_intr,
- sc, "awacs/rx");
+ sc, "awacs/rx");
printf(": irq %d,%d,%d",
cirq, oirq, iirq);
sc->sc_soundctl = AWACS_INPUT_SUBFRAME0 | AWACS_OUTPUT_SUBFRAME0 |
- AWACS_RATE_44100 | AWACS_INT_PORTCHG;
+ AWACS_RATE_44100 | AWACS_INT_PORTCHG;
awacs_write_reg(sc, AWACS_SOUND_CTRL, sc->sc_soundctl);
sc->sc_codecctl0 = AWACS_CODEC_ADDR0 | AWACS_CODEC_EMSEL0;
@@ -367,9 +361,7 @@ awacs_attach(parent, self, aux)
}
u_int
-awacs_read_reg(sc, reg)
- struct awacs_softc *sc;
- int reg;
+awacs_read_reg(struct awacs_softc *sc, int reg)
{
char *addr = sc->sc_reg;
@@ -377,9 +369,7 @@ awacs_read_reg(sc, reg)
}
void
-awacs_write_reg(sc, reg, val)
- struct awacs_softc *sc;
- int reg, val;
+awacs_write_reg(struct awacs_softc *sc, int reg, int val)
{
char *addr = sc->sc_reg;
@@ -387,17 +377,14 @@ awacs_write_reg(sc, reg, val)
}
void
-awacs_write_codec(sc, value)
- struct awacs_softc *sc;
- int value;
+awacs_write_codec(struct awacs_softc *sc, int value)
{
awacs_write_reg(sc, AWACS_CODEC_CTRL, value);
while (awacs_read_reg(sc, AWACS_CODEC_CTRL) & AWACS_CODEC_BUSY);
}
int
-awacs_intr(v)
- void *v;
+awacs_intr(void *v)
{
int reason;
struct awacs_softc *sc = v;
@@ -431,8 +418,7 @@ awacs_intr(v)
}
int
-awacs_tx_intr(v)
- void *v;
+awacs_tx_intr(void *v)
{
struct awacs_softc *sc = v;
struct dbdma_command *cmd = sc->sc_odmap;
@@ -460,8 +446,7 @@ awacs_tx_intr(v)
return (1);
}
int
-awacs_rx_intr(v)
- void *v;
+awacs_rx_intr(void *v)
{
struct awacs_softc *sc = v;
struct dbdma_command *cmd = sc->sc_idmap;
@@ -490,9 +475,7 @@ awacs_rx_intr(v)
}
int
-awacs_open(h, flags)
- void *h;
- int flags;
+awacs_open(void *h, int flags)
{
return 0;
}
@@ -501,8 +484,7 @@ awacs_open(h, flags)
* Close function is called at splaudio().
*/
void
-awacs_close(h)
- void *h;
+awacs_close(void *h)
{
struct awacs_softc *sc = h;
@@ -514,9 +496,7 @@ awacs_close(h)
}
int
-awacs_query_encoding(h, ae)
- void *h;
- struct audio_encoding *ae;
+awacs_query_encoding(void *h, struct audio_encoding *ae)
{
switch (ae->index) {
case 0:
@@ -611,10 +591,8 @@ awacs_cvt_ulinear_mono_16_be(void *v, u_char *p, int cc)
}
int
-awacs_set_params(h, setmode, usemode, play, rec)
- void *h;
- int setmode, usemode;
- struct audio_params *play, *rec;
+awacs_set_params(void *h, int setmode, int usemode, struct audio_params *play,
+ struct audio_params *rec)
{
struct awacs_softc *sc = h;
struct audio_params *p;
@@ -723,9 +701,7 @@ awacs_set_params(h, setmode, usemode, play, rec)
}
int
-awacs_round_blocksize(h, size)
- void *h;
- int size;
+awacs_round_blocksize(void *h, int size)
{
if (size < PAGE_SIZE)
size = PAGE_SIZE;
@@ -733,8 +709,7 @@ awacs_round_blocksize(h, size)
}
int
-awacs_halt_output(h)
- void *h;
+awacs_halt_output(void *h)
{
struct awacs_softc *sc = h;
@@ -746,8 +721,7 @@ awacs_halt_output(h)
}
int
-awacs_halt_input(h)
- void *h;
+awacs_halt_input(void *h)
{
struct awacs_softc *sc = h;
@@ -757,9 +731,7 @@ awacs_halt_input(h)
}
int
-awacs_getdev(h, retp)
- void *h;
- struct audio_device *retp;
+awacs_getdev(void *h, struct audio_device *retp)
{
*retp = awacs_device;
return 0;
@@ -779,9 +751,7 @@ enum {
};
int
-awacs_set_port(h, mc)
- void *h;
- mixer_ctrl_t *mc;
+awacs_set_port(void *h, mixer_ctrl_t *mc)
{
struct awacs_softc *sc = h;
int l, r;
@@ -851,9 +821,7 @@ awacs_set_port(h, mc)
}
int
-awacs_get_port(h, mc)
- void *h;
- mixer_ctrl_t *mc;
+awacs_get_port(void *h, mixer_ctrl_t *mc)
{
struct awacs_softc *sc = h;
int vol, l, r;
@@ -907,11 +875,8 @@ awacs_get_port(h, mc)
}
int
-awacs_query_devinfo(h, dip)
- void *h;
- mixer_devinfo_t *dip;
+awacs_query_devinfo(void *h, mixer_devinfo_t *dip)
{
-
DPRINTF("query_devinfo %d\n", dip->index);
switch (dip->index) {
@@ -1005,10 +970,7 @@ awacs_query_devinfo(h, dip)
}
size_t
-awacs_round_buffersize(h, dir, size)
- void *h;
- int dir;
- size_t size;
+awacs_round_buffersize(void *h, int dir, size_t size)
{
size = (size + PGOFSET) & ~(PGOFSET);
if (size > AWACS_DMALIST_MAX * AWACS_DMASEG_MAX)
@@ -1017,10 +979,7 @@ awacs_round_buffersize(h, dir, size)
}
void *
-awacs_allocm(h, dir, size, type, flags)
- void *h;
- int dir, type, flags;
- size_t size;
+awacs_allocm(void *h, int dir, size_t size, int type, int flags)
{
struct awacs_softc *sc = h;
struct awacs_dma *p;
@@ -1084,11 +1043,7 @@ awacs_allocm(h, dir, size, type, flags)
}
paddr_t
-awacs_mappage(h, mem, off, prot)
- void *h;
- void *mem;
- off_t off;
- int prot;
+awacs_mappage(void *h, void *mem, off_t off, int prot)
{
if (off < 0)
return -1;
@@ -1096,20 +1051,14 @@ awacs_mappage(h, mem, off, prot)
}
int
-awacs_get_props(h)
- void *h;
+awacs_get_props(void *h)
{
return AUDIO_PROP_FULLDUPLEX /* | AUDIO_PROP_MMAP */;
}
int
-awacs_trigger_output(h, start, end, bsize, intr, arg, param)
- void *h;
- void *start, *end;
- int bsize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+awacs_trigger_output(void *h, void *start, void *end, int bsize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct awacs_softc *sc = h;
struct awacs_dma *p;
@@ -1149,13 +1098,8 @@ awacs_trigger_output(h, start, end, bsize, intr, arg, param)
}
int
-awacs_trigger_input(h, start, end, bsize, intr, arg, param)
- void *h;
- void *start, *end;
- int bsize;
- void (*intr)(void *);
- void *arg;
- struct audio_params *param;
+awacs_trigger_input(void *h, void *start, void *end, int bsize,
+ void (*intr)(void *), void *arg, struct audio_params *param)
{
struct awacs_softc *sc = h;
struct awacs_dma *p;
@@ -1195,9 +1139,7 @@ awacs_trigger_input(h, start, end, bsize, intr, arg, param)
}
void
-awacs_set_speaker_volume(sc, left, right)
- struct awacs_softc *sc;
- int left, right;
+awacs_set_speaker_volume(struct awacs_softc *sc, int left, int right)
{
int lval = 15 - (left & 0xff) / 16;
int rval = 15 - (right & 0xff) / 16;
@@ -1210,9 +1152,7 @@ awacs_set_speaker_volume(sc, left, right)
}
void
-awacs_set_ext_volume(sc, left, right)
- struct awacs_softc *sc;
- int left, right;
+awacs_set_ext_volume(struct awacs_softc *sc, int left, int right)
{
int lval = 15 - (left & 0xff) / 16;
int rval = 15 - (right & 0xff) / 16;
diff --git a/sys/arch/macppc/dev/dbdma.c b/sys/arch/macppc/dev/dbdma.c
index 9923b2f2cc4..c1142127299 100644
--- a/sys/arch/macppc/dev/dbdma.c
+++ b/sys/arch/macppc/dev/dbdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dbdma.c,v 1.6 2002/09/15 09:01:58 deraadt Exp $ */
+/* $OpenBSD: dbdma.c,v 1.7 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: dbdma.c,v 1.2 1998/08/21 16:13:28 tsubai Exp $ */
/*
@@ -35,9 +35,7 @@
dbdma_command_t *dbdma_alloc_commands = NULL;
void
-dbdma_start(dmap, dt)
- dbdma_regmap_t *dmap;
- dbdma_t dt;
+dbdma_start(dbdma_regmap_t *dmap, dbdma_t dt)
{
u_int32_t addr = dt->d_paddr;
@@ -65,8 +63,7 @@ dbdma_start(dmap, dt)
}
void
-dbdma_stop(dmap)
- dbdma_regmap_t *dmap;
+dbdma_stop(dbdma_regmap_t *dmap)
{
DBDMA_ST4_ENDIAN(&dmap->d_control, DBDMA_CLEAR_CNTRL(DBDMA_CNTRL_RUN) |
DBDMA_SET_CNTRL(DBDMA_CNTRL_FLUSH));
@@ -76,8 +73,7 @@ dbdma_stop(dmap)
}
void
-dbdma_flush(dmap)
- dbdma_regmap_t *dmap;
+dbdma_flush(dbdma_regmap_t *dmap)
{
DBDMA_ST4_ENDIAN(&dmap->d_control, DBDMA_SET_CNTRL(DBDMA_CNTRL_FLUSH));
@@ -86,8 +82,7 @@ dbdma_flush(dmap)
}
void
-dbdma_reset(dmap)
- dbdma_regmap_t *dmap;
+dbdma_reset(dbdma_regmap_t *dmap)
{
DBDMA_ST4_ENDIAN(&dmap->d_control,
DBDMA_CLEAR_CNTRL( (DBDMA_CNTRL_ACTIVE |
@@ -102,8 +97,7 @@ dbdma_reset(dmap)
}
void
-dbdma_continue(dmap)
- dbdma_regmap_t *dmap;
+dbdma_continue(dbdma_regmap_t *dmap)
{
DBDMA_ST4_ENDIAN(&dmap->d_control,
DBDMA_SET_CNTRL(DBDMA_CNTRL_RUN | DBDMA_CNTRL_WAKE) |
@@ -111,8 +105,7 @@ dbdma_continue(dmap)
}
void
-dbdma_pause(dmap)
- dbdma_regmap_t *dmap;
+dbdma_pause(dbdma_regmap_t *dmap)
{
DBDMA_ST4_ENDIAN(&dmap->d_control,DBDMA_SET_CNTRL(DBDMA_CNTRL_PAUSE));
@@ -121,9 +114,7 @@ dbdma_pause(dmap)
}
dbdma_t
-dbdma_alloc(dmat, size)
- bus_dma_tag_t dmat;
- int size;
+dbdma_alloc(bus_dma_tag_t dmat, int size)
{
dbdma_t dt;
int error, nsegs = 0;
diff --git a/sys/arch/macppc/dev/if_bm.c b/sys/arch/macppc/dev/if_bm.c
index abdc5765f01..4bdd439bf11 100644
--- a/sys/arch/macppc/dev/if_bm.c
+++ b/sys/arch/macppc/dev/if_bm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bm.c,v 1.14 2003/07/02 21:30:13 drahn Exp $ */
+/* $OpenBSD: if_bm.c,v 1.15 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: if_bm.c,v 1.1 1999/01/01 01:27:52 tsubai Exp $ */
/*-
@@ -153,43 +153,32 @@ struct cfdriver bm_cd = {
};
int
-bmac_read_reg(sc, off)
- struct bmac_softc *sc;
- int off;
+bmac_read_reg(struct bmac_softc *sc, int off)
{
return in16rb(sc->sc_regs + off);
}
void
-bmac_write_reg(sc, off, val)
- struct bmac_softc *sc;
- int off, val;
+bmac_write_reg(struct bmac_softc *sc, int off, int val)
{
out16rb(sc->sc_regs + off, val);
}
void
-bmac_set_bits(sc, off, val)
- struct bmac_softc *sc;
- int off, val;
+bmac_set_bits(struct bmac_softc *sc, int off, int val)
{
val |= bmac_read_reg(sc, off);
bmac_write_reg(sc, off, val);
}
void
-bmac_reset_bits(sc, off, val)
- struct bmac_softc *sc;
- int off, val;
+bmac_reset_bits(struct bmac_softc *sc, int off, int val)
{
bmac_write_reg(sc, off, bmac_read_reg(sc, off) & ~val);
}
int
-bmac_match(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+bmac_match(struct device *parent, void *cf, void *aux)
{
struct confargs *ca = aux;
@@ -205,9 +194,7 @@ bmac_match(parent, cf, aux)
}
void
-bmac_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+bmac_attach(struct device *parent, struct device *self, void *aux)
{
struct confargs *ca = aux;
struct bmac_softc *sc = (void *)self;
@@ -288,13 +275,13 @@ bmac_attach(parent, self, aux)
ether_sprintf(laddr));
mac_intr_establish(parent, ca->ca_intr[0], IST_LEVEL, IPL_NET,
- bmac_intr, sc, "bmac intr");
+ bmac_intr, sc, "bmac intr");
#ifdef WHY_IS_THIS_XXXX
mac_intr_establish(parent, ca->ca_intr[1], IST_LEVEL, IPL_NET,
- bmac_tx_intr, sc, "bmac_tx");
+ bmac_tx_intr, sc, "bmac_tx");
#endif /* WHY_IS_THIS_XXXX */
mac_intr_establish(parent, ca->ca_intr[2], IST_LEVEL, IPL_NET,
- bmac_rint, sc, "bmac rint");
+ bmac_rint, sc, "bmac rint");
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
ifp->if_softc = sc;
@@ -318,9 +305,8 @@ bmac_attach(parent, self, aux)
if (LIST_FIRST(&mii->mii_phys) == NULL) {
ifmedia_add(&mii->mii_media, IFM_ETHER|IFM_10_T, 0, NULL);
ifmedia_set(&mii->mii_media, IFM_ETHER|IFM_10_T);
- } else {
+ } else
ifmedia_set(&mii->mii_media, IFM_ETHER|IFM_AUTO);
- }
bmac_reset_chip(sc);
@@ -332,8 +318,7 @@ bmac_attach(parent, self, aux)
* Reset and enable bmac by heathrow FCR.
*/
void
-bmac_reset_chip(sc)
- struct bmac_softc *sc;
+bmac_reset_chip(struct bmac_softc *sc)
{
u_int v;
@@ -367,8 +352,7 @@ bmac_reset_chip(sc)
}
void
-bmac_init(sc)
- struct bmac_softc *sc;
+bmac_init(struct bmac_softc *sc)
{
struct ifnet *ifp = &sc->sc_if;
struct ether_header *eh;
@@ -396,9 +380,8 @@ bmac_init(sc)
if (i <= 0)
printf("%s: reset timeout\n", ifp->if_xname);
- if (! (sc->sc_flags & BMAC_BMACPLUS)) {
+ if (! (sc->sc_flags & BMAC_BMACPLUS))
bmac_set_bits(sc, XCVRIF, ClkBit|SerialMode|COLActiveLow);
- }
tb = ppc_mftbl();
bmac_write_reg(sc, RSEED, tb);
@@ -475,8 +458,7 @@ bmac_init(sc)
}
void
-bmac_init_dma(sc)
- struct bmac_softc *sc;
+bmac_init_dma(struct bmac_softc *sc)
{
dbdma_command_t *cmd = sc->sc_rxcmd;
int i;
@@ -504,8 +486,7 @@ bmac_init_dma(sc)
#ifdef WHY_IS_THIS_XXXX
int
-bmac_tx_intr(v)
- void *v;
+bmac_tx_intr(void *v)
{
struct bmac_softc *sc = v;
@@ -536,8 +517,7 @@ bmac_tx_intr(v)
}
#endif /* WHY_IS_THIS_XXXX */
int
-bmac_intr(v)
- void *v;
+bmac_intr(void *v)
{
struct bmac_softc *sc = v;
int stat;
@@ -566,8 +546,7 @@ bmac_intr(v)
}
int
-bmac_rint(v)
- void *v;
+bmac_rint(void *v)
{
struct bmac_softc *sc = v;
struct ifnet *ifp = &sc->sc_if;
@@ -645,8 +624,7 @@ next:
}
void
-bmac_reset(sc)
- struct bmac_softc *sc;
+bmac_reset(struct bmac_softc *sc)
{
int s;
@@ -656,8 +634,7 @@ bmac_reset(sc)
}
void
-bmac_stop(sc)
- struct bmac_softc *sc;
+bmac_stop(struct bmac_softc *sc)
{
struct ifnet *ifp = &sc->sc_if;
int s;
@@ -685,8 +662,7 @@ bmac_stop(sc)
}
void
-bmac_start(ifp)
- struct ifnet *ifp;
+bmac_start(struct ifnet *ifp)
{
struct bmac_softc *sc = ifp->if_softc;
struct mbuf *m;
@@ -723,10 +699,7 @@ bmac_start(ifp)
}
void
-bmac_transmit_packet(sc, pa, len)
- struct bmac_softc *sc;
- paddr_t pa;
- int len;
+bmac_transmit_packet(struct bmac_softc *sc, paddr_t pa, int len)
{
dbdma_command_t *cmd = sc->sc_txcmd;
@@ -740,10 +713,7 @@ bmac_transmit_packet(sc, pa, len)
}
int
-bmac_put(sc, buff, m)
- struct bmac_softc *sc;
- caddr_t buff;
- struct mbuf *m;
+bmac_put(struct bmac_softc *sc, caddr_t buff, struct mbuf *m)
{
struct mbuf *n;
int len, tlen = 0;
@@ -766,10 +736,7 @@ bmac_put(sc, buff, m)
}
struct mbuf *
-bmac_get(sc, pkt, totlen)
- struct bmac_softc *sc;
- caddr_t pkt;
- int totlen;
+bmac_get(struct bmac_softc *sc, caddr_t pkt, int totlen)
{
struct mbuf *m;
struct mbuf *top, **mp;
@@ -817,8 +784,7 @@ bmac_get(sc, pkt, totlen)
}
void
-bmac_watchdog(ifp)
- struct ifnet *ifp;
+bmac_watchdog(struct ifnet *ifp)
{
struct bmac_softc *sc = ifp->if_softc;
@@ -832,10 +798,7 @@ bmac_watchdog(ifp)
}
int
-bmac_ioctl(ifp, cmd, data)
- struct ifnet *ifp;
- u_long cmd;
- caddr_t data;
+bmac_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct bmac_softc *sc = ifp->if_softc;
struct ifaddr *ifa = (struct ifaddr *)data;
@@ -953,8 +916,7 @@ bmac_ioctl(ifp, cmd, data)
}
int
-bmac_mediachange(ifp)
- struct ifnet *ifp;
+bmac_mediachange(struct ifnet *ifp)
{
struct bmac_softc *sc = ifp->if_softc;
@@ -962,9 +924,7 @@ bmac_mediachange(ifp)
}
void
-bmac_mediastatus(ifp, ifmr)
- struct ifnet *ifp;
- struct ifmediareq *ifmr;
+bmac_mediastatus(struct ifnet *ifp, struct ifmediareq *ifmr)
{
struct bmac_softc *sc = ifp->if_softc;
@@ -978,8 +938,7 @@ bmac_mediastatus(ifp, ifmr)
* Set up the logical address filter.
*/
void
-bmac_setladrf(sc)
- struct bmac_softc *sc;
+bmac_setladrf(struct bmac_softc *sc)
{
struct ifnet *ifp = &sc->sc_if;
struct ether_multi *enm;
@@ -1052,24 +1011,19 @@ chipit:
}
int
-bmac_mii_readreg(dev, phy, reg)
- struct device *dev;
- int phy, reg;
+bmac_mii_readreg(struct device *dev, int phy, int reg)
{
return mii_bitbang_readreg(dev, &bmac_mbo, phy, reg);
}
void
-bmac_mii_writereg(dev, phy, reg, val)
- struct device *dev;
- int phy, reg, val;
+bmac_mii_writereg(struct device *dev, int phy, int reg, int val)
{
mii_bitbang_writereg(dev, &bmac_mbo, phy, reg, val);
}
u_int32_t
-bmac_mbo_read(dev)
- struct device *dev;
+bmac_mbo_read(struct device *dev)
{
struct bmac_softc *sc = (void *)dev;
@@ -1077,9 +1031,7 @@ bmac_mbo_read(dev)
}
void
-bmac_mbo_write(dev, val)
- struct device *dev;
- u_int32_t val;
+bmac_mbo_write(struct device *dev, u_int32_t val)
{
struct bmac_softc *sc = (void *)dev;
@@ -1087,8 +1039,7 @@ bmac_mbo_write(dev, val)
}
void
-bmac_mii_statchg(dev)
- struct device *dev;
+bmac_mii_statchg(struct device *dev)
{
struct bmac_softc *sc = (void *)dev;
int x;
@@ -1108,8 +1059,7 @@ bmac_mii_statchg(dev)
}
void
-bmac_mii_tick(v)
- void *v;
+bmac_mii_tick(void *v)
{
struct bmac_softc *sc = v;
int s;
diff --git a/sys/arch/macppc/dev/macintr.c b/sys/arch/macppc/dev/macintr.c
index 7268676fc4d..202e4866775 100644
--- a/sys/arch/macppc/dev/macintr.c
+++ b/sys/arch/macppc/dev/macintr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macintr.c,v 1.18 2003/07/02 21:30:13 drahn Exp $ */
+/* $OpenBSD: macintr.c,v 1.19 2003/10/16 03:31:25 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -108,10 +108,7 @@ struct cfdriver macintr_cd = {
};
int
-macintr_match(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+macintr_match(struct device *parent, void *cf, void *aux)
{
struct confargs *ca = aux;
char type[40];
@@ -121,9 +118,8 @@ macintr_match(parent, cf, aux)
*/
if (strcmp(ca->ca_name, "interrupt-controller") == 0 ) {
OF_getprop(ca->ca_node, "device_type", type, sizeof(type));
- if (strcmp(type, "interrupt-controller") == 0) {
+ if (strcmp(type, "interrupt-controller") == 0)
return 1;
- }
}
/*
@@ -131,9 +127,8 @@ macintr_match(parent, cf, aux)
* faked to allow old firmware which does not have an entry
* to attach to this device.
*/
- if (strcmp(ca->ca_name, "legacy-interrupt-controller") == 0 ) {
+ if (strcmp(ca->ca_name, "legacy-interrupt-controller") == 0 )
return 1;
- }
return 0;
}
@@ -149,9 +144,7 @@ extern intr_disestablish_t *mac_intr_disestablish_func;
void macintr_collect_preconf_intr(void);
void
-macintr_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+macintr_attach(struct device *parent, struct device *self, void *aux)
{
struct confargs *ca = aux;
extern intr_establish_t *intr_establish_func;
@@ -169,12 +162,13 @@ macintr_attach(parent, self, aux)
macintr_collect_preconf_intr();
mac_intr_establish(parent, 0x14, IST_LEVEL, IPL_HIGH,
- macintr_prog_button, (void *)0x14, "prog button");
+ macintr_prog_button, (void *)0x14, "prog button");
ppc_intr_enable(1);
printf("\n");
}
+
void
macintr_collect_preconf_intr()
{
@@ -215,8 +209,7 @@ macintr_prog_button (void *arg)
}
static int
-fakeintr(arg)
- void *arg;
+fakeintr(void *arg)
{
return 0;
@@ -228,14 +221,8 @@ void nameinterrupt( int replace, char *newstr);
* Register an interrupt handler.
*/
void *
-macintr_establish(lcv, irq, type, level, ih_fun, ih_arg, name)
- void * lcv;
- int irq;
- int type;
- int level;
- int (*ih_fun)(void *);
- void *ih_arg;
- char *name;
+macintr_establish(void * lcv, int irq, int type, int level,
+ int (*ih_fun)(void *), void *ih_arg, char *name)
{
struct intrhand **p, *q, *ih;
static struct intrhand fakehand;
@@ -313,9 +300,7 @@ printf("vI %d ", irq);
* Deregister an interrupt handler.
*/
void
-macintr_disestablish(lcp, arg)
- void *lcp;
- void *arg;
+macintr_disestablish(void *lcp, void *arg)
{
struct intrhand *ih = arg;
int irq = ih->ih_irq;
@@ -344,10 +329,8 @@ macintr_disestablish(lcp, arg)
static char *
-intr_typename(type)
- int type;
+intr_typename(int type)
{
-
switch (type) {
case IST_NONE :
return ("none");
@@ -431,8 +414,7 @@ intr_calculatemasks()
}
}
static void
-enable_irq(x)
- int x;
+enable_irq(int x)
{
int state0, state1, v;
int irq;
@@ -443,17 +425,17 @@ enable_irq(x)
while (x) {
v = 31 - cntlzw(x);
irq = m_hwirq[v];
- if (irq < 32) {
+ if (irq < 32)
state0 |= 1 << irq;
- } else {
+ else
state1 |= 1 << (irq - 32);
- }
+
x &= ~(1 << v);
}
- if (heathrow_FCR) {
+ if (heathrow_FCR)
out32rb(INT_ENABLE_REG1, state1);
- }
+
out32rb(INT_ENABLE_REG0, state0);
}
@@ -463,8 +445,7 @@ int m_virq_inited = 0;
* Map 64 irqs into 32 (bits).
*/
static int
-mapirq(irq)
- int irq;
+mapirq(int irq)
{
int v;
int i;
@@ -478,9 +459,8 @@ mapirq(irq)
}
/* irq in table already? */
- if (m_virq[irq] != 0) {
+ if (m_virq[irq] != 0)
return m_virq[irq];
- }
if (irq < 0 || irq >= 64)
panic("invalid irq");
@@ -502,8 +482,7 @@ printf("\nmapirq %x to %x\n", irq, v);
* Count leading zeros.
*/
static __inline int
-cntlzw(x)
- int x;
+cntlzw(int x)
{
int a;
diff --git a/sys/arch/macppc/dev/openpic.c b/sys/arch/macppc/dev/openpic.c
index 13ff3d71442..2ed2a407107 100644
--- a/sys/arch/macppc/dev/openpic.c
+++ b/sys/arch/macppc/dev/openpic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: openpic.c,v 1.22 2003/08/07 16:08:58 drahn Exp $ */
+/* $OpenBSD: openpic.c,v 1.23 2003/10/16 03:31:25 drahn Exp $ */
/*-
* Copyright (c) 1995 Per Fogelstrom
@@ -105,10 +105,7 @@ struct cfdriver openpic_cd = {
};
int
-openpic_match(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+openpic_match(struct device *parent, void *cf, void *aux)
{
char type[40];
struct confargs *ca = aux;
@@ -117,9 +114,8 @@ openpic_match(parent, cf, aux)
if (strcmp(ca->ca_name, "interrupt-controller") == 0 ) {
OF_getprop(ca->ca_node, "device_type", type, sizeof(type));
- if (strcmp(type, "open-pic") == 0) {
+ if (strcmp(type, "open-pic") == 0)
return 1;
- }
}
return 0;
}
@@ -134,9 +130,7 @@ void openpic_intr_disestablish( void *lcp, void *arg);
void openpic_collect_preconf_intr(void);
void
-openpic_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+openpic_attach(struct device *parent, struct device *self, void *aux)
{
struct confargs *ca = aux;
extern intr_establish_t *intr_establish_func;
@@ -189,9 +183,8 @@ openpic_collect_preconf_intr()
}
}
-int
-fakeintr(arg)
- void *arg;
+static int
+fakeintr(void *arg)
{
return 0;
@@ -204,14 +197,8 @@ void nameinterrupt( int replace, char *newstr);
* Register an interrupt handler.
*/
void *
-openpic_intr_establish(lcv, irq, type, level, ih_fun, ih_arg, name)
- void * lcv;
- int irq;
- int type;
- int level;
- int (*ih_fun)(void *);
- void *ih_arg;
- char *name;
+openpic_intr_establish(void *lcv, int irq, int type, int level,
+ int (*ih_fun)(void *), void *ih_arg, char *name)
{
struct intrhand **p, *q, *ih;
static struct intrhand fakehand;
@@ -289,9 +276,7 @@ printf("vI %d ", irq);
* Deregister an interrupt handler.
*/
void
-openpic_intr_disestablish(lcp, arg)
- void *lcp;
- void *arg;
+openpic_intr_disestablish(void *lcp, void *arg)
{
struct intrhand *ih = arg;
int irq = ih->ih_irq;
@@ -320,12 +305,11 @@ openpic_intr_disestablish(lcp, arg)
static char *
-intr_typename(type)
- int type;
+intr_typename(int type)
{
switch (type) {
- case IST_NONE :
+ case IST_NONE:
return ("none");
case IST_PULSE:
return ("pulsed");
@@ -415,27 +399,25 @@ int o_virq_inited = 0;
* Map 64 irqs into 32 (bits).
*/
static int
-mapirq(irq)
- int irq;
+mapirq(int irq)
{
int v;
int i;
if (o_virq_inited == 0) {
o_virq_max = 0;
- for (i = 0; i < ICU_LEN; i++) {
+ for (i = 0; i < ICU_LEN; i++)
o_virq[i] = 0;
- }
o_virq_inited = 1;
}
/* irq in table already? */
- if (o_virq[irq] != 0) {
+ if (o_virq[irq] != 0)
return o_virq[irq];
- }
if (irq < 0 || irq >= ICU_LEN)
panic("invalid irq");
+
o_virq_max++;
v = o_virq_max;
if (v > HWIRQ_MAX)
@@ -454,8 +436,7 @@ printf("\nmapirq %x to %x\n", irq, v);
* Count leading zeros.
*/
static __inline int
-cntlzw(x)
- int x;
+cntlzw(int x)
{
int a;
@@ -522,8 +503,7 @@ openpic_do_pending_int()
}
u_int
-openpic_read(reg)
- int reg;
+openpic_read(int reg)
{
char *addr = (void *)(openpic_base + reg);
@@ -531,9 +511,7 @@ openpic_read(reg)
}
void
-openpic_write(reg, val)
- int reg;
- u_int val;
+openpic_write(int reg, u_int val)
{
char *addr = (void *)(openpic_base + reg);
@@ -541,54 +519,46 @@ openpic_write(reg, val)
}
void
-openpic_enable_irq_mask(irq_mask)
-int irq_mask;
+openpic_enable_irq_mask(int irq_mask)
{
int irq;
for ( irq = 0; irq <= o_virq_max; irq++) {
- if (irq_mask & (1 << irq)) {
+ if (irq_mask & (1 << irq))
openpic_enable_irq(o_hwirq[irq]);
- } else {
+ else
openpic_disable_irq(o_hwirq[irq]);
- }
}
}
void
-openpic_set_enable_irq(irq, type)
- int irq;
- int type;
+openpic_set_enable_irq(int irq, int type)
{
u_int x;
x = openpic_read(OPENPIC_SRC_VECTOR(irq));
x &= ~(OPENPIC_IMASK|OPENPIC_SENSE_LEVEL|OPENPIC_SENSE_EDGE);
- if (type == IST_LEVEL) {
+ if (type == IST_LEVEL)
x |= OPENPIC_SENSE_LEVEL;
- } else {
+ else
x |= OPENPIC_SENSE_EDGE;
- }
openpic_write(OPENPIC_SRC_VECTOR(irq), x);
}
void
-openpic_enable_irq(irq)
- int irq;
+openpic_enable_irq(int irq)
{
u_int x;
x = openpic_read(OPENPIC_SRC_VECTOR(irq));
x &= ~(OPENPIC_IMASK|OPENPIC_SENSE_LEVEL|OPENPIC_SENSE_EDGE);
- if (o_intrtype[o_virq[irq]] == IST_LEVEL) {
+ if (o_intrtype[o_virq[irq]] == IST_LEVEL)
x |= OPENPIC_SENSE_LEVEL;
- } else {
+ else
x |= OPENPIC_SENSE_EDGE;
- }
openpic_write(OPENPIC_SRC_VECTOR(irq), x);
}
void
-openpic_disable_irq(irq)
- int irq;
+openpic_disable_irq(int irq)
{
u_int x;
@@ -598,8 +568,7 @@ openpic_disable_irq(irq)
}
void
-openpic_set_priority(cpu, pri)
- int cpu, pri;
+openpic_set_priority(int cpu, int pri)
{
u_int x;
@@ -610,15 +579,13 @@ openpic_set_priority(cpu, pri)
}
int
-openpic_read_irq(cpu)
- int cpu;
+openpic_read_irq(int cpu)
{
return openpic_read(OPENPIC_IACK(cpu)) & OPENPIC_VECTOR_MASK;
}
void
-openpic_eoi(cpu)
- int cpu;
+openpic_eoi(int cpu)
{
openpic_write(OPENPIC_EOI(cpu), 0);
openpic_read(OPENPIC_EOI(cpu));
diff --git a/sys/arch/macppc/dev/pm_direct.c b/sys/arch/macppc/dev/pm_direct.c
index 7f19c025e3a..e0dcd8df642 100644
--- a/sys/arch/macppc/dev/pm_direct.c
+++ b/sys/arch/macppc/dev/pm_direct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pm_direct.c,v 1.11 2003/07/02 22:03:08 drahn Exp $ */
+/* $OpenBSD: pm_direct.c,v 1.12 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: pm_direct.c,v 1.9 2000/06/08 22:10:46 tsubai Exp $ */
/*
@@ -243,8 +243,7 @@ pm_setup_adb()
* Check the existent ADB devices
*/
void
-pm_check_adb_devices(id)
- int id;
+pm_check_adb_devices(int id)
{
u_short ed = 0x1;
@@ -257,8 +256,7 @@ pm_check_adb_devices(id)
* Wait until PM IC is busy
*/
int
-pm_wait_busy(delay)
- int delay;
+pm_wait_busy(int delay)
{
while (PM_IS_ON) {
#ifdef PM_GRAB_SI
@@ -275,8 +273,7 @@ pm_wait_busy(delay)
* Wait until PM IC is free
*/
int
-pm_wait_free(delay)
- int delay;
+pm_wait_free(int delay)
{
while (PM_IS_OFF) {
#ifdef PM_GRAB_SI
@@ -296,8 +293,7 @@ pm_wait_free(delay)
* Receive data from PM for the PB Duo series and the PB 5XX series
*/
int
-pm_receive_pm2(data)
- u_char *data;
+pm_receive_pm2(u_char *data)
{
int i;
int rval;
@@ -373,8 +369,7 @@ pm_send_pm2(data)
* My PMgrOp routine for the PB Duo series and the PB 5XX series
*/
int
-pm_pmgrop_pm2(pmdata)
- PMData *pmdata;
+pm_pmgrop_pm2(PMData *pmdata)
{
int i;
int s;
@@ -532,8 +527,7 @@ pm_intr_pm2()
* My PMgrOp routine
*/
int
-pmgrop(pmdata)
- PMData *pmdata;
+pmgrop(PMData *pmdata)
{
switch (pmHardware) {
case PM_HW_PB5XX:
@@ -566,11 +560,7 @@ pm_intr()
* Synchronous ADBOp routine for the Power Manager
*/
int
-pm_adb_op(buffer, compRout, data, command)
- u_char *buffer;
- void *compRout;
- void *data;
- int command;
+pm_adb_op(u_char *buffer, void *compRout, void *data, int command)
{
int i;
int s;
@@ -593,19 +583,22 @@ pm_adb_op(buffer, compRout, data, command)
pmdata.s_buf = pmdata.data;
pmdata.r_buf = pmdata.data;
- /* if the command is LISTEN, add number of ADB data to number of PM data */
+ /*
+ * if the command is LISTEN,
+ * add number of ADB data to number of PM data
+ */
if ((command & 0xc) == 0x8) {
if (buffer != (u_char *)0)
pmdata.num_data = buffer[0] + 3;
- } else {
+ } else
pmdata.num_data = 3;
- }
pmdata.data[0] = (u_char)(command & 0xff);
pmdata.data[1] = 0;
- if ((command & 0xc) == 0x8) { /* if the command is LISTEN, copy ADB data to PM buffer */
+ /* if the command is LISTEN, copy ADB data to PM buffer */
+ if ((command & 0xc) == 0x8) {
if ((buffer != (u_char *)0) && (buffer[0] <= 24)) {
- pmdata.data[2] = buffer[0]; /* number of data */
+ pmdata.data[2] = buffer[0]; /* number of data */
for (i = 0; i < buffer[0]; i++)
pmdata.data[3 + i] = buffer[1 + i];
} else
@@ -613,7 +606,7 @@ pm_adb_op(buffer, compRout, data, command)
} else
pmdata.data[2] = 0;
- if ((command & 0xc) != 0xc) { /* if the command is not TALK */
+ if ((command & 0xc) != 0xc) { /* if the command is not TALK */
/* set up stuff for adb_pass_up */
packet.data[0] = 1 + pmdata.data[2];
packet.data[1] = command;
@@ -675,8 +668,7 @@ pm_adb_op(buffer, compRout, data, command)
void
-pm_adb_get_TALK_result(pmdata)
- PMData *pmdata;
+pm_adb_get_TALK_result(PMData *pmdata)
{
int i;
struct adbCommand packet;
@@ -704,8 +696,7 @@ pm_adb_get_TALK_result(pmdata)
void
-pm_adb_get_ADB_data(pmdata)
- PMData *pmdata;
+pm_adb_get_ADB_data(PMData *pmdata)
{
int i;
struct adbCommand packet;
@@ -747,8 +738,7 @@ pm_adb_poweroff()
}
void
-pm_read_date_time(time)
- u_long *time;
+pm_read_date_time(u_long *time)
{
PMData p;
@@ -762,8 +752,7 @@ pm_read_date_time(time)
}
void
-pm_set_date_time(time)
- u_long time;
+pm_set_date_time(u_long time)
{
PMData p;
@@ -789,8 +778,7 @@ pm_read_brightness()
}
void
-pm_set_brightness(val)
- int val;
+pm_set_brightness(int val)
{
PMData p;
@@ -817,8 +805,7 @@ pm_init_brightness()
}
void
-pm_eject_pcmcia(slot)
- int slot;
+pm_eject_pcmcia(int slot)
{
PMData p;
@@ -880,8 +867,7 @@ pm_battery_info(int battery, struct pmu_battery_info *info)
int
-pm_read_nvram(addr)
- int addr;
+pm_read_nvram(int addr)
{
PMData p;
@@ -896,8 +882,7 @@ pm_read_nvram(addr)
}
void
-pm_write_nvram(addr, val)
- int addr, val;
+pm_write_nvram(int addr, int val)
{
PMData p;
diff --git a/sys/arch/macppc/dev/uni_n.c b/sys/arch/macppc/dev/uni_n.c
index 87eb4e7a262..fc9a148844a 100644
--- a/sys/arch/macppc/dev/uni_n.c
+++ b/sys/arch/macppc/dev/uni_n.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uni_n.c,v 1.7 2003/06/03 01:35:30 drahn Exp $ */
+/* $OpenBSD: uni_n.c,v 1.8 2003/10/16 03:31:25 drahn Exp $ */
/*
* Copyright (c) 1998-2001 Dale Rahn.
@@ -54,27 +54,21 @@ struct cfattach memc_ca = {
void *uni_n_config(int handle);
int
-memcmatch(parent, cf, aux)
- struct device *parent;
- void *cf;
- void *aux;
+memcmatch(struct device *parent, void *cf, void *aux)
{
struct confargs *ca = aux;
static int memc_attached = 0;
/* allow only one instance */
if (memc_attached == 0) {
- if (0 == strcmp (ca->ca_name, "memc")) {
+ if (0 == strcmp (ca->ca_name, "memc"))
return 1;
- }
}
return 0;
}
static void
-memcattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+memcattach(struct device *parent, struct device *self, void *aux)
{
struct confargs *ca = aux;
int len;
@@ -82,14 +76,15 @@ memcattach(parent, self, aux)
struct memc_softc *sc = (struct memc_softc *)self;
len = OF_getprop(ca->ca_node, "name", name, sizeof name);
- if (len > 0) {
+ if (len > 0)
name[len] = 0;
- }
- if (strcmp (name, "uni-n")== 0) {
+
+ if (strcmp (name, "uni-n")== 0)
sc->baseaddr = uni_n_config(ca->ca_node);
- }
+
printf (": %s\n", name);
}
+
void *
uni_n_config(int handle)
{
diff --git a/sys/arch/macppc/dev/z8530sc.c b/sys/arch/macppc/dev/z8530sc.c
index 73fc2d36d97..1a5e19f075f 100644
--- a/sys/arch/macppc/dev/z8530sc.c
+++ b/sys/arch/macppc/dev/z8530sc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530sc.c,v 1.2 2003/06/02 23:27:49 millert Exp $ */
+/* $OpenBSD: z8530sc.c,v 1.3 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: z8530sc.c,v 1.4 1996/05/17 19:30:34 gwr Exp $ */
/*
@@ -65,9 +65,7 @@
#include <machine/z8530var.h>
void
-zs_break(cs, set)
- struct zs_chanstate *cs;
- int set;
+zs_break(struct zs_chanstate *cs, int set)
{
if (set) {
@@ -85,8 +83,7 @@ zs_break(cs, set)
* drain on-chip fifo
*/
void
-zs_iflush(cs)
- struct zs_chanstate *cs;
+zs_iflush(struct zs_chanstate *cs)
{
u_char c, rr0, rr1;
int i;
@@ -123,8 +120,7 @@ zs_iflush(cs)
* Call this with interrupts disabled.
*/
void
-zs_loadchannelregs(cs)
- struct zs_chanstate *cs;
+zs_loadchannelregs(struct zs_chanstate *cs)
{
u_char *reg;
@@ -227,8 +223,7 @@ zs_loadchannelregs(cs)
* the order.
*/
int
-zsc_intr_hard(arg)
- void *arg;
+zsc_intr_hard(void *arg)
{
struct zsc_softc *zsc = arg;
struct zs_chanstate *cs;
@@ -278,8 +273,7 @@ zsc_intr_hard(arg)
* ZS software interrupt. Scan all channels for deferred interrupts.
*/
int
-zsc_intr_soft(arg)
- void *arg;
+zsc_intr_soft(void *arg)
{
struct zsc_softc *zsc = arg;
struct zs_chanstate *cs;
@@ -313,33 +307,28 @@ void zsnull_txint(struct zs_chanstate *);
void zsnull_softint(struct zs_chanstate *);
void
-zsnull_rxint(cs)
- struct zs_chanstate *cs;
+zsnull_rxint(struct zs_chanstate *cs)
{
/* Ask for softint() call. */
cs->cs_softreq = 1;
}
void
-zsnull_stint(cs, force)
- struct zs_chanstate *cs;
- int force;
+zsnull_stint(struct zs_chanstate *cs, int force)
{
/* Ask for softint() call. */
cs->cs_softreq = 1;
}
void
-zsnull_txint(cs)
- struct zs_chanstate *cs;
+zsnull_txint(struct zs_chanstate *cs)
{
/* Ask for softint() call. */
cs->cs_softreq = 1;
}
void
-zsnull_softint(cs)
- struct zs_chanstate *cs;
+zsnull_softint(struct zs_chanstate *cs)
{
zs_write_reg(cs, 1, 0);
zs_write_reg(cs, 15, 0);
diff --git a/sys/arch/macppc/dev/z8530tty.c b/sys/arch/macppc/dev/z8530tty.c
index 39c250433d2..288b848540a 100644
--- a/sys/arch/macppc/dev/z8530tty.c
+++ b/sys/arch/macppc/dev/z8530tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530tty.c,v 1.4 2003/10/03 16:44:49 miod Exp $ */
+/* $OpenBSD: z8530tty.c,v 1.5 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */
/*-
@@ -237,9 +237,7 @@ void zstty_diag(void *);
* zstty_match: how is this zs channel configured?
*/
int
-zstty_match(parent, match, aux)
- struct device *parent;
- void *match, *aux;
+zstty_match(struct device *parent, void *match, void *aux)
{
struct cfdata *cf = match;
struct zsc_attach_args *args = aux;
@@ -256,10 +254,7 @@ zstty_match(parent, match, aux)
}
void
-zstty_attach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
-
+zstty_attach(struct device *parent, struct device *self, void *aux)
{
struct zsc_softc *zsc = (void *) parent;
struct zstty_softc *zst = (void *) self;
@@ -289,6 +284,7 @@ zstty_attach(parent, self, aux)
for (maj = 0; maj < nchrdev; maj++)
if (cdevsw[maj].d_open == zsopen)
break;
+
dev = makedev(maj, tty_unit);
if (zst->zst_swflags)
@@ -422,8 +418,7 @@ zstty_attach(parent, self, aux)
* Return pointer to our tty.
*/
struct tty *
-zstty(dev)
- dev_t dev;
+zstty(dev_t dev)
{
struct zstty_softc *zst;
int unit = minor(dev);
@@ -438,8 +433,7 @@ zstty(dev)
void
-zs_shutdown(zst)
- struct zstty_softc *zst;
+zs_shutdown(struct zstty_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
struct tty *tp = zst->zst_tty;
@@ -489,14 +483,10 @@ zs_shutdown(zst)
* Open a zs serial (tty) port.
*/
int
-zsopen(dev, flags, mode, p)
- dev_t dev;
- int flags;
- int mode;
- struct proc *p;
+zsopen(dev_t dev, int flags, int mode, struct proc *p)
{
- register struct tty *tp;
- register struct zs_chanstate *cs;
+ struct tty *tp;
+ struct zs_chanstate *cs;
struct zstty_softc *zst;
int s, s2;
int error, unit;
@@ -634,15 +624,11 @@ bad:
* Close a zs serial port.
*/
int
-zsclose(dev, flags, mode, p)
- dev_t dev;
- int flags;
- int mode;
- struct proc *p;
+zsclose(dev_t dev, int flags, int mode, struct proc *p)
{
struct zstty_softc *zst;
- register struct zs_chanstate *cs;
- register struct tty *tp;
+ struct zs_chanstate *cs;
+ struct tty *tp;
zst = zstty_cd.cd_devs[minor(dev)];
cs = zst->zst_cs;
@@ -671,10 +657,7 @@ zsclose(dev, flags, mode, p)
* Read/write zs serial port.
*/
int
-zsread(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+zsread(dev_t dev, struct uio *uio, int flags)
{
struct zstty_softc *zst;
struct tty *tp;
@@ -686,10 +669,7 @@ zsread(dev, uio, flags)
}
int
-zswrite(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+zswrite(dev_t dev, struct uio *uio, int flags)
{
struct zstty_softc *zst;
struct tty *tp;
@@ -704,12 +684,7 @@ zswrite(dev, uio, flags)
TIOCFLAG_CRTSCTS | TIOCFLAG_MDMBUF )
int
-zsioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
+zsioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
struct zstty_softc *zst;
struct zs_chanstate *cs;
@@ -791,8 +766,7 @@ zsioctl(dev, cmd, data, flag, p)
* Start or restart transmission.
*/
void
-zsstart(tp)
- struct tty *tp;
+zsstart(struct tty *tp)
{
struct zstty_softc *zst;
struct zs_chanstate *cs;
@@ -842,11 +816,9 @@ zsstart(tp)
}
/* Output the first character of the contiguous buffer. */
- {
- zs_write_data(cs, *zst->zst_tba);
- zst->zst_tbc--;
- zst->zst_tba++;
- }
+ zs_write_data(cs, *zst->zst_tba);
+ zst->zst_tbc--;
+ zst->zst_tba++;
out:
splx(s);
}
@@ -855,9 +827,7 @@ out:
* Stop output, e.g., for ^S or output flush.
*/
int
-zsstop(tp, flag)
- struct tty *tp;
- int flag;
+zsstop(struct tty *tp, int flag)
{
struct zstty_softc *zst;
struct zs_chanstate *cs;
@@ -884,9 +854,7 @@ zsstop(tp, flag)
* making sure all the changes could be done.
*/
int
-zsparam(tp, t)
- struct tty *tp;
- struct termios *t;
+zsparam(struct tty *tp, struct termios *t)
{
struct zstty_softc *zst;
struct zs_chanstate *cs;
@@ -1065,8 +1033,7 @@ zsparam(tp, t)
* Must be called at splzs().
*/
void
-zs_maskintr(zst)
- struct zstty_softc *zst;
+zs_maskintr(struct zstty_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
int tmp15;
@@ -1091,9 +1058,7 @@ zs_maskintr(zst)
* in transmission, the change is deferred.
*/
void
-zs_modem(zst, onoff)
- struct zstty_softc *zst;
- int onoff;
+zs_modem(struct zstty_softc *zst, int onoff)
{
struct zs_chanstate *cs = zst->zst_cs;
@@ -1116,10 +1081,7 @@ zs_modem(zst, onoff)
}
void
-tiocm_to_zs(zst, how, ttybits)
- struct zstty_softc *zst;
- u_long how;
- int ttybits;
+tiocm_to_zs(struct zstty_softc *zst, u_long how, int ttybits)
{
struct zs_chanstate *cs = zst->zst_cs;
u_char zsbits;
@@ -1156,8 +1118,7 @@ tiocm_to_zs(zst, how, ttybits)
}
int
-zs_to_tiocm(zst)
- struct zstty_softc *zst;
+zs_to_tiocm(struct zstty_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
u_char zsbits;
@@ -1185,9 +1146,7 @@ zs_to_tiocm(zst)
* be set or cleared according to the "block" arg passed.
*/
int
-zshwiflow(tp, block)
- struct tty *tp;
- int block;
+zshwiflow(struct tty *tp, int block)
{
struct zstty_softc *zst;
struct zs_chanstate *cs;
@@ -1225,8 +1184,7 @@ zshwiflow(tp, block)
* called at splzs
*/
void
-zs_hwiflow(zst)
- struct zstty_softc *zst;
+zs_hwiflow(struct zstty_softc *zst)
{
struct zs_chanstate *cs = zst->zst_cs;
@@ -1257,8 +1215,7 @@ void zstty_stsoft(struct zstty_softc *, struct tty *);
* called at splzs
*/
void
-zstty_rxint(cs)
- struct zs_chanstate *cs;
+zstty_rxint(struct zs_chanstate *cs)
{
struct zstty_softc *zst = cs->cs_private;
u_char *put, *end;
@@ -1333,8 +1290,7 @@ zstty_rxint(cs)
* transmitter ready interrupt. (splzs)
*/
void
-zstty_txint(cs)
- struct zs_chanstate *cs;
+zstty_txint(struct zs_chanstate *cs)
{
struct zstty_softc *zst = cs->cs_private;
@@ -1380,9 +1336,7 @@ zstty_txint(cs)
* status change interrupt. (splzs)
*/
void
-zstty_stint(cs, force)
- struct zs_chanstate *cs;
- int force;
+zstty_stint(struct zs_chanstate *cs, int force)
{
struct zstty_softc *zst = cs->cs_private;
u_char rr0, delta;
@@ -1422,8 +1376,7 @@ zstty_stint(cs, force)
}
void
-zstty_diag(arg)
- void *arg;
+zstty_diag(void *arg)
{
struct zstty_softc *zst = arg;
int overflows, floods;
@@ -1444,9 +1397,7 @@ zstty_diag(arg)
}
void
-zstty_rxsoft(zst, tp)
- struct zstty_softc *zst;
- struct tty *tp;
+zstty_rxsoft(struct zstty_softc *zst, struct tty *tp)
{
struct zs_chanstate *cs = zst->zst_cs;
int (*rint)(int c, struct tty *tp) = linesw[tp->t_line].l_rint;
@@ -1543,11 +1494,8 @@ zstty_rxsoft(zst, tp)
}
void
-zstty_txsoft(zst, tp)
- struct zstty_softc *zst;
- struct tty *tp;
+zstty_txsoft(struct zstty_softc *zst, struct tty *tp)
{
-
CLR(tp->t_state, TS_BUSY);
if (ISSET(tp->t_state, TS_FLUSH))
CLR(tp->t_state, TS_FLUSH);
@@ -1557,9 +1505,7 @@ zstty_txsoft(zst, tp)
}
void
-zstty_stsoft(zst, tp)
- struct zstty_softc *zst;
- struct tty *tp;
+zstty_stsoft(struct zstty_softc *zst, struct tty *tp)
{
struct zs_chanstate *cs = zst->zst_cs;
u_char rr0, delta;
@@ -1602,8 +1548,7 @@ zstty_stsoft(zst, tp)
* EITHER the TS_TBLOCK flag or zst_rx_blocked flag is set.
*/
void
-zstty_softint(cs)
- struct zs_chanstate *cs;
+zstty_softint(struct zs_chanstate *cs)
{
struct zstty_softc *zst = cs->cs_private;
struct tty *tp = zst->zst_tty;
diff --git a/sys/arch/macppc/dev/zs.c b/sys/arch/macppc/dev/zs.c
index b5176c301b6..5db4b06f93b 100644
--- a/sys/arch/macppc/dev/zs.c
+++ b/sys/arch/macppc/dev/zs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zs.c,v 1.9 2002/09/15 09:01:58 deraadt Exp $ */
+/* $OpenBSD: zs.c,v 1.10 2003/10/16 03:31:25 drahn Exp $ */
/* $NetBSD: zs.c,v 1.17 2001/06/19 13:42:15 wiz Exp $ */
/*
@@ -185,10 +185,7 @@ void zscnpollc(dev_t, int);
* Is the zs chip present?
*/
int
-zsc_match(parent, match, aux)
- struct device *parent;
- void *match;
- void *aux;
+zsc_match(struct device *parent, void *match, void *aux)
{
struct confargs *ca = aux;
struct cfdata *cf = match;
@@ -209,10 +206,7 @@ zsc_match(parent, match, aux)
* not set up the keyboard as ttya, etc.
*/
void
-zsc_attach(parent, self, aux)
- struct device *parent;
- struct device *self;
- void *aux;
+zsc_attach(struct device *parent, struct device *self, void *aux)
{
struct zsc_softc *zsc = (void *)self;
struct confargs *ca = aux;
@@ -415,9 +409,7 @@ zsc_attach(parent, self, aux)
}
int
-zsc_print(aux, name)
- void *aux;
- const char *name;
+zsc_print(void *aux, const char *name)
{
struct zsc_attach_args *args = aux;
@@ -431,10 +423,7 @@ zsc_print(aux, name)
}
int
-zsmdioctl(cs, cmd, data)
- struct zs_chanstate *cs;
- u_long cmd;
- caddr_t data;
+zsmdioctl(struct zs_chanstate *cs, u_long cmd, caddr_t data)
{
switch (cmd) {
default:
@@ -444,8 +433,7 @@ zsmdioctl(cs, cmd, data)
}
void
-zsmd_setclock(cs)
- struct zs_chanstate *cs;
+zsmd_setclock(struct zs_chanstate *cs)
{
#ifdef NOTYET
struct xzs_chanstate *xcs = (void *)cs;
@@ -468,11 +456,10 @@ static int zssoftpending;
* so we have to look at all of them on each interrupt.
*/
int
-zshard(arg)
- void *arg;
+zshard(void *arg)
{
- register struct zsc_softc *zsc;
- register int unit, rval;
+ struct zsc_softc *zsc;
+ int unit, rval;
rval = 0;
for (unit = 0; unit < zsc_cd.cd_ndevs; unit++) {
@@ -501,8 +488,8 @@ int
zssoft(arg)
void *arg;
{
- register struct zsc_softc *zsc;
- register int unit;
+ struct zsc_softc *zsc;
+ int unit;
/* This is not the only ISR on this IPL. */
if (zssoftpending == 0)
@@ -867,7 +854,7 @@ zs_write_reg(cs, reg, val)
u_char zs_read_csr(cs)
struct zs_chanstate *cs;
{
- register u_char val;
+ u_char val;
val = in8(cs->cs_reg_csr);
ZS_DELAY();
@@ -888,7 +875,7 @@ void zs_write_csr(cs, val)
u_char zs_read_data(cs)
struct zs_chanstate *cs;
{
- register u_char val;
+ u_char val;
val = in8(cs->cs_reg_data);
ZS_DELAY();
@@ -940,8 +927,8 @@ zs_disable(cs)
cons_decl(zs);
-void zs_putc(register volatile struct zschan *, int);
-int zs_getc(register volatile struct zschan *);
+void zs_putc(volatile struct zschan *, int);
+int zs_getc(volatile struct zschan *);
extern int zsopen( dev_t dev, int flags, int mode, struct proc *p);
static int stdin, stdout;