them.
OK otto@ deraadt@
-/* $OpenBSD: agten.c,v 1.10 2013/10/20 20:07:30 miod Exp $ */
+/* $OpenBSD: agten.c,v 1.11 2018/12/27 11:09:17 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, Miodrag Vallat.
* All rights reserved.
}
int
-agten_ioctl(dev, cmd, data, flags, p)
- void *dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+agten_ioctl(void *dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
struct agten_softc *sc = dev;
struct wsdisplay_cmap *cm;
* offset, allowing for the given protection, or return -1 for error.
*/
paddr_t
-agten_mmap(v, offset, prot)
- void *v;
- off_t offset;
- int prot;
+agten_mmap(void *v, off_t offset, int prot)
{
struct agten_softc *sc = v;
}
void
-agten_setcolor(v, index, r, g, b)
- void *v;
- u_int index;
- u_int8_t r, g, b;
+agten_setcolor(void *v, u_int index, u_int8_t r, u_int8_t g, u_int8_t b)
{
struct agten_softc *sc = v;
-/* $OpenBSD: spif.c,v 1.21 2018/02/19 08:59:52 mpi Exp $ */
+/* $OpenBSD: spif.c,v 1.22 2018/12/27 11:09:17 claudio Exp $ */
/*
* Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net)
#define DTR_READ(sc,port) ((sc)->sc_ttys->sc_port[(port)].sp_dtr)
int
-spifmatch(parent, vcf, aux)
- struct device *parent;
- void *vcf, *aux;
+spifmatch(struct device *parent, void *vcf, void *aux)
{
struct cfdata *cf = vcf;
struct sbus_attach_args *sa = aux;
}
void
-spifattach(parent, self, aux)
- struct device *parent, *self;
- void *aux;
+spifattach(struct device *parent, struct device *self, void *aux)
{
struct spif_softc *sc = (struct spif_softc *)self;
struct sbus_attach_args *sa = aux;
}
int
-sttymatch(parent, vcf, aux)
- struct device *parent;
- void *vcf, *aux;
+sttymatch(struct device *parent, void *vcf, void *aux)
{
struct spif_softc *sc = (struct spif_softc *)parent;
}
void
-sttyattach(parent, dev, aux)
- struct device *parent, *dev;
- void *aux;
+sttyattach(struct device *parent, struct device *dev, void *aux)
{
struct spif_softc *sc = (struct spif_softc *)parent;
struct stty_softc *ssc = (struct stty_softc *)dev;
}
int
-sttyopen(dev, flags, mode, p)
- dev_t dev;
- int flags;
- int mode;
- struct proc *p;
+sttyopen(dev_t dev, int flags, int mode, struct proc *p)
{
struct spif_softc *csc;
struct stty_softc *sc;
}
int
-sttyclose(dev, flags, mode, p)
- dev_t dev;
- int flags;
- int mode;
- struct proc *p;
+sttyclose(dev_t dev, int flags, int mode, struct proc *p)
{
struct stty_softc *sc = stty_cd.cd_devs[SPIF_CARD(dev)];
struct stty_port *sp = &sc->sc_port[SPIF_PORT(dev)];
}
int
-sttyioctl(dev, cmd, data, flags, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+sttyioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
struct stty_softc *stc = stty_cd.cd_devs[SPIF_CARD(dev)];
struct stty_port *sp = &stc->sc_port[SPIF_PORT(dev)];
}
int
-stty_modem_control(sp, bits, how)
- struct stty_port *sp;
- int bits, how;
+stty_modem_control(struct stty_port *sp, int bits, int how)
{
struct spif_softc *csc = sp->sp_sc;
struct tty *tp = sp->sp_tty;
}
int
-stty_param(tp, t)
- struct tty *tp;
- struct termios *t;
+stty_param(struct tty *tp, struct termios *t)
{
struct stty_softc *st = stty_cd.cd_devs[SPIF_CARD(tp->t_dev)];
struct stty_port *sp = &st->sc_port[SPIF_PORT(tp->t_dev)];
}
int
-sttyread(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+sttyread(dev_t dev, struct uio *uio, int flags)
{
struct stty_softc *sc = stty_cd.cd_devs[SPIF_CARD(dev)];
struct stty_port *sp = &sc->sc_port[SPIF_PORT(dev)];
}
int
-sttywrite(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+sttywrite(dev_t dev, struct uio *uio, int flags)
{
struct stty_softc *sc = stty_cd.cd_devs[SPIF_CARD(dev)];
struct stty_port *sp = &sc->sc_port[SPIF_PORT(dev)];
}
struct tty *
-sttytty(dev)
- dev_t dev;
+sttytty(dev_t dev)
{
struct stty_softc *sc = stty_cd.cd_devs[SPIF_CARD(dev)];
struct stty_port *sp = &sc->sc_port[SPIF_PORT(dev)];
}
int
-sttystop(tp, flags)
- struct tty *tp;
- int flags;
+sttystop(struct tty *tp, int flags)
{
struct stty_softc *sc = stty_cd.cd_devs[SPIF_CARD(tp->t_dev)];
struct stty_port *sp = &sc->sc_port[SPIF_PORT(tp->t_dev)];
}
void
-stty_start(tp)
- struct tty *tp;
+stty_start(struct tty *tp)
{
struct stty_softc *stc = stty_cd.cd_devs[SPIF_CARD(tp->t_dev)];
struct stty_port *sp = &stc->sc_port[SPIF_PORT(tp->t_dev)];
}
int
-spifstcintr_rxexception(sc, needsoftp)
- struct spif_softc *sc;
- int *needsoftp;
+spifstcintr_rxexception(struct spif_softc *sc, int *needsoftp)
{
struct stty_port *sp;
u_int8_t channel, *ptr;
}
int
-spifstcintr_rx(sc, needsoftp)
- struct spif_softc *sc;
- int *needsoftp;
+spifstcintr_rx(struct spif_softc *sc, int *needsoftp)
{
struct stty_port *sp;
u_int8_t channel, *ptr, cnt, rcsr;
}
int
-spifstcintr_tx(sc, needsoftp)
- struct spif_softc *sc;
- int *needsoftp;
+spifstcintr_tx(struct spif_softc *sc, int *needsoftp)
{
struct stty_port *sp;
u_int8_t channel, ch;
}
int
-spifstcintr_mx(sc, needsoftp)
- struct spif_softc *sc;
- int *needsoftp;
+spifstcintr_mx(struct spif_softc *sc, int *needsoftp)
{
struct stty_port *sp;
u_int8_t channel, mcr;
}
int
-spifstcintr(vsc)
- void *vsc;
+spifstcintr(void *vsc)
{
struct spif_softc *sc = (struct spif_softc *)vsc;
int needsoft = 0, r = 0, i;
}
void
-spifsoftintr(vsc)
- void *vsc;
+spifsoftintr(void *vsc)
{
struct spif_softc *sc = (struct spif_softc *)vsc;
struct stty_softc *stc = sc->sc_ttys;
}
void
-stty_write_ccr(sc, val)
- struct spif_softc *sc;
- u_int8_t val;
+stty_write_ccr(struct spif_softc *sc, u_int8_t val)
{
int tries = 100000;
}
int
-stty_compute_baud(speed, clock, bprlp, bprhp)
- speed_t speed;
- int clock;
- u_int8_t *bprlp, *bprhp;
+stty_compute_baud(speed_t speed, int clock, u_int8_t *bprlp, u_int8_t *bprhp)
{
u_int32_t rate;
}
int
-sbppmatch(parent, vcf, aux)
- struct device *parent;
- void *vcf, *aux;
+sbppmatch(struct device *parent, void *vcf, void *aux)
{
struct spif_softc *sc = (struct spif_softc *)parent;
}
void
-sbppattach(parent, dev, aux)
- struct device *parent, *dev;
- void *aux;
+sbppattach(struct device *parent, struct device *dev, void *aux)
{
struct spif_softc *sc = (struct spif_softc *)parent;
struct sbpp_softc *psc = (struct sbpp_softc *)dev;
}
int
-sbppopen(dev, flags, mode, p)
- dev_t dev;
- int flags;
- int mode;
- struct proc *p;
+sbppopen(dev_t dev, int flags, int mode, struct proc *p)
{
return (ENXIO);
}
int
-sbppclose(dev, flags, mode, p)
- dev_t dev;
- int flags;
- int mode;
- struct proc *p;
+sbppclose(dev_t dev, int flags, int mode, struct proc *p)
{
return (ENXIO);
}
int
-spifppcintr(v)
- void *v;
+spifppcintr(void *v)
{
return (0);
}
int
-sbppread(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+sbppread(dev_t dev, struct uio *uio, int flags)
{
return (sbpp_rw(dev, uio));
}
int
-sbppwrite(dev, uio, flags)
- dev_t dev;
- struct uio *uio;
- int flags;
+sbppwrite(dev_t dev, struct uio *uio, int flags)
{
return (sbpp_rw(dev, uio));
}
int
-sbpp_rw(dev, uio)
- dev_t dev;
- struct uio *uio;
+sbpp_rw(dev_t dev, struct uio *uio)
{
return (ENXIO);
}
int
-sbpppoll(dev, events, p)
- dev_t dev;
- int events;
- struct proc *p;
+sbpppoll(dev_t dev, int events, struct proc *p)
{
return (seltrue(dev, events, p));
}
int
-sbppioctl(dev, cmd, data, flags, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flags;
- struct proc *p;
+sbppioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p)
{
int error;
-/* $OpenBSD: stp4020.c,v 1.19 2016/03/19 11:34:22 mpi Exp $ */
+/* $OpenBSD: stp4020.c,v 1.20 2018/12/27 11:09:17 claudio Exp $ */
/* $NetBSD: stp4020.c,v 1.23 2002/06/01 23:51:03 lukem Exp $ */
/*-
static u_int16_t stp4020_rd_sockctl(struct stp4020_socket *, int);
static void stp4020_wr_sockctl(struct stp4020_socket *, int, u_int16_t);
-static u_int16_t stp4020_rd_winctl(struct stp4020_socket *, int, int);
static void stp4020_wr_winctl(struct stp4020_socket *, int, int, u_int16_t);
void stp4020_delay(unsigned int);
static __inline__ u_int16_t
-stp4020_rd_sockctl(h, idx)
- struct stp4020_socket *h;
- int idx;
+stp4020_rd_sockctl(struct stp4020_socket *h, int idx)
{
int o = ((STP4020_SOCKREGS_SIZE * (h->sock)) + idx);
return (bus_space_read_2(h->tag, h->regs, o));
}
static __inline__ void
-stp4020_wr_sockctl(h, idx, v)
- struct stp4020_socket *h;
- int idx;
- u_int16_t v;
+stp4020_wr_sockctl(struct stp4020_socket *h, int idx, u_int16_t v)
{
int o = (STP4020_SOCKREGS_SIZE * (h->sock)) + idx;
bus_space_write_2(h->tag, h->regs, o, v);
}
-static __inline__ u_int16_t
-stp4020_rd_winctl(h, win, idx)
- struct stp4020_socket *h;
- int win;
- int idx;
-{
- int o = (STP4020_SOCKREGS_SIZE * (h->sock)) +
- (STP4020_WINREGS_SIZE * win) + idx;
- return (bus_space_read_2(h->tag, h->regs, o));
-}
-
static __inline__ void
-stp4020_wr_winctl(h, win, idx, v)
- struct stp4020_socket *h;
- int win;
- int idx;
- u_int16_t v;
+stp4020_wr_winctl(struct stp4020_socket *h, int win, int idx, u_int16_t v)
{
int o = (STP4020_SOCKREGS_SIZE * (h->sock)) +
(STP4020_WINREGS_SIZE * win) + idx;
int
-stp4020print(aux, busname)
- void *aux;
- const char *busname;
+stp4020print(void *aux, const char *busname)
{
struct pcmciabus_attach_args *paa = aux;
struct stp4020_socket *h = paa->pch;
}
void
-stp4020_attach_socket(h, speed)
- struct stp4020_socket *h;
- int speed;
+stp4020_attach_socket(struct stp4020_socket *h, int speed)
{
struct pcmciabus_attach_args paa;
int v;
* Deferred thread creation callback.
*/
void
-stp4020_create_event_thread(arg)
- void *arg;
+stp4020_create_event_thread(void *arg)
{
struct stp4020_softc *sc = arg;
* The actual event handling thread.
*/
void
-stp4020_event_thread(arg)
- void *arg;
+stp4020_event_thread(void *arg)
{
struct stp4020_softc *sc = arg;
int s, sense;
}
void
-stp4020_queue_event(sc, sock)
- struct stp4020_softc *sc;
- int sock;
+stp4020_queue_event(struct stp4020_softc *sc, int sock)
{
int s;
}
int
-stp4020_statintr(arg)
- void *arg;
+stp4020_statintr(void *arg)
{
struct stp4020_softc *sc = arg;
int i, sense, r = 0;
}
int
-stp4020_iointr(arg)
- void *arg;
+stp4020_iointr(void *arg)
{
struct stp4020_softc *sc = arg;
int i, r = 0;
}
int
-stp4020_chip_mem_alloc(pch, size, pcmhp)
- pcmcia_chipset_handle_t pch;
- bus_size_t size;
- struct pcmcia_mem_handle *pcmhp;
+stp4020_chip_mem_alloc(pcmcia_chipset_handle_t pch, bus_size_t size,
+ struct pcmcia_mem_handle *pcmhp)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
}
void
-stp4020_chip_mem_free(pch, pcmhp)
- pcmcia_chipset_handle_t pch;
- struct pcmcia_mem_handle *pcmhp;
+stp4020_chip_mem_free(pcmcia_chipset_handle_t pch,
+ struct pcmcia_mem_handle *pcmhp)
{
}
int
-stp4020_chip_mem_map(pch, kind, card_addr, size, pcmhp, offsetp, windowp)
- pcmcia_chipset_handle_t pch;
- int kind;
- bus_addr_t card_addr;
- bus_size_t size;
- struct pcmcia_mem_handle *pcmhp;
- bus_size_t *offsetp;
- int *windowp;
+stp4020_chip_mem_map(pcmcia_chipset_handle_t pch, int kind,
+ bus_addr_t card_addr, bus_size_t size, struct pcmcia_mem_handle *pcmhp,
+ bus_size_t *offsetp, int *windowp)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
int win = (kind & PCMCIA_MEM_ATTR) ? STP_WIN_ATTR : STP_WIN_MEM;
}
void
-stp4020_chip_mem_unmap(pch, win)
- pcmcia_chipset_handle_t pch;
- int win;
+stp4020_chip_mem_unmap(pcmcia_chipset_handle_t pch, int win)
{
}
int
-stp4020_chip_io_alloc(pch, start, size, align, pcihp)
- pcmcia_chipset_handle_t pch;
- bus_addr_t start;
- bus_size_t size;
- bus_size_t align;
- struct pcmcia_io_handle *pcihp;
+stp4020_chip_io_alloc(pcmcia_chipset_handle_t pch, bus_addr_t start,
+ bus_size_t size, bus_size_t align, struct pcmcia_io_handle *pcihp)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
}
void
-stp4020_chip_io_free(pch, pcihp)
- pcmcia_chipset_handle_t pch;
- struct pcmcia_io_handle *pcihp;
+stp4020_chip_io_free(pcmcia_chipset_handle_t pch,
+ struct pcmcia_io_handle *pcihp)
{
}
int
-stp4020_chip_io_map(pch, width, offset, size, pcihp, windowp)
- pcmcia_chipset_handle_t pch;
- int width;
- bus_addr_t offset;
- bus_size_t size;
- struct pcmcia_io_handle *pcihp;
- int *windowp;
+stp4020_chip_io_map(pcmcia_chipset_handle_t pch, int width, bus_addr_t offset,
+ bus_size_t size, struct pcmcia_io_handle *pcihp, int *windowp)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
}
void
-stp4020_chip_io_unmap(pch, win)
- pcmcia_chipset_handle_t pch;
- int win;
+stp4020_chip_io_unmap(pcmcia_chipset_handle_t pch, int win)
{
}
void
-stp4020_chip_socket_enable(pch)
- pcmcia_chipset_handle_t pch;
+stp4020_chip_socket_enable(pcmcia_chipset_handle_t pch)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
int i, v;
}
void
-stp4020_chip_socket_disable(pch)
- pcmcia_chipset_handle_t pch;
+stp4020_chip_socket_disable(pcmcia_chipset_handle_t pch)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
int v;
}
void *
-stp4020_chip_intr_establish(pch, pf, ipl, handler, arg, xname)
- pcmcia_chipset_handle_t pch;
- struct pcmcia_function *pf;
- int ipl;
- int (*handler) (void *);
- void *arg;
- char *xname;
+stp4020_chip_intr_establish(pcmcia_chipset_handle_t pch,
+ struct pcmcia_function *pf, int ipl, int (*handler) (void *), void *arg,
+ char *xname)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
}
void
-stp4020_chip_intr_disestablish(pch, ih)
- pcmcia_chipset_handle_t pch;
- void *ih;
+stp4020_chip_intr_disestablish(pcmcia_chipset_handle_t pch, void *ih)
{
struct stp4020_socket *h = (struct stp4020_socket *)pch;
}
const char *
-stp4020_chip_intr_string(pch, ih)
- pcmcia_chipset_handle_t pch;
- void *ih;
+stp4020_chip_intr_string(pcmcia_chipset_handle_t pch, void *ih)
{
if (ih == NULL)
return ("couldn't establish interrupt");
* XXX - assumes a context
*/
void
-stp4020_delay(ms)
- unsigned int ms;
+stp4020_delay(unsigned int ms)
{
unsigned int nticks;
#ifdef STP4020_DEBUG
void
-stp4020_dump_regs(h)
- struct stp4020_socket *h;
+stp4020_dump_regs(struct stp4020_socket *h)
{
/*
* Dump control and status registers.