Deal with -Wstrict-prototypes -Wmissing-prototypes
This commit is contained in:
parent
6944ee458a
commit
bd338a518c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: prom.h,v 1.4 2000/09/19 07:50:50 wdk Exp $ */
|
||||
/* $NetBSD: prom.h,v 1.5 2000/12/03 04:51:04 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -318,4 +318,9 @@ extern void prom_init __P((void));
|
|||
#define MIPS_PROM_NVGET MIPS_PROM_ENTRY(53)
|
||||
#define MIPS_PROM_NVSET MIPS_PROM_ENTRY(54)
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern void prom_init (void);
|
||||
extern int prom_getconsole (void);
|
||||
#endif
|
||||
|
||||
#endif /* ! _MIPSCO_PROM_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mips_3x30.c,v 1.3 2000/08/16 21:00:41 wdk Exp $ */
|
||||
/* $NetBSD: mips_3x30.c,v 1.4 2000/12/03 04:51:04 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -49,16 +49,17 @@
|
|||
#include <machine/mainboard.h>
|
||||
#include <machine/sysconf.h>
|
||||
|
||||
extern void MachFPInterrupt __P((u_int, u_int, u_int, struct frame *));
|
||||
extern void MachFPInterrupt (u_int, u_int, u_int, struct frame *);
|
||||
|
||||
/* Local functions */
|
||||
void pizazz_intr __P((u_int, u_int, u_int, u_int));
|
||||
int pizazz_level0_intr __P((void *));
|
||||
void pizazz_level5_intr __P((int, int, int));
|
||||
void pizazz_intr_establish __P((int, int (*)(void *), void *));
|
||||
void pizazz_init (void);
|
||||
void pizazz_intr (u_int, u_int, u_int, u_int);
|
||||
int pizazz_level0_intr (void *);
|
||||
void pizazz_level5_intr (int, int, int);
|
||||
void pizazz_intr_establish (int, int (*)(void *), void *);
|
||||
|
||||
void
|
||||
pizazz_init()
|
||||
pizazz_init(void)
|
||||
{
|
||||
platform.iobus = "obio";
|
||||
platform.cons_init = NULL;
|
||||
|
@ -87,7 +88,7 @@ pizazz_intr(status, cause, pc, ipending)
|
|||
{
|
||||
/* handle clock interrupts ASAP */
|
||||
if (ipending & MIPS_INT_MASK_2) { /* Timer Interrupt */
|
||||
void rambo_clkintr __P((struct clockframe *));
|
||||
void rambo_clkintr (struct clockframe *);
|
||||
struct clockframe cf;
|
||||
|
||||
cf.pc = pc;
|
||||
|
@ -169,7 +170,7 @@ pizazz_level5_intr(pc, cause, status)
|
|||
void
|
||||
pizazz_intr_establish(level, func, arg)
|
||||
int level;
|
||||
int (*func) __P((void *));
|
||||
int (*func) (void *);
|
||||
void *arg;
|
||||
{
|
||||
if (level < 0 || level >= MAX_INTR_COOKIES)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: prom.c,v 1.2 2000/09/04 22:23:35 wdk Exp $ */
|
||||
/* $NetBSD: prom.c,v 1.3 2000/12/03 04:51:04 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -47,10 +47,10 @@ static struct mips_prom callvec;
|
|||
|
||||
struct mips_prom *callv;
|
||||
|
||||
typedef void (*funcp_t)();
|
||||
typedef void (*funcp_t)(void);
|
||||
|
||||
void
|
||||
prom_init()
|
||||
prom_init(void)
|
||||
{
|
||||
int i;
|
||||
funcp_t *fp;
|
||||
|
@ -67,7 +67,7 @@ prom_init()
|
|||
* port will be used for the console.
|
||||
*/
|
||||
int
|
||||
prom_getconsole()
|
||||
prom_getconsole(void)
|
||||
{
|
||||
char *cp;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asc.c,v 1.5 2000/09/04 22:28:53 wdk Exp $ */
|
||||
/* $NetBSD: asc.c,v 1.6 2000/12/03 04:51:05 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -80,8 +80,8 @@ struct asc_softc {
|
|||
int dm_curseg;
|
||||
};
|
||||
|
||||
static int ascmatch __P((struct device *, struct cfdata *, void *));
|
||||
static void ascattach __P((struct device *, struct device *, void *));
|
||||
static int ascmatch (struct device *, struct cfdata *, void *);
|
||||
static void ascattach (struct device *, struct device *, void *);
|
||||
|
||||
struct cfattach asc_ca = {
|
||||
sizeof(struct asc_softc), ascmatch, ascattach
|
||||
|
@ -90,16 +90,16 @@ struct cfattach asc_ca = {
|
|||
/*
|
||||
* Functions and the switch for the MI code.
|
||||
*/
|
||||
static u_char asc_read_reg __P((struct ncr53c9x_softc *, int));
|
||||
static void asc_write_reg __P((struct ncr53c9x_softc *, int, u_char));
|
||||
static int asc_dma_isintr __P((struct ncr53c9x_softc *));
|
||||
static void asc_dma_reset __P((struct ncr53c9x_softc *));
|
||||
static int asc_dma_intr __P((struct ncr53c9x_softc *));
|
||||
static int asc_dma_setup __P((struct ncr53c9x_softc *, caddr_t *,
|
||||
size_t *, int, size_t *));
|
||||
static void asc_dma_go __P((struct ncr53c9x_softc *));
|
||||
static void asc_dma_stop __P((struct ncr53c9x_softc *));
|
||||
static int asc_dma_isactive __P((struct ncr53c9x_softc *));
|
||||
static u_char asc_read_reg (struct ncr53c9x_softc *, int);
|
||||
static void asc_write_reg (struct ncr53c9x_softc *, int, u_char);
|
||||
static int asc_dma_isintr (struct ncr53c9x_softc *);
|
||||
static void asc_dma_reset (struct ncr53c9x_softc *);
|
||||
static int asc_dma_intr (struct ncr53c9x_softc *);
|
||||
static int asc_dma_setup (struct ncr53c9x_softc *, caddr_t *,
|
||||
size_t *, int, size_t *);
|
||||
static void asc_dma_go (struct ncr53c9x_softc *);
|
||||
static void asc_dma_stop (struct ncr53c9x_softc *);
|
||||
static int asc_dma_isactive (struct ncr53c9x_softc *);
|
||||
|
||||
static struct ncr53c9x_glue asc_glue = {
|
||||
asc_read_reg,
|
||||
|
@ -114,25 +114,20 @@ static struct ncr53c9x_glue asc_glue = {
|
|||
NULL, /* gl_clear_latched_intr */
|
||||
};
|
||||
|
||||
static int asc_intr __P((void *));
|
||||
static int asc_intr (void *);
|
||||
|
||||
#define MAX_SCSI_XFER (64*1024)
|
||||
#define MAX_DMA_SZ MAX_SCSI_XFER
|
||||
#define DMA_SEGS (MAX_DMA_SZ/NBPG)
|
||||
|
||||
static int
|
||||
ascmatch(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
ascmatch(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void
|
||||
ascattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
ascattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct confargs *ca = aux;
|
||||
struct asc_softc *esc = (void *)self;
|
||||
|
@ -210,30 +205,24 @@ ascattach(parent, self, aux)
|
|||
* Glue functions.
|
||||
*/
|
||||
|
||||
u_char
|
||||
asc_read_reg(sc, reg)
|
||||
struct ncr53c9x_softc *sc;
|
||||
int reg;
|
||||
static u_char
|
||||
asc_read_reg(struct ncr53c9x_softc *sc, int reg)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
|
||||
return bus_space_read_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3);
|
||||
}
|
||||
|
||||
void
|
||||
asc_write_reg(sc, reg, val)
|
||||
struct ncr53c9x_softc *sc;
|
||||
int reg;
|
||||
u_char val;
|
||||
static void
|
||||
asc_write_reg(struct ncr53c9x_softc *sc, int reg, u_char val)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
|
||||
bus_space_write_1(esc->sc_bst, esc->sc_bsh, reg * 4 + 3, val);
|
||||
}
|
||||
|
||||
void
|
||||
dma_status(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
static void
|
||||
dma_status(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
int count;
|
||||
|
@ -255,8 +244,7 @@ dma_status(sc)
|
|||
}
|
||||
|
||||
static __inline void
|
||||
check_fifo(esc)
|
||||
struct asc_softc *esc;
|
||||
check_fifo(struct asc_softc *esc)
|
||||
{
|
||||
register int i=100;
|
||||
|
||||
|
@ -271,16 +259,14 @@ check_fifo(esc)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
asc_dma_isintr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
static int
|
||||
asc_dma_isintr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
return NCR_READ_REG(sc, NCR_STAT) & NCRSTAT_INT;
|
||||
}
|
||||
|
||||
void
|
||||
asc_dma_reset(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
static void
|
||||
asc_dma_reset(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -301,12 +287,8 @@ asc_dma_reset(sc)
|
|||
*/
|
||||
|
||||
static int
|
||||
asc_dma_setup(sc, addr, len, datain, dmasize)
|
||||
struct ncr53c9x_softc *sc;
|
||||
caddr_t *addr;
|
||||
size_t *len;
|
||||
int datain;
|
||||
size_t *dmasize;
|
||||
asc_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
|
||||
int datain, size_t *dmasize)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
paddr_t paddr;
|
||||
|
@ -332,10 +314,10 @@ asc_dma_setup(sc, addr, len, datain, dmasize)
|
|||
return 0;
|
||||
|
||||
/* have dmamap for the transfering addresses */
|
||||
if (err=bus_dmamap_load(esc->sc_dmat, esc->sc_dmamap,
|
||||
if ((err=bus_dmamap_load(esc->sc_dmat, esc->sc_dmamap,
|
||||
*esc->sc_dmaaddr, esc->sc_dmasize,
|
||||
NULL /* kernel address */,
|
||||
BUS_DMA_NOWAIT))
|
||||
BUS_DMA_NOWAIT)) != 0)
|
||||
panic("%s: bus_dmamap_load err=%d", sc->sc_dev.dv_xname, err);
|
||||
|
||||
esc->sc_flags |= DMA_MAPLOADED;
|
||||
|
@ -388,9 +370,8 @@ asc_dma_setup(sc, addr, len, datain, dmasize)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
asc_dma_go(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
static void
|
||||
asc_dma_go(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -400,9 +381,8 @@ asc_dma_go(sc)
|
|||
esc->sc_flags |= DMA_ACTIVE;
|
||||
}
|
||||
|
||||
int
|
||||
asc_dma_intr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
static int
|
||||
asc_dma_intr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -491,9 +471,8 @@ asc_dma_intr(sc)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
asc_dma_stop(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
static void
|
||||
asc_dma_stop(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -503,17 +482,15 @@ asc_dma_stop(sc)
|
|||
esc->sc_flags = DMA_IDLE;
|
||||
}
|
||||
|
||||
int
|
||||
asc_dma_isactive(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
static int
|
||||
asc_dma_isactive(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *esc = (struct asc_softc *)sc;
|
||||
return (esc->sc_flags & DMA_ACTIVE)? 1 : 0;
|
||||
}
|
||||
|
||||
void
|
||||
rambo_dma_chain(esc)
|
||||
struct asc_softc *esc;
|
||||
static void
|
||||
rambo_dma_chain(struct asc_softc *esc)
|
||||
{
|
||||
int seg;
|
||||
size_t count, blocks;
|
||||
|
@ -549,9 +526,8 @@ rambo_dma_chain(esc)
|
|||
bus_space_write_2(esc->sc_bst, esc->dm_bsh, RAMBO_BLKCNT, blocks);
|
||||
}
|
||||
|
||||
int
|
||||
asc_intr(arg)
|
||||
void *arg;
|
||||
static int
|
||||
asc_intr(void *arg)
|
||||
{
|
||||
register u_int32_t dma_stat;
|
||||
struct asc_softc *esc = arg;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: i82072.c,v 1.2 2000/08/15 04:56:46 wdk Exp $ */
|
||||
/* $NetBSD: i82072.c,v 1.3 2000/12/03 04:51:05 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
@ -41,12 +41,21 @@
|
|||
#include <sys/syslog.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/mainboard.h>
|
||||
#include <machine/bus.h>
|
||||
|
||||
dev_type_open(fdopen);
|
||||
dev_type_close(fdclose);
|
||||
dev_type_ioctl(fdioctl);
|
||||
dev_type_size(fdsize);
|
||||
dev_type_dump(fddump);
|
||||
dev_type_strategy(fdstrategy);
|
||||
|
||||
|
||||
#define I82072_STATUS 0x000003
|
||||
#define I82072_DATA 0x000007
|
||||
#define I82072_TC 0x800003
|
||||
|
@ -59,29 +68,24 @@ struct fd_softc {
|
|||
int unit;
|
||||
};
|
||||
|
||||
static int fd_match __P((struct device *, struct cfdata *, void *));
|
||||
static void fd_attach __P((struct device *, struct device *, void *));
|
||||
static void fd_reset __P((struct fd_softc *));
|
||||
static int fd_match (struct device *, struct cfdata *, void *);
|
||||
static void fd_attach (struct device *, struct device *, void *);
|
||||
static void fd_reset (struct fd_softc *);
|
||||
|
||||
struct cfattach fd_ca = {
|
||||
sizeof(struct fd_softc), fd_match, fd_attach
|
||||
};
|
||||
|
||||
static int fd_intr __P((void *));
|
||||
static int fd_intr (void *);
|
||||
|
||||
int
|
||||
fd_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
fd_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
fd_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
fd_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct fd_softc *sc = (void *)self;
|
||||
struct confargs *ca = aux;
|
||||
|
@ -104,8 +108,7 @@ fd_attach(parent, self, aux)
|
|||
}
|
||||
|
||||
void
|
||||
fd_reset(sc)
|
||||
struct fd_softc *sc;
|
||||
fd_reset(struct fd_softc *sc)
|
||||
{
|
||||
/* This clears any pending interrupts from the i82072 FDC */
|
||||
bus_space_write_1(sc->fd_bst, sc->fd_bsh, I82072_STATUS, 0x80);
|
||||
|
@ -114,29 +117,41 @@ fd_reset(sc)
|
|||
DELAY(1000);
|
||||
}
|
||||
|
||||
void
|
||||
fdopen()
|
||||
{}
|
||||
int
|
||||
fdopen(dev_t dev, int flags, int mode, struct proc *p)
|
||||
{
|
||||
return (EBADF);
|
||||
}
|
||||
|
||||
int
|
||||
fdclose(dev_t dev, int flags, int mode, struct proc *p)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
fdclose()
|
||||
{}
|
||||
fdstrategy(struct buf *bp)
|
||||
{
|
||||
panic("fdstrategy");
|
||||
}
|
||||
|
||||
void
|
||||
fdstrategy()
|
||||
{}
|
||||
int
|
||||
fdioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
|
||||
{
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
void
|
||||
fdioctl()
|
||||
{}
|
||||
int
|
||||
fddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size)
|
||||
{
|
||||
return (ENODEV);
|
||||
}
|
||||
|
||||
void
|
||||
fddump()
|
||||
{}
|
||||
|
||||
void
|
||||
fdsize()
|
||||
{}
|
||||
int
|
||||
fdsize(dev_t dev)
|
||||
{
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
fd_intr(arg)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mkclock.c,v 1.1 2000/08/12 22:58:57 wdk Exp $ */
|
||||
/* $NetBSD: mkclock.c,v 1.2 2000/12/03 04:51:05 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -57,8 +57,8 @@ struct mkclock_softc {
|
|||
bus_space_handle_t sc_bsh;
|
||||
};
|
||||
|
||||
static int mkclock_match __P((struct device *, struct cfdata *, void *));
|
||||
static void mkclock_attach __P((struct device *, struct device *, void *));
|
||||
static int mkclock_match (struct device *, struct cfdata *, void *);
|
||||
static void mkclock_attach (struct device *, struct device *, void *);
|
||||
|
||||
struct cfattach mkclock_ca = {
|
||||
sizeof(struct mkclock_softc), mkclock_match, mkclock_attach
|
||||
|
@ -66,8 +66,11 @@ struct cfattach mkclock_ca = {
|
|||
|
||||
static struct mkclock_softc *mk0;
|
||||
|
||||
void mkclock_read __P((struct clock_ymdhms *));
|
||||
void mkclock_write __P((struct clock_ymdhms *));
|
||||
void mkclock_read (struct clock_ymdhms *);
|
||||
void mkclock_write (struct clock_ymdhms *);
|
||||
|
||||
static int mk_read (struct mkclock_softc *, int);
|
||||
static void mk_write (struct mkclock_softc *, int, int);
|
||||
|
||||
int
|
||||
mkclock_match(parent, cf, aux)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zs.c,v 1.4 2000/08/29 11:25:08 wdk Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.5 2000/12/03 04:51:05 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -60,6 +60,7 @@
|
|||
#include <machine/cpu.h>
|
||||
#include <machine/mainboard.h>
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/prom.h>
|
||||
#include <machine/z8530var.h>
|
||||
|
||||
#include <dev/cons.h>
|
||||
|
@ -74,8 +75,6 @@
|
|||
#define NZS 2
|
||||
#endif
|
||||
|
||||
extern void Debugger __P((void));
|
||||
|
||||
/*
|
||||
* Some warts needed by z8530tty.c -
|
||||
* The default parity REALLY needs to be the same as the PROM uses,
|
||||
|
@ -96,6 +95,10 @@ int zs_major = 1;
|
|||
|
||||
#define ZS_DELAY() delay(2);
|
||||
|
||||
static struct zschan *zs_get_chan_addr (int zs_unit, int channel);
|
||||
static int zs_getc (void *);
|
||||
static void zs_putc (void *, int);
|
||||
|
||||
/* The layout of this is hardware-dependent (padding, order). */
|
||||
struct zschan {
|
||||
u_char pad1[3];
|
||||
|
@ -135,7 +138,7 @@ static u_char zs_init_reg[16] = {
|
|||
};
|
||||
|
||||
|
||||
struct zschan *
|
||||
static struct zschan *
|
||||
zs_get_chan_addr(zs_unit, channel)
|
||||
int zs_unit, channel;
|
||||
{
|
||||
|
@ -596,7 +599,7 @@ zs_getc(arg)
|
|||
/*
|
||||
* Polled output char.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
zs_putc(arg, c)
|
||||
void *arg;
|
||||
int c;
|
||||
|
@ -625,7 +628,6 @@ static void zscnputc __P((dev_t, int));
|
|||
static void zscnpollc __P((dev_t, int));
|
||||
|
||||
static int cons_port;
|
||||
extern int prom_getconsole __P((void));
|
||||
|
||||
struct consdev consdev_zs = {
|
||||
zscnprobe,
|
||||
|
|
Loading…
Reference in New Issue