de-__P, partially ANSIfy

This commit is contained in:
perry 2005-02-03 21:08:57 +00:00
parent 2454da651e
commit 32a519cece
9 changed files with 185 additions and 316 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ahc_isa.c,v 1.25 2004/09/14 20:25:05 drochner Exp $ */
/* $NetBSD: ahc_isa.c,v 1.26 2005/02/03 21:08:57 perry Exp $ */
/*
* Product specific probe and attach routines for:
@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v 1.25 2004/09/14 20:25:05 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v 1.26 2005/02/03 21:08:57 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -166,12 +166,12 @@ __KERNEL_RCSID(0, "$NetBSD: ahc_isa.c,v 1.25 2004/09/14 20:25:05 drochner Exp $"
#define AHC_ISA_PRIMING_VID(index) (AHC_ISA_VID + (index))
#define AHC_ISA_PRIMING_PID(index) (AHC_ISA_PID + (index))
int ahc_isa_idstring __P((bus_space_tag_t, bus_space_handle_t, char *));
int ahc_isa_match __P((struct isa_attach_args *, bus_addr_t));
int ahc_isa_idstring(bus_space_tag_t, bus_space_handle_t, char *);
int ahc_isa_match(struct isa_attach_args *, bus_addr_t);
int ahc_isa_probe __P((struct device *, struct cfdata *, void *));
void ahc_isa_attach __P((struct device *, struct device *, void *));
void aha2840_load_seeprom __P((struct ahc_softc *ahc));
int ahc_isa_probe(struct device *, struct cfdata *, void *);
void ahc_isa_attach(struct device *, struct device *, void *);
void aha2840_load_seeprom(struct ahc_softc *ahc);
static int verify_seeprom_cksum(struct seeprom_config *sc);
CFATTACH_DECL(ahc_isa, sizeof(struct ahc_softc),
@ -195,10 +195,7 @@ static LIST_HEAD(, ahc_isa_slot) ahc_isa_all_slots;
static int ahc_isa_slot_initialized;
int
ahc_isa_idstring(iot, ioh, idstring)
bus_space_tag_t iot;
bus_space_handle_t ioh;
char *idstring;
ahc_isa_idstring(bus_space_tag_t iot, bus_space_handle_t ioh, char *idstring)
{
u_int8_t vid[EISA_NVIDREGS], pid[EISA_NPIDREGS];
int i;
@ -248,9 +245,7 @@ ahc_isa_idstring(iot, ioh, idstring)
}
int
ahc_isa_match(ia, iobase)
struct isa_attach_args *ia;
bus_addr_t iobase;
ahc_isa_match(struct isa_attach_args *ia, bus_addr_t iobase)
{
bus_space_tag_t iot = ia->ia_iot;
bus_space_handle_t ioh;
@ -315,10 +310,7 @@ ahc_isa_match(ia, iobase)
* the actual probe routine to check it out.
*/
int
ahc_isa_probe(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
ahc_isa_probe(struct device *parent, struct cfdata *match, void *aux)
{
struct isa_attach_args *ia = aux;
struct ahc_isa_slot *as;
@ -375,9 +367,7 @@ ahc_isa_probe(parent, match, aux)
}
void
ahc_isa_attach(parent, self, aux)
struct device *parent, *self;
void *aux;
ahc_isa_attach(struct device *parent, struct device *self, void *aux)
{
struct ahc_softc *ahc = (void *)self;
struct isa_attach_args *ia = aux;

View File

@ -1,4 +1,4 @@
/* $NetBSD: clock.c,v 1.84 2004/07/03 18:24:37 yamt Exp $ */
/* $NetBSD: clock.c,v 1.85 2005/02/03 21:08:58 perry Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.84 2004/07/03 18:24:37 yamt Exp $");
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.85 2005/02/03 21:08:58 perry Exp $");
/* #define CLOCKDEBUG */
/* #define CLOCK_PARANOIA */
@ -159,8 +159,8 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.84 2004/07/03 18:24:37 yamt Exp $");
#if (NPCPPI > 0)
#include <dev/isa/pcppivar.h>
int sysbeepmatch __P((struct device *, struct cfdata *, void *));
void sysbeepattach __P((struct device *, struct device *, void *));
int sysbeepmatch(struct device *, struct cfdata *, void *);
void sysbeepattach(struct device *, struct device *, void *);
CFATTACH_DECL(sysbeep, sizeof(struct device),
sysbeepmatch, sysbeepattach, NULL, NULL);
@ -176,36 +176,39 @@ int clock_debug = 0;
#define DPRINTF(arg)
#endif
void spinwait __P((int));
int clockintr __P((void *, struct intrframe));
int gettick __P((void));
void sysbeep __P((int, int));
void rtcinit __P((void));
int rtcget __P((mc_todregs *));
void rtcput __P((mc_todregs *));
int bcdtobin __P((int));
int bintobcd __P((int));
void spinwait(int);
int clockintr(void *, struct intrframe);
int gettick(void);
void sysbeep(int, int);
void rtcinit(void);
int rtcget(mc_todregs *);
void rtcput(mc_todregs *);
int bcdtobin(int);
int bintobcd(int);
static inline int gettick_broken_latch __P((void));
static int cmoscheck(void);
static int cmoscheckps2(void);
static int clock_expandyear(int);
static inline int gettick_broken_latch(void);
__inline u_int mc146818_read __P((void *, u_int));
__inline void mc146818_write __P((void *, u_int, u_int));
__inline u_int mc146818_read(void *, u_int);
__inline void mc146818_write(void *, u_int, u_int);
/* XXX use sc? */
__inline u_int
mc146818_read(sc, reg)
void *sc; /* XXX use it? */
u_int reg;
mc146818_read(void *sc, u_int reg)
{
outb(IO_RTC, reg);
return (inb(IO_RTC+1));
}
/* XXX use sc? */
__inline void
mc146818_write(sc, reg, datum)
void *sc; /* XXX use it? */
u_int reg, datum;
mc146818_write(void *sc, u_int reg, u_int datum)
{
outb(IO_RTC, reg);
@ -226,7 +229,7 @@ static int ticks[6];
*/
int
gettick_broken_latch()
gettick_broken_latch(void)
{
u_long ef;
int v1, v2, v3;
@ -298,7 +301,7 @@ gettick_broken_latch()
/* minimal initialization, enough for delay() */
void
initrtclock()
initrtclock(void)
{
u_long tval;
@ -337,7 +340,7 @@ u_short isa_timer_msb_table[ISA_TIMER_MSB_TABLE_SIZE]; /* timer->usec MSB */
u_short isa_timer_lsb_table[256]; /* timer->usec conversion for LSB */
void
startrtclock()
startrtclock(void)
{
int s;
u_long tval;
@ -458,7 +461,7 @@ clockintr(void *arg, struct intrframe frame)
}
int
gettick()
gettick(void)
{
u_long ef;
u_char lo, hi;
@ -486,8 +489,7 @@ gettick()
* Don't rely on this being particularly accurate.
*/
void
i8254_delay(n)
int n;
i8254_delay(int n)
{
int tick, otick;
static const int delaytab[26] = {
@ -569,18 +571,13 @@ i8254_delay(n)
#if (NPCPPI > 0)
int
sysbeepmatch(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
sysbeepmatch(struct device *parent, struct cfdata *match, void *aux)
{
return (!ppi_attached);
}
void
sysbeepattach(parent, self, aux)
struct device *parent, *self;
void *aux;
sysbeepattach(struct device *parent, struct device *self, void *aux)
{
printf("\n");
@ -590,8 +587,7 @@ sysbeepattach(parent, self, aux)
#endif
void
sysbeep(pitch, period)
int pitch, period;
sysbeep(int pitch, int period)
{
#if (NPCPPI > 0)
if (ppi_attached)
@ -604,7 +600,7 @@ extern int fixtick; /* XXX */
#endif /* NTP */
void
i8254_initclocks()
i8254_initclocks(void)
{
#ifdef NTP
@ -624,7 +620,7 @@ i8254_initclocks()
}
void
rtcinit()
rtcinit(void)
{
static int first_rtcopen_ever = 1;
@ -638,8 +634,7 @@ rtcinit()
}
int
rtcget(regs)
mc_todregs *regs;
rtcget(mc_todregs *regs)
{
rtcinit();
@ -650,8 +645,7 @@ rtcget(regs)
}
void
rtcput(regs)
mc_todregs *regs;
rtcput(mc_todregs *regs)
{
rtcinit();
@ -659,16 +653,14 @@ rtcput(regs)
}
int
bcdtobin(n)
int n;
bcdtobin(int n)
{
return (((n >> 4) & 0x0f) * 10 + (n & 0x0f));
}
int
bintobcd(n)
int n;
bintobcd(int n)
{
return ((u_char)(((n / 10) << 4) & 0xf0) | ((n % 10) & 0x0f));
@ -680,9 +672,8 @@ static int timeset;
* check whether the CMOS layout is "standard"-like (ie, not PS/2-like),
* to be called at splclock()
*/
static int cmoscheck __P((void));
static int
cmoscheck()
cmoscheck(void)
{
int i;
unsigned short cksum = 0;
@ -698,9 +689,8 @@ cmoscheck()
/*
* Check whether the CMOS layout is PS/2 like, to be called at splclock().
*/
static int cmoscheckps2 __P((void));
static int
cmoscheckps2()
cmoscheckps2(void)
{
#if 0
/* Disabled until I find out the CRC checksum algorithm IBM uses */
@ -733,10 +723,8 @@ int rtc_update_century = 0;
* Being here, deal with the CMOS century byte.
*/
static int centb = NVRAM_CENTURY;
static int clock_expandyear __P((int));
static int
clock_expandyear(clockyear)
int clockyear;
clock_expandyear(int clockyear)
{
int s, clockcentury, cmoscentury;
@ -790,8 +778,7 @@ clock_expandyear(clockyear)
* from a filesystem.
*/
void
inittodr(base)
time_t base;
inittodr(time_t base)
{
mc_todregs rtclk;
struct clock_ymdhms dt;
@ -889,7 +876,7 @@ fstime:
* Reset the clock.
*/
void
resettodr()
resettodr(void)
{
mc_todregs rtclk;
struct clock_ymdhms dt;
@ -932,7 +919,6 @@ resettodr()
}
void
setstatclockrate(arg)
int arg;
setstatclockrate(int arg)
{
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: isapnp_machdep.c,v 1.8 2003/02/26 22:23:03 fvdl Exp $ */
/* $NetBSD: isapnp_machdep.c,v 1.9 2005/02/03 21:08:58 perry Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: isapnp_machdep.c,v 1.8 2003/02/26 22:23:03 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: isapnp_machdep.c,v 1.9 2005/02/03 21:08:58 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -70,8 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: isapnp_machdep.c,v 1.8 2003/02/26 22:23:03 fvdl Exp
* Map I/O regions used by PnP
*/
int
isapnp_map(sc)
struct isapnp_softc *sc;
isapnp_map(struct isapnp_softc *sc)
{
#ifdef DIAGNOSTIC
@ -88,8 +87,7 @@ isapnp_map(sc)
* Unmap I/O regions used by PnP
*/
void
isapnp_unmap(sc)
struct isapnp_softc *sc;
isapnp_unmap(struct isapnp_softc *sc)
{
/* Do nothing. */
@ -102,8 +100,7 @@ isapnp_unmap(sc)
* NOTE: assumes the caller has filled in sc->sc_read_port!
*/
int
isapnp_map_readport(sc)
struct isapnp_softc *sc;
isapnp_map_readport(struct isapnp_softc *sc)
{
#ifdef _KERNEL
int error;
@ -134,8 +131,7 @@ isapnp_map_readport(sc)
* Pretend to unmap a previously mapped `read port'.
*/
void
isapnp_unmap_readport(sc)
struct isapnp_softc *sc;
isapnp_unmap_readport(struct isapnp_softc *sc)
{
/* Do nothing */

View File

@ -1,4 +1,4 @@
/* $NetBSD: joy_timer.c,v 1.6 2002/10/01 12:57:12 fvdl Exp $ */
/* $NetBSD: joy_timer.c,v 1.7 2005/02/03 21:08:58 perry Exp $ */
/*
* XXX This _really_ should be rewritten such that it doesn't
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: joy_timer.c,v 1.6 2002/10/01 12:57:12 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: joy_timer.c,v 1.7 2005/02/03 21:08:58 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: joy_timer.c,v 1.6 2002/10/01 12:57:12 fvdl Exp $");
#include <dev/ic/i8253reg.h> /* XXX XXX XXX */
int
joy_get_tick()
joy_get_tick(void)
{
int low, high;
@ -72,7 +72,7 @@ joy_get_tick()
}
int
joy_timer_freq()
joy_timer_freq(void)
{
return (TIMER_FREQ);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lms.c,v 1.45 2004/09/14 20:25:05 drochner Exp $ */
/* $NetBSD: lms.c,v 1.46 2005/02/03 21:08:58 perry Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles M. Hannum.
@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: lms.c,v 1.45 2004/09/14 20:25:05 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: lms.c,v 1.46 2005/02/03 21:08:58 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -59,16 +59,16 @@ struct lms_softc { /* driver status information */
struct device *sc_wsmousedev;
};
int lmsprobe __P((struct device *, struct cfdata *, void *));
void lmsattach __P((struct device *, struct device *, void *));
int lmsintr __P((void *));
int lmsprobe(struct device *, struct cfdata *, void *);
void lmsattach(struct device *, struct device *, void *);
int lmsintr(void *);
CFATTACH_DECL(lms, sizeof(struct lms_softc),
lmsprobe, lmsattach, NULL, NULL);
int lms_enable __P((void *));
int lms_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
void lms_disable __P((void *));
int lms_enable(void *);
int lms_ioctl(void *, u_long, caddr_t, int, struct proc *);
void lms_disable(void *);
const struct wsmouse_accessops lms_accessops = {
lms_enable,
@ -77,10 +77,7 @@ const struct wsmouse_accessops lms_accessops = {
};
int
lmsprobe(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
lmsprobe(struct device *parent, struct cfdata *match, void *aux)
{
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
@ -137,9 +134,7 @@ out:
}
void
lmsattach(parent, self, aux)
struct device *parent, *self;
void *aux;
lmsattach(struct device *parent, struct device *self, void *aux)
{
struct lms_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
@ -175,8 +170,7 @@ lmsattach(parent, self, aux)
}
int
lms_enable(v)
void *v;
lms_enable(void *v)
{
struct lms_softc *sc = v;
@ -193,8 +187,7 @@ lms_enable(v)
}
void
lms_disable(v)
void *v;
lms_disable(void *v)
{
struct lms_softc *sc = v;
@ -205,12 +198,7 @@ lms_disable(v)
}
int
lms_ioctl(v, cmd, data, flag, p)
void *v;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
lms_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
{
#if 0
struct lms_softc *sc = v;
@ -225,8 +213,7 @@ lms_ioctl(v, cmd, data, flag, p)
}
int
lmsintr(arg)
void *arg;
lmsintr(void *arg)
{
struct lms_softc *sc = arg;
bus_space_tag_t iot = sc->sc_iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mms.c,v 1.42 2004/09/14 20:25:05 drochner Exp $ */
/* $NetBSD: mms.c,v 1.43 2005/02/03 21:08:58 perry Exp $ */
/*-
* Copyright (c) 1993, 1994 Charles M. Hannum.
@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mms.c,v 1.42 2004/09/14 20:25:05 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: mms.c,v 1.43 2005/02/03 21:08:58 perry Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -56,16 +56,16 @@ struct mms_softc { /* driver status information */
struct device *sc_wsmousedev;
};
int mmsprobe __P((struct device *, struct cfdata *, void *));
void mmsattach __P((struct device *, struct device *, void *));
int mmsintr __P((void *));
int mmsprobe(struct device *, struct cfdata *, void *);
void mmsattach(struct device *, struct device *, void *);
int mmsintr(void *);
CFATTACH_DECL(mms, sizeof(struct mms_softc),
mmsprobe, mmsattach, NULL, NULL);
int mms_enable __P((void *));
int mms_ioctl __P((void *, u_long, caddr_t, int, struct proc *));
void mms_disable __P((void *));
int mms_enable(void *);
int mms_ioctl(void *, u_long, caddr_t, int, struct proc *);
void mms_disable(void *);
const struct wsmouse_accessops mms_accessops = {
mms_enable,
@ -74,10 +74,7 @@ const struct wsmouse_accessops mms_accessops = {
};
int
mmsprobe(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
mmsprobe(struct device *parent, struct cfdata *match, void *aux)
{
struct isa_attach_args *ia = aux;
bus_space_tag_t iot = ia->ia_iot;
@ -128,9 +125,7 @@ out:
}
void
mmsattach(parent, self, aux)
struct device *parent, *self;
void *aux;
mmsattach(struct device *parent, struct device *self, void *aux)
{
struct mms_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
@ -166,8 +161,7 @@ mmsattach(parent, self, aux)
}
int
mms_enable(v)
void *v;
mms_enable(void *v)
{
struct mms_softc *sc = v;
@ -184,8 +178,7 @@ mms_enable(v)
}
void
mms_disable(v)
void *v;
mms_disable(void *v)
{
struct mms_softc *sc = v;
@ -196,12 +189,7 @@ mms_disable(v)
}
int
mms_ioctl(v, cmd, data, flag, p)
void *v;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
mms_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
{
#if 0
struct mms_softc *sc = v;
@ -216,8 +204,7 @@ mms_ioctl(v, cmd, data, flag, p)
}
int
mmsintr(arg)
void *arg;
mmsintr(void *arg)
{
struct mms_softc *sc = arg;
bus_space_tag_t iot = sc->sc_iot;

View File

@ -1,4 +1,4 @@
/* $NetBSD: npx.c,v 1.106 2004/07/06 01:30:08 mycroft Exp $ */
/* $NetBSD: npx.c,v 1.107 2005/02/03 21:08:58 perry Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.106 2004/07/06 01:30:08 mycroft Exp $");
__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.107 2005/02/03 21:08:58 perry Exp $");
#if 0
#define IPRINTF(x) printf x
@ -292,8 +292,7 @@ npxprobe1(bus_space_tag_t iot, bus_space_handle_t ioh, int irq)
return (rv);
}
void npxinit(ci)
struct cpu_info *ci;
void npxinit(struct cpu_info *ci)
{
lcr0(rcr0() & ~(CR0_EM|CR0_TS));
fninit();

View File

@ -1,4 +1,4 @@
/* $NetBSD: pccons.c,v 1.169 2004/03/13 17:31:34 bjh21 Exp $ */
/* $NetBSD: pccons.c,v 1.170 2005/02/03 21:08:58 perry Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.169 2004/03/13 17:31:34 bjh21 Exp $");
__KERNEL_RCSID(0, "$NetBSD: pccons.c,v 1.170 2005/02/03 21:08:58 perry Exp $");
#include "opt_ddb.h"
#include "opt_xserver.h"
@ -202,10 +202,10 @@ struct pc_softc {
static struct callout async_update_ch = CALLOUT_INITIALIZER;
int pcprobe __P((struct device *, struct cfdata *, void *));
void pcattach __P((struct device *, struct device *, void *));
int pcintr __P((void *));
void pcinit __P((void));
int pcprobe(struct device *, struct cfdata *, void *);
void pcattach(struct device *, struct device *, void *);
int pcintr(void *);
void pcinit(void);
CFATTACH_DECL(pc, sizeof(struct pc_softc),
pcprobe, pcattach, NULL, NULL);
@ -217,9 +217,9 @@ struct pcconskbd_softc {
struct device sc_dev;
};
int pcconskbdprobe __P((struct device *, struct cfdata *, void *));
void pcconskbdattach __P((struct device *, struct device *, void *));
void pcinput __P((void *, int));
int pcconskbdprobe(struct device *, struct cfdata *, void *);
void pcconskbdattach(struct device *, struct device *, void *);
void pcinput(void *, int);
CFATTACH_DECL(pcconskbd, sizeof(struct pcconskbd_softc), pcconskbdprobe,
pcconskbdattach, NULL, NULL);
@ -267,48 +267,48 @@ const struct cdevsw pc_cdevsw = {
static unsigned int addr_6845 = MONO_BASE;
#if (NPCCONSKBD == 0)
char *sget __P((void));
char *sget(void);
#endif
char *strans __P((u_char));
void sput __P((u_char *, int));
char *strans(u_char);
void sput(u_char *, int);
#ifdef XSERVER
void pc_xmode_on __P((void));
void pc_xmode_off __P((void));
void pc_xmode_on(void);
void pc_xmode_off(void);
#endif
void pcstart __P((struct tty *));
int pcparam __P((struct tty *, struct termios *));
void pcstart(struct tty *);
int pcparam(struct tty *, struct termios *);
#if (NPCCONSKBD == 0)
int kbd_cmd __P((u_char, u_char));
int kbd_cmd(u_char, u_char);
#endif
void set_cursor_shape __P((void));
void set_cursor_shape(void);
#ifdef XSERVER
#ifdef XFREE86_BUG_COMPAT
void get_cursor_shape __P((void));
void get_cursor_shape(void);
#endif
#endif
void do_async_update __P((void *));
void async_update __P((void));
void do_async_update(void *);
void async_update(void);
#if (NPCCONSKBD > 0)
void update_leds __P((void));
void update_leds(void);
#else
#define update_leds async_update
#endif
#if (NPCCONSKBD == 0)
static __inline int kbd_wait_output __P((void));
static __inline int kbd_wait_input __P((void));
static __inline void kbd_flush_input __P((void));
static u_char kbc_get8042cmd __P((void));
static int kbc_put8042cmd __P((u_char));
static __inline int kbd_wait_output(void);
static __inline int kbd_wait_input(void);
static __inline void kbd_flush_input(void);
static u_char kbc_get8042cmd(void);
static int kbc_put8042cmd(u_char);
#endif
void pccnprobe __P((struct consdev *));
void pccninit __P((struct consdev *));
void pccnputc __P((dev_t, int));
int pccngetc __P((dev_t));
void pccnpollc __P((dev_t, int));
void pccnprobe(struct consdev *);
void pccninit(struct consdev *);
void pccnputc(dev_t, int);
int pccngetc(dev_t);
void pccnpollc(dev_t, int);
#if (NPCCONSKBD == 0)
@ -321,7 +321,7 @@ void pccnpollc __P((dev_t, int));
{ u_char x = inb(0x84); (void) x; }
static __inline int
kbd_wait_output()
kbd_wait_output(void)
{
u_int i;
@ -334,7 +334,7 @@ kbd_wait_output()
}
static __inline int
kbd_wait_input()
kbd_wait_input(void)
{
u_int i;
@ -347,7 +347,7 @@ kbd_wait_input()
}
static __inline void
kbd_flush_input()
kbd_flush_input(void)
{
u_int i;
@ -364,7 +364,7 @@ kbd_flush_input()
* Get the current command byte.
*/
static u_char
kbc_get8042cmd()
kbc_get8042cmd(void)
{
if (!kbd_wait_output())
@ -380,8 +380,7 @@ kbc_get8042cmd()
* Pass command byte to keyboard controller (8042).
*/
static int
kbc_put8042cmd(val)
u_char val;
kbc_put8042cmd(u_char val)
{
if (!kbd_wait_output())
@ -397,9 +396,7 @@ kbc_put8042cmd(val)
* Pass command to keyboard itself
*/
int
kbd_cmd(val, polling)
u_char val;
u_char polling;
kbd_cmd(u_char val, u_char polling)
{
u_int retries = 3;
register u_int i;
@ -446,7 +443,7 @@ kbd_cmd(val, polling)
#endif /* NPCCONSKBD == 0 */
void
set_cursor_shape()
set_cursor_shape(void)
{
register int iobase = addr_6845;
@ -460,7 +457,7 @@ set_cursor_shape()
#ifdef XSERVER
#ifdef XFREE86_BUG_COMPAT
void
get_cursor_shape()
get_cursor_shape(void)
{
register int iobase = addr_6845;
@ -485,8 +482,7 @@ get_cursor_shape()
#endif /* XSERVER */
void
do_async_update(v)
void *v;
do_async_update(void *v)
{
#if (NPCCONSKBD == 0)
u_char poll = v ? 1 : 0;
@ -540,7 +536,7 @@ do_async_update(v)
}
void
async_update()
async_update(void)
{
if (kernel || polling) {
@ -571,10 +567,7 @@ void update_leds()
* these are both bad jokes
*/
int
pcprobe(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
pcprobe(struct device *parent, struct cfdata *match, void *aux)
{
struct isa_attach_args *ia = aux;
#if (NPCCONSKBD == 0)
@ -746,9 +739,7 @@ lose:
}
void
pcattach(parent, self, aux)
struct device *parent, *self;
void *aux;
pcattach(struct device *parent, struct device *self, void *aux)
{
struct pc_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
@ -793,10 +784,7 @@ pcattach(parent, self, aux)
#if (NPCCONSKBD > 0)
int
pcconskbdprobe(parent, match, aux)
struct device *parent;
struct cfdata *match;
void *aux;
pcconskbdprobe(struct device *parent, struct cfdata *match, void *aux)
{
struct pckbport_attach_args *pka = aux;
@ -806,9 +794,7 @@ pcconskbdprobe(parent, match, aux)
}
void
pcconskbdattach(parent, self, aux)
struct device *parent, *self;
void *aux;
pcconskbdattach(struct device *parent, struct device *self, void *aux)
{
struct pckbport_attach_args *pka = aux;
@ -820,9 +806,7 @@ pcconskbdattach(parent, self, aux)
}
int
pcconskbd_cnattach(tag, slot)
pckbport_tag_t tag;
pckbport_slot_t slot;
pcconskbd_cnattach(pckbport_tag_t tag, pckbport_slot_t slot)
{
kbctag = tag;
kbcslot = slot;
@ -832,10 +816,7 @@ pcconskbd_cnattach(tag, slot)
#endif
int
pcopen(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
pcopen(dev_t dev, int flag, int mode, struct proc *p)
{
struct pc_softc *sc;
int unit = PCUNIT(dev);
@ -873,10 +854,7 @@ pcopen(dev, flag, mode, p)
}
int
pcclose(dev, flag, mode, p)
dev_t dev;
int flag, mode;
struct proc *p;
pcclose(dev_t dev, int flag, int mode, struct proc *p)
{
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -892,10 +870,7 @@ pcclose(dev, flag, mode, p)
}
int
pcread(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
pcread(dev_t dev, struct uio *uio, int flag)
{
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -904,10 +879,7 @@ pcread(dev, uio, flag)
}
int
pcwrite(dev, uio, flag)
dev_t dev;
struct uio *uio;
int flag;
pcwrite(dev_t dev, struct uio *uio, int flag)
{
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -916,10 +888,7 @@ pcwrite(dev, uio, flag)
}
int
pcpoll(dev, events, p)
dev_t dev;
int events;
struct proc *p;
pcpoll(dev_t dev, int events, struct proc *p)
{
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -928,8 +897,7 @@ pcpoll(dev, events, p)
}
struct tty *
pctty(dev)
dev_t dev;
pctty(dev_t dev)
{
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -944,9 +912,7 @@ pctty(dev)
*/
#if (NPCCONSKBD > 0)
void
pcinput(arg, data)
void *arg;
int data;
pcinput(void *arg, int data)
{
struct pc_softc *sc = arg;
register struct tty *tp = sc->sc_tty;
@ -963,8 +929,7 @@ pcinput(arg, data)
}
#else
int
pcintr(arg)
void *arg;
pcintr(void *arg)
{
struct pc_softc *sc = arg;
register struct tty *tp = sc->sc_tty;
@ -991,12 +956,7 @@ pcintr(arg)
#endif
int
pcioctl(dev, cmd, data, flag, p)
dev_t dev;
u_long cmd;
caddr_t data;
int flag;
struct proc *p;
pcioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
{
struct pc_softc *sc = pc_cd.cd_devs[PCUNIT(dev)];
struct tty *tp = sc->sc_tty;
@ -1071,8 +1031,7 @@ pcioctl(dev, cmd, data, flag, p)
}
void
pcstart(tp)
struct tty *tp;
pcstart(struct tty *tp)
{
struct clist *cl;
int s, len;
@ -1112,9 +1071,7 @@ out:
}
void
pcstop(tp, flag)
struct tty *tp;
int flag;
pcstop(struct tty *tp, int flag)
{
lock_state |= SCROLL;
@ -1122,7 +1079,7 @@ pcstop(tp, flag)
}
int
pccnattach()
pccnattach(void)
{
static struct consdev pccons = {
NULL, NULL, pccngetc, pccnputc, pccnpollc, NULL, NULL,
@ -1138,9 +1095,7 @@ pccnattach()
/* ARGSUSED */
void
pccnputc(dev, c)
dev_t dev;
int c;
pccnputc(dev_t dev, int c)
{
u_char oldkernel = kernel;
char help = c;
@ -1160,8 +1115,7 @@ pccnputc(dev, c)
*/
/* ARGSUSED */
int
pccngetc(dev)
dev_t dev;
pccngetc(dev_t dev)
{
register char *cp;
@ -1201,9 +1155,7 @@ pccngetc(dev)
}
void
pccnpollc(dev, on)
dev_t dev;
int on;
pccnpollc(dev_t dev, int on)
{
polling = on;
@ -1240,9 +1192,7 @@ pccnpollc(dev, on)
* Set line parameters.
*/
int
pcparam(tp, t)
struct tty *tp;
struct termios *t;
pcparam(struct tty *tp, struct termios *t)
{
tp->t_ispeed = t->c_ispeed;
@ -1266,7 +1216,7 @@ pcparam(tp, t)
#endif
void
pcinit()
pcinit(void)
{
u_short volatile *cp;
u_short was;
@ -1355,9 +1305,7 @@ static u_char iso2ibm437[] =
* `pc3' termcap emulation.
*/
void
sput(cp, n)
u_char *cp;
int n;
sput(u_char *cp, int n)
{
u_char c, scroll = 0;
@ -2454,7 +2402,7 @@ static Scan_def scan_codes[] = {
#if (NPCCONSKBD == 0)
char *
sget()
sget(void)
{
u_char dt, *capchar;
@ -2486,8 +2434,7 @@ loop:
* Get characters from the keyboard. If none are present, return NULL.
*/
char *
strans(dt)
u_char dt;
strans(u_char dt)
{
static u_char extended = 0, shift_state = 0;
static u_char capchar[2];
@ -2706,10 +2653,7 @@ strans(dt)
}
paddr_t
pcmmap(dev, offset, nprot)
dev_t dev;
off_t offset;
int nprot;
pcmmap(dev_t dev, off_t offset, int nprot)
{
if (offset > 0x20000)
@ -2719,7 +2663,7 @@ pcmmap(dev, offset, nprot)
#ifdef XSERVER
void
pc_xmode_on()
pc_xmode_on(void)
{
#ifdef COMPAT_10
struct trapframe *fp;
@ -2743,7 +2687,7 @@ pc_xmode_on()
}
void
pc_xmode_off()
pc_xmode_off(void)
{
struct trapframe *fp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mca_machdep.c,v 1.23 2004/08/30 15:05:17 drochner Exp $ */
/* $NetBSD: mca_machdep.c,v 1.24 2005/02/03 21:17:01 perry Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.23 2004/08/30 15:05:17 drochner Exp $");
__KERNEL_RCSID(0, "$NetBSD: mca_machdep.c,v 1.24 2005/02/03 21:17:01 perry Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -97,8 +97,8 @@ struct x86_isa_dma_cookie {
};
#ifdef UNUSED
static void _mca_bus_dmamap_sync __P((bus_dma_tag_t, bus_dmamap_t,
bus_addr_t, bus_size_t, int));
static void _mca_bus_dmamap_sync(bus_dma_tag_t, bus_dmamap_t,
bus_addr_t, bus_size_t, int);
#endif
/*
@ -161,9 +161,8 @@ static bus_space_handle_t dmaiot, dmacmdh, dmaexech;
* Map the MCA DMA controller registers.
*/
void
mca_attach_hook(parent, self, mba)
struct device *parent, *self;
struct mcabus_attach_args *mba;
mca_attach_hook(struct device *parent, struct device *self,
struct mcabus_attach_args *mba)
{
dmaiot = mba->mba_iot;
@ -177,9 +176,7 @@ mca_attach_hook(parent, self, mba)
*/
int
mca_conf_read(mc, slot, reg)
mca_chipset_tag_t mc;
int slot, reg;
mca_conf_read(mca_chipset_tag_t mc, int slot, int reg)
{
int data;
@ -197,9 +194,7 @@ mca_conf_read(mc, slot, reg)
*/
void
mca_conf_write(mc, slot, reg, data)
mca_chipset_tag_t mc;
int slot, reg, data;
mca_conf_write(mca_chipset_tag_t mc, int slot, int reg, int data)
{
slot&=7; /* slot must be in range 0-7 */
outb(MCA_MB_SETUP_REG, 0xff); /* ensure m/board setup is disabled */
@ -223,11 +218,8 @@ mca_intr_establish(mca_chipset_tag_t mc, mca_intr_handle_t ih)
#endif
void *
mca_intr_establish(mc, ih, level, func, arg)
mca_chipset_tag_t mc;
mca_intr_handle_t ih;
int level, (*func) __P((void *));
void *arg;
mca_intr_establish(mca_chipset_tag_t mc, mca_intr_handle_t ih,
int level, int (*func)(void *), void *arg)
{
if (ih == 0 || ih >= NUM_LEGACY_IRQS || ih == 2)
panic("mca_intr_establish: bogus handle 0x%x", ih);
@ -237,9 +229,7 @@ mca_intr_establish(mc, ih, level, func, arg)
}
void
mca_intr_disestablish(mc, cookie)
mca_chipset_tag_t mc;
void *cookie;
mca_intr_disestablish(mca_chipset_tag_t mc, void *cookie)
{
isa_intr_disestablish(NULL, cookie);
}
@ -250,7 +240,7 @@ mca_intr_disestablish(mc, cookie)
* return true to panic system, false to ignore.
*/
int
mca_nmi()
mca_nmi(void)
{
/*
* PS/2 MCA devices can generate NMIs - we can find out which
@ -302,7 +292,7 @@ mca_nmi()
* first feature byte.
*/
void
mca_busprobe()
mca_busprobe(void)
{
struct bioscallregs regs;
struct bios_config *scp;
@ -385,12 +375,8 @@ mca_disk_unbusy(void)
* Synchronize a MCA DMA map.
*/
static void
_mca_bus_dmamap_sync(t, map, offset, len, ops)
bus_dma_tag_t t;
bus_dmamap_t map;
bus_addr_t offset;
bus_size_t len;
int ops;
_mca_bus_dmamap_sync(bus_dma_tag_t t, bus_dmamap_t map, bus_addr_t offset,
bus_size_t len, int ops)
{
struct x86_isa_dma_cookie *cookie;
bus_addr_t phys;
@ -473,12 +459,8 @@ _mca_bus_dmamap_sync(t, map, offset, len, ops)
* Allocate a DMA map, and set up DMA channel.
*/
int
mca_dmamap_create(t, size, flags, dmamp, dmach)
bus_dma_tag_t t;
bus_size_t size;
int flags;
bus_dmamap_t *dmamp;
int dmach;
mca_dmamap_create(bus_dma_tag_t t, bus_size_t size, int flags,
bus_dmamap_t *dmamp, int dmach)
{
int error;
struct x86_isa_dma_cookie *cookie;
@ -539,9 +521,7 @@ mca_dmamap_create(t, size, flags, dmamp, dmach)
* so that it's available for one-shot setup.
*/
void
mca_dma_set_ioport(dma, port)
int dma;
u_int16_t port;
mca_dma_set_ioport(int dma, u_int16_t port)
{
/* Disable access to dma channel. */
bus_space_write_1(dmaiot, dmacmdh, 0, DMACMD_MASK | dma);