Use ANSI function decls, apply static.
This commit is contained in:
parent
c7ffec83be
commit
c8dd740fd0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asc_tc.c,v 1.27 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: asc_tc.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: asc_tc.c,v 1.27 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: asc_tc.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -119,10 +119,7 @@ static struct ncr53c9x_glue asc_tc_glue = {
|
|||
#define PMAZ_DMA_ADDR(x) ((unsigned long)(x) & PMAZ_DMAR_MASK)
|
||||
|
||||
static int
|
||||
asc_tc_match(parent, cfdata, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cfdata;
|
||||
void *aux;
|
||||
asc_tc_match(struct device *parent, struct cfdata *cfdata, void *aux)
|
||||
{
|
||||
struct tc_attach_args *d = aux;
|
||||
|
||||
|
@ -133,9 +130,7 @@ asc_tc_match(parent, cfdata, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
asc_tc_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
asc_tc_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
struct asc_softc *asc = device_private(self);
|
||||
|
@ -202,8 +197,7 @@ asc_tc_attach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
asc_tc_reset(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
asc_tc_reset(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -211,8 +205,7 @@ asc_tc_reset(sc)
|
|||
}
|
||||
|
||||
static int
|
||||
asc_tc_intr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
asc_tc_intr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
int trans, resid;
|
||||
|
@ -239,12 +232,8 @@ asc_tc_intr(sc)
|
|||
}
|
||||
|
||||
static int
|
||||
asc_tc_setup(sc, addr, len, datain, dmasize)
|
||||
struct ncr53c9x_softc *sc;
|
||||
caddr_t *addr;
|
||||
size_t *len;
|
||||
int datain;
|
||||
size_t *dmasize;
|
||||
asc_tc_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
|
||||
int datain, size_t *dmasize)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
u_int32_t tc_dmar;
|
||||
|
@ -284,8 +273,7 @@ asc_tc_setup(sc, addr, len, datain, dmasize)
|
|||
}
|
||||
|
||||
static void
|
||||
asc_tc_go(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
asc_tc_go(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
#if 0
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
@ -302,8 +290,7 @@ asc_tc_go(sc)
|
|||
|
||||
/* NEVER CALLED BY MI 53C9x ENGINE INDEED */
|
||||
static void
|
||||
asc_tc_stop(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
asc_tc_stop(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
#if 0
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
@ -318,9 +305,7 @@ asc_tc_stop(sc)
|
|||
* Glue functions.
|
||||
*/
|
||||
static u_char
|
||||
asc_read_reg(sc, reg)
|
||||
struct ncr53c9x_softc *sc;
|
||||
int reg;
|
||||
asc_read_reg(struct ncr53c9x_softc *sc, int reg)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
u_char v;
|
||||
|
@ -332,10 +317,7 @@ asc_read_reg(sc, reg)
|
|||
}
|
||||
|
||||
static void
|
||||
asc_write_reg(sc, reg, val)
|
||||
struct ncr53c9x_softc *sc;
|
||||
int reg;
|
||||
u_char val;
|
||||
asc_write_reg(struct ncr53c9x_softc *sc, int reg, u_char val)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -344,15 +326,13 @@ asc_write_reg(sc, reg, val)
|
|||
}
|
||||
|
||||
static int
|
||||
asc_dma_isintr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
asc_dma_isintr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
return !!(NCR_READ_REG(sc, NCR_STAT) & NCRSTAT_INT);
|
||||
}
|
||||
|
||||
static int
|
||||
asc_dma_isactive(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
asc_dma_isactive(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -360,7 +340,6 @@ asc_dma_isactive(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
asc_clear_latched_intr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
asc_clear_latched_intr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: asc_tcds.c,v 1.15 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: asc_tcds.c,v 1.16 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: asc_tcds.c,v 1.15 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: asc_tcds.c,v 1.16 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -140,10 +140,7 @@ static struct ncr53c9x_glue asc_tcds_glue = {
|
|||
};
|
||||
|
||||
static int
|
||||
asc_tcds_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
asc_tcds_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
|
||||
/* We always exist. */
|
||||
|
@ -156,9 +153,7 @@ asc_tcds_match(parent, cf, aux)
|
|||
* Attach this instance, and then all the sub-devices
|
||||
*/
|
||||
static void
|
||||
asc_tcds_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
asc_tcds_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct tcdsdev_attach_args *tcdsdev = aux;
|
||||
struct asc_softc *asc = device_private(self);
|
||||
|
@ -240,8 +235,7 @@ asc_tcds_attach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
tcds_dma_reset(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
tcds_dma_reset(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -257,11 +251,8 @@ tcds_dma_reset(sc)
|
|||
* start a DMA transfer or keep it going
|
||||
*/
|
||||
int
|
||||
tcds_dma_setup(sc, addr, len, ispullup, dmasize)
|
||||
struct ncr53c9x_softc *sc;
|
||||
caddr_t *addr;
|
||||
size_t *len, *dmasize;
|
||||
int ispullup; /* DMA into main memory */
|
||||
tcds_dma_setup(struct ncr53c9x_softc *sc, caddr_t *addr, size_t *len,
|
||||
int ispullup, size_t *dmasize)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
struct tcds_slotconfig *tcds = asc->sc_tcds;
|
||||
|
@ -317,8 +308,7 @@ tcds_dma_setup(sc, addr, len, ispullup, dmasize)
|
|||
}
|
||||
|
||||
static void
|
||||
tcds_dma_go(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
tcds_dma_go(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -330,8 +320,7 @@ tcds_dma_go(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
tcds_dma_stop(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
tcds_dma_stop(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
#if 0
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
@ -350,8 +339,7 @@ tcds_dma_stop(sc)
|
|||
* return 1 if it was a DMA continue.
|
||||
*/
|
||||
static int
|
||||
tcds_dma_intr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
tcds_dma_intr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
struct tcds_slotconfig *tcds = asc->sc_tcds;
|
||||
|
@ -477,9 +465,7 @@ tcds_dma_intr(sc)
|
|||
* Glue functions.
|
||||
*/
|
||||
static u_char
|
||||
asc_read_reg(sc, reg)
|
||||
struct ncr53c9x_softc *sc;
|
||||
int reg;
|
||||
asc_read_reg(struct ncr53c9x_softc *sc, int reg)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
u_int32_t v;
|
||||
|
@ -491,10 +477,7 @@ asc_read_reg(sc, reg)
|
|||
}
|
||||
|
||||
static void
|
||||
asc_write_reg(sc, reg, val)
|
||||
struct ncr53c9x_softc *sc;
|
||||
int reg;
|
||||
u_char val;
|
||||
asc_write_reg(struct ncr53c9x_softc *sc, int reg, u_char val)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -503,8 +486,7 @@ asc_write_reg(sc, reg, val)
|
|||
}
|
||||
|
||||
static int
|
||||
tcds_dma_isintr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
tcds_dma_isintr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
int x;
|
||||
|
@ -516,8 +498,7 @@ tcds_dma_isintr(sc)
|
|||
}
|
||||
|
||||
static int
|
||||
tcds_dma_isactive(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
tcds_dma_isactive(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
@ -525,8 +506,7 @@ tcds_dma_isactive(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
tcds_clear_latched_intr(sc)
|
||||
struct ncr53c9x_softc *sc;
|
||||
tcds_clear_latched_intr(struct ncr53c9x_softc *sc)
|
||||
{
|
||||
struct asc_softc *asc = (struct asc_softc *)sc;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cfb.c,v 1.48 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: cfb.c,v 1.49 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.48 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.49 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -235,10 +235,7 @@ static const u_int8_t shuffle[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
cfbmatch(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
cfbmatch(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
|
@ -249,9 +246,7 @@ cfbmatch(parent, match, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
cfbattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
cfbattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct cfb_softc *sc = device_private(self);
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
@ -300,8 +295,7 @@ cfbattach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
cfb_cmap_init(sc)
|
||||
struct cfb_softc *sc;
|
||||
cfb_cmap_init(struct cfb_softc *sc)
|
||||
{
|
||||
struct hwcmap256 *cm;
|
||||
const u_int8_t *p;
|
||||
|
@ -317,8 +311,7 @@ cfb_cmap_init(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
cfb_common_init(ri)
|
||||
struct rasops_info *ri;
|
||||
cfb_common_init(struct rasops_info *ri)
|
||||
{
|
||||
caddr_t base;
|
||||
int cookie;
|
||||
|
@ -366,12 +359,7 @@ cfb_common_init(ri)
|
|||
}
|
||||
|
||||
static int
|
||||
cfbioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct lwp *l;
|
||||
cfbioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct cfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -448,10 +436,7 @@ cfbioctl(v, cmd, data, flag, l)
|
|||
}
|
||||
|
||||
paddr_t
|
||||
cfbmmap(v, offset, prot)
|
||||
void *v;
|
||||
off_t offset;
|
||||
int prot;
|
||||
cfbmmap(void *v, off_t offset, int prot)
|
||||
{
|
||||
struct cfb_softc *sc = v;
|
||||
|
||||
|
@ -461,12 +446,8 @@ cfbmmap(v, offset, prot)
|
|||
}
|
||||
|
||||
static int
|
||||
cfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
||||
void *v;
|
||||
const struct wsscreen_descr *type;
|
||||
void **cookiep;
|
||||
int *curxp, *curyp;
|
||||
long *attrp;
|
||||
cfb_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *attrp)
|
||||
{
|
||||
struct cfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -485,9 +466,7 @@ cfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
|||
}
|
||||
|
||||
static void
|
||||
cfb_free_screen(v, cookie)
|
||||
void *v;
|
||||
void *cookie;
|
||||
cfb_free_screen(void *v, void *cookie)
|
||||
{
|
||||
struct cfb_softc *sc = v;
|
||||
|
||||
|
@ -498,20 +477,15 @@ cfb_free_screen(v, cookie)
|
|||
}
|
||||
|
||||
static int
|
||||
cfb_show_screen(v, cookie, waitok, cb, cbarg)
|
||||
void *v;
|
||||
void *cookie;
|
||||
int waitok;
|
||||
void (*cb)(void *, int, int);
|
||||
void *cbarg;
|
||||
cfb_show_screen(void *v, void *cookie, int waitok,
|
||||
void (*cb)(void *, int, int), void *cbarg)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* EXPORT */ int
|
||||
cfb_cnattach(addr)
|
||||
tc_addr_t addr;
|
||||
cfb_cnattach(tc_addr_t addr)
|
||||
{
|
||||
struct rasops_info *ri;
|
||||
long defattr;
|
||||
|
@ -526,8 +500,7 @@ cfb_cnattach(addr)
|
|||
}
|
||||
|
||||
static int
|
||||
cfbintr(arg)
|
||||
void *arg;
|
||||
cfbintr(void *arg)
|
||||
{
|
||||
struct cfb_softc *sc = arg;
|
||||
caddr_t base, vdac;
|
||||
|
@ -622,8 +595,7 @@ cfbintr(arg)
|
|||
}
|
||||
|
||||
static void
|
||||
cfbhwinit(cfbbase)
|
||||
caddr_t cfbbase;
|
||||
cfbhwinit(caddr_t cfbbase)
|
||||
{
|
||||
caddr_t vdac = cfbbase + CX_BT459_OFFSET;
|
||||
const u_int8_t *p;
|
||||
|
@ -691,9 +663,7 @@ cfbhwinit(cfbbase)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cmap(sc, p)
|
||||
struct cfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
get_cmap(struct cfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
u_int index = p->index, count = p->count;
|
||||
int error;
|
||||
|
@ -712,9 +682,7 @@ get_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cmap(sc, p)
|
||||
struct cfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
set_cmap(struct cfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
struct hwcmap256 cmap;
|
||||
u_int index = p->index, count = p->count;
|
||||
|
@ -742,9 +710,7 @@ set_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cursor(sc, p)
|
||||
struct cfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
set_cursor(struct cfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
#define cc (&sc->sc_cursor)
|
||||
u_int v, index = 0, count = 0, icount = 0;
|
||||
|
@ -806,17 +772,13 @@ set_cursor(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cursor(sc, p)
|
||||
struct cfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
get_cursor(struct cfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
return (EPASSTHROUGH); /* XXX */
|
||||
}
|
||||
|
||||
static void
|
||||
set_curpos(sc, curpos)
|
||||
struct cfb_softc *sc;
|
||||
struct wsdisplay_curpos *curpos;
|
||||
set_curpos(struct cfb_softc *sc, struct wsdisplay_curpos *curpos)
|
||||
{
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
int x = curpos->x, y = curpos->y;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_le_ioasic.c,v 1.26 2006/03/30 18:18:39 thorpej Exp $ */
|
||||
/* $NetBSD: if_le_ioasic.c,v 1.27 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Carnegie-Mellon University.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_le_ioasic.c,v 1.26 2006/03/30 18:18:39 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_le_ioasic.c,v 1.27 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
|
@ -85,10 +85,7 @@ static void le_ioasic_copyfrombuf_gap16(struct lance_softc *, void *,
|
|||
static void le_ioasic_zerobuf_gap16(struct lance_softc *, int, int);
|
||||
|
||||
static int
|
||||
le_ioasic_match(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
le_ioasic_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
|
||||
|
@ -103,9 +100,7 @@ le_ioasic_match(parent, match, aux)
|
|||
#define LE_IOASIC_MEMALIGN (128*1024)
|
||||
|
||||
static void
|
||||
le_ioasic_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
le_ioasic_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct le_ioasic_softc *sc = device_private(self);
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
|
@ -193,11 +188,7 @@ le_ioasic_attach(parent, self, aux)
|
|||
*/
|
||||
|
||||
void
|
||||
le_ioasic_copytobuf_gap2(sc, fromv, boff, len)
|
||||
struct lance_softc *sc;
|
||||
void *fromv;
|
||||
int boff;
|
||||
int len;
|
||||
le_ioasic_copytobuf_gap2(struct lance_softc *sc, void *fromv, int boff, int len)
|
||||
{
|
||||
volatile caddr_t buf = sc->sc_mem;
|
||||
caddr_t from = fromv;
|
||||
|
@ -222,10 +213,7 @@ le_ioasic_copytobuf_gap2(sc, fromv, boff, len)
|
|||
}
|
||||
|
||||
void
|
||||
le_ioasic_copyfrombuf_gap2(sc, tov, boff, len)
|
||||
struct lance_softc *sc;
|
||||
void *tov;
|
||||
int boff, len;
|
||||
le_ioasic_copyfrombuf_gap2(struct lance_softc *sc, void *tov, int boff, int len)
|
||||
{
|
||||
volatile caddr_t buf = sc->sc_mem;
|
||||
caddr_t to = tov;
|
||||
|
@ -258,11 +246,8 @@ le_ioasic_copyfrombuf_gap2(sc, tov, boff, len)
|
|||
*/
|
||||
|
||||
void
|
||||
le_ioasic_copytobuf_gap16(sc, fromv, boff, len)
|
||||
struct lance_softc *sc;
|
||||
void *fromv;
|
||||
int boff;
|
||||
int len;
|
||||
le_ioasic_copytobuf_gap16(struct lance_softc *sc, void *fromv, int boff,
|
||||
int len)
|
||||
{
|
||||
volatile caddr_t buf = sc->sc_mem;
|
||||
caddr_t from = fromv;
|
||||
|
@ -343,10 +328,8 @@ le_ioasic_copytobuf_gap16(sc, fromv, boff, len)
|
|||
}
|
||||
|
||||
void
|
||||
le_ioasic_copyfrombuf_gap16(sc, tov, boff, len)
|
||||
struct lance_softc *sc;
|
||||
void *tov;
|
||||
int boff, len;
|
||||
le_ioasic_copyfrombuf_gap16(struct lance_softc *sc, void *tov, int boff,
|
||||
int len)
|
||||
{
|
||||
volatile caddr_t buf = sc->sc_mem;
|
||||
caddr_t to = tov;
|
||||
|
@ -419,9 +402,7 @@ le_ioasic_copyfrombuf_gap16(sc, tov, boff, len)
|
|||
}
|
||||
|
||||
void
|
||||
le_ioasic_zerobuf_gap16(sc, boff, len)
|
||||
struct lance_softc *sc;
|
||||
int boff, len;
|
||||
le_ioasic_zerobuf_gap16(struct lance_softc *sc, int boff, int len)
|
||||
{
|
||||
volatile caddr_t buf = sc->sc_mem;
|
||||
caddr_t bptr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_le_tc.c,v 1.19 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: if_le_tc.c,v 1.20 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Carnegie-Mellon University.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_le_tc.c,v 1.19 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_le_tc.c,v 1.20 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
|
@ -60,8 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_tc.c,v 1.19 2006/03/30 16:18:49 thorpej Exp $"
|
|||
#include <dev/tc/if_levar.h>
|
||||
#include <dev/tc/tcvar.h>
|
||||
|
||||
int le_tc_match(struct device *, struct cfdata *, void *);
|
||||
void le_tc_attach(struct device *, struct device *, void *);
|
||||
static int le_tc_match(struct device *, struct cfdata *, void *);
|
||||
static void le_tc_attach(struct device *, struct device *, void *);
|
||||
|
||||
CFATTACH_DECL(le_tc, sizeof(struct le_softc),
|
||||
le_tc_match, le_tc_attach, NULL, NULL);
|
||||
|
@ -70,11 +70,8 @@ CFATTACH_DECL(le_tc, sizeof(struct le_softc),
|
|||
#define LE_OFFSET_LANCE 0x100000
|
||||
#define LE_OFFSET_ROM 0x1c0000
|
||||
|
||||
int
|
||||
le_tc_match(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
static int
|
||||
le_tc_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *d = aux;
|
||||
|
||||
|
@ -84,10 +81,8 @@ le_tc_match(parent, match, aux)
|
|||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
le_tc_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
static void
|
||||
le_tc_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct le_softc *lesc = device_private(self);
|
||||
struct lance_softc *sc = &lesc->sc_am7990.lsc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ioasic_subr.c,v 1.11 2005/12/11 12:24:00 christos Exp $ */
|
||||
/* $NetBSD: ioasic_subr.c,v 1.12 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.11 2005/12/11 12:24:00 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.12 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -42,9 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: ioasic_subr.c,v 1.11 2005/12/11 12:24:00 christos Ex
|
|||
int ioasicprint(void *, const char *);
|
||||
|
||||
int
|
||||
ioasicprint(aux, pnp)
|
||||
void *aux;
|
||||
const char *pnp;
|
||||
ioasicprint(void *aux, const char *pnp)
|
||||
{
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
|
||||
|
@ -55,10 +53,8 @@ ioasicprint(aux, pnp)
|
|||
}
|
||||
|
||||
void
|
||||
ioasic_attach_devs(sc, ioasic_devs, ioasic_ndevs)
|
||||
struct ioasic_softc *sc;
|
||||
struct ioasic_dev *ioasic_devs;
|
||||
int ioasic_ndevs;
|
||||
ioasic_attach_devs(struct ioasic_softc *sc, struct ioasic_dev *ioasic_devs,
|
||||
int ioasic_ndevs)
|
||||
{
|
||||
struct ioasicdev_attach_args idev;
|
||||
int i;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mfb.c,v 1.45 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: mfb.c,v 1.46 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.45 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.46 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -213,10 +213,7 @@ static const u_int8_t flip[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
mfbmatch(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
mfbmatch(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
|
@ -227,9 +224,7 @@ mfbmatch(parent, match, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
mfbattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
mfbattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct mfb_softc *sc = device_private(self);
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
@ -279,8 +274,7 @@ mfbattach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
mfb_common_init(ri)
|
||||
struct rasops_info *ri;
|
||||
mfb_common_init(struct rasops_info *ri)
|
||||
{
|
||||
caddr_t base;
|
||||
int cookie;
|
||||
|
@ -328,12 +322,7 @@ mfb_common_init(ri)
|
|||
}
|
||||
|
||||
static int
|
||||
mfbioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct lwp *l;
|
||||
mfbioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct mfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -410,10 +399,7 @@ mfbioctl(v, cmd, data, flag, l)
|
|||
}
|
||||
|
||||
static paddr_t
|
||||
mfbmmap(v, offset, prot)
|
||||
void *v;
|
||||
off_t offset;
|
||||
int prot;
|
||||
mfbmmap(void *v, off_t offset, int prot)
|
||||
{
|
||||
struct mfb_softc *sc = v;
|
||||
|
||||
|
@ -423,12 +409,8 @@ mfbmmap(v, offset, prot)
|
|||
}
|
||||
|
||||
static int
|
||||
mfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
||||
void *v;
|
||||
const struct wsscreen_descr *type;
|
||||
void **cookiep;
|
||||
int *curxp, *curyp;
|
||||
long *attrp;
|
||||
mfb_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *attrp)
|
||||
{
|
||||
struct mfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -447,9 +429,7 @@ mfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
|||
}
|
||||
|
||||
static void
|
||||
mfb_free_screen(v, cookie)
|
||||
void *v;
|
||||
void *cookie;
|
||||
mfb_free_screen(void *v, void *cookie)
|
||||
{
|
||||
struct mfb_softc *sc = v;
|
||||
|
||||
|
@ -460,20 +440,15 @@ mfb_free_screen(v, cookie)
|
|||
}
|
||||
|
||||
static int
|
||||
mfb_show_screen(v, cookie, waitok, cb, cbarg)
|
||||
void *v;
|
||||
void *cookie;
|
||||
int waitok;
|
||||
void (*cb)(void *, int, int);
|
||||
void *cbarg;
|
||||
mfb_show_screen(void *v, void *cookie, int waitok,
|
||||
void (*cb)(void *, int, int), void *cbarg)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* EXPORT */ int
|
||||
mfb_cnattach(addr)
|
||||
tc_addr_t addr;
|
||||
mfb_cnattach(tc_addr_t addr)
|
||||
{
|
||||
struct rasops_info *ri;
|
||||
long defattr;
|
||||
|
@ -488,8 +463,7 @@ mfb_cnattach(addr)
|
|||
}
|
||||
|
||||
static int
|
||||
mfbintr(arg)
|
||||
void *arg;
|
||||
mfbintr(void *arg)
|
||||
{
|
||||
struct mfb_softc *sc = arg;
|
||||
caddr_t base, vdac, curs;
|
||||
|
@ -583,8 +557,7 @@ mfbintr(arg)
|
|||
}
|
||||
|
||||
static void
|
||||
mfbhwinit(mfbbase)
|
||||
caddr_t mfbbase;
|
||||
mfbhwinit(caddr_t mfbbase)
|
||||
{
|
||||
caddr_t vdac, curs;
|
||||
int i;
|
||||
|
@ -630,9 +603,7 @@ mfbhwinit(mfbbase)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cursor(sc, p)
|
||||
struct mfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
set_cursor(struct mfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
#define cc (&sc->sc_cursor)
|
||||
u_int v, count = 0, icount = 0, index = 0;
|
||||
|
@ -687,17 +658,13 @@ set_cursor(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cursor(sc, p)
|
||||
struct mfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
get_cursor(struct mfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
return (EPASSTHROUGH); /* XXX */
|
||||
}
|
||||
|
||||
static void
|
||||
set_curpos(sc, curpos)
|
||||
struct mfb_softc *sc;
|
||||
struct wsdisplay_curpos *curpos;
|
||||
set_curpos(struct mfb_softc *sc, struct wsdisplay_curpos *curpos)
|
||||
{
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
int x = curpos->x, y = curpos->y;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: px.c,v 1.27 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: px.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.27 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: px.c,v 1.28 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -97,14 +97,15 @@ __KERNEL_RCSID(0, "$NetBSD: px.c,v 1.27 2006/03/30 16:18:49 thorpej Exp $");
|
|||
|
||||
#define PXF_QUEUE 0x01
|
||||
|
||||
void px_attach(struct device *, struct device *, void *);
|
||||
void px_init(struct stic_info *, int);
|
||||
int px_ioctl(struct stic_info *, u_long, caddr_t, int, struct lwp *);
|
||||
int px_match(struct device *, struct cfdata *, void *);
|
||||
static void px_attach(struct device *, struct device *, void *);
|
||||
static void px_init(struct stic_info *, int);
|
||||
static int px_ioctl(struct stic_info *, u_long, caddr_t, int,
|
||||
struct lwp *);
|
||||
static int px_match(struct device *, struct cfdata *, void *);
|
||||
|
||||
int px_intr(void *);
|
||||
u_int32_t *px_pbuf_get(struct stic_info *);
|
||||
int px_pbuf_post(struct stic_info *, u_int32_t *);
|
||||
static int px_intr(void *);
|
||||
static uint32_t *px_pbuf_get(struct stic_info *);
|
||||
static int px_pbuf_post(struct stic_info *, u_int32_t *);
|
||||
|
||||
void px_cnattach(tc_addr_t);
|
||||
|
||||
|
@ -117,7 +118,7 @@ struct px_softc {
|
|||
CFATTACH_DECL(px, sizeof(struct px_softc),
|
||||
px_match, px_attach, NULL, NULL);
|
||||
|
||||
int
|
||||
static int
|
||||
px_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta;
|
||||
|
@ -127,7 +128,7 @@ px_match(struct device *parent, struct cfdata *match, void *aux)
|
|||
return (strncmp("PMAG-CA ", ta->ta_modname, TC_ROM_LLEN) == 0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
px_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -181,7 +182,7 @@ px_cnattach(tc_addr_t addr)
|
|||
stic_cnattach(si);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
px_init(struct stic_info *si, int bootstrap)
|
||||
{
|
||||
struct pglist pglist;
|
||||
|
@ -233,7 +234,7 @@ px_init(struct stic_info *si, int bootstrap)
|
|||
stic_init(si);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
px_intr(void *cookie)
|
||||
{
|
||||
volatile struct stic_regs *sr;
|
||||
|
@ -311,7 +312,7 @@ px_intr(void *cookie)
|
|||
return (1);
|
||||
}
|
||||
|
||||
u_int32_t *
|
||||
static uint32_t *
|
||||
px_pbuf_get(struct stic_info *si)
|
||||
{
|
||||
u_long off;
|
||||
|
@ -321,7 +322,7 @@ px_pbuf_get(struct stic_info *si)
|
|||
return ((u_int32_t *)((caddr_t)si->si_buf + off));
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
px_pbuf_post(struct stic_info *si, u_int32_t *buf)
|
||||
{
|
||||
volatile u_int32_t *poll, junk;
|
||||
|
@ -358,7 +359,7 @@ px_pbuf_post(struct stic_info *si, u_int32_t *buf)
|
|||
return (-1);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
px_ioctl(struct stic_info *si, u_long cmd, caddr_t data, int flag,
|
||||
struct lwp *l)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pxg.c,v 1.20 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: pxg.c,v 1.21 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.20 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.21 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -86,16 +86,16 @@ __KERNEL_RCSID(0, "$NetBSD: pxg.c,v 1.20 2006/03/30 16:18:49 thorpej Exp $");
|
|||
#define PXG_I860_START_OFFSET 0x380000 /* i860 start register */
|
||||
#define PXG_I860_RESET_OFFSET 0x3c0000 /* i860 stop register */
|
||||
|
||||
void pxg_attach(struct device *, struct device *, void *);
|
||||
int pxg_intr(void *);
|
||||
int pxg_match(struct device *, struct cfdata *, void *);
|
||||
static void pxg_attach(struct device *, struct device *, void *);
|
||||
static int pxg_intr(void *);
|
||||
static int pxg_match(struct device *, struct cfdata *, void *);
|
||||
|
||||
void pxg_init(struct stic_info *);
|
||||
int pxg_ioctl(struct stic_info *, u_long, caddr_t, int, struct lwp *);
|
||||
u_int32_t *pxg_pbuf_get(struct stic_info *);
|
||||
int pxg_pbuf_post(struct stic_info *, u_int32_t *);
|
||||
int pxg_probe_planes(struct stic_info *);
|
||||
int pxg_probe_sram(struct stic_info *);
|
||||
static void pxg_init(struct stic_info *);
|
||||
static int pxg_ioctl(struct stic_info *, u_long, caddr_t, int, struct lwp *);
|
||||
static uint32_t *pxg_pbuf_get(struct stic_info *);
|
||||
static int pxg_pbuf_post(struct stic_info *, u_int32_t *);
|
||||
static int pxg_probe_planes(struct stic_info *);
|
||||
static int pxg_probe_sram(struct stic_info *);
|
||||
|
||||
void pxg_cnattach(tc_addr_t);
|
||||
|
||||
|
@ -115,7 +115,7 @@ static const char *pxg_types[] = {
|
|||
"PMAGB-FB",
|
||||
};
|
||||
|
||||
int
|
||||
static int
|
||||
pxg_match(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta;
|
||||
|
@ -130,7 +130,7 @@ pxg_match(struct device *parent, struct cfdata *match, void *aux)
|
|||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pxg_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -188,7 +188,7 @@ pxg_cnattach(tc_addr_t addr)
|
|||
stic_cnattach(si);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pxg_init(struct stic_info *si)
|
||||
{
|
||||
volatile u_int32_t *slot;
|
||||
|
@ -228,7 +228,7 @@ pxg_init(struct stic_info *si)
|
|||
stic_init(si);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
pxg_probe_sram(struct stic_info *si)
|
||||
{
|
||||
volatile u_int32_t *a, *b;
|
||||
|
@ -241,7 +241,7 @@ pxg_probe_sram(struct stic_info *si)
|
|||
return ((*a == *b) ? 0x20000 : 0x40000);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
pxg_probe_planes(struct stic_info *si)
|
||||
{
|
||||
volatile u_int32_t *vdac;
|
||||
|
@ -273,7 +273,7 @@ pxg_probe_planes(struct stic_info *si)
|
|||
return (8);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
pxg_intr(void *cookie)
|
||||
{
|
||||
#ifdef notyet
|
||||
|
@ -309,7 +309,7 @@ pxg_intr(void *cookie)
|
|||
return (1);
|
||||
}
|
||||
|
||||
u_int32_t *
|
||||
static uint32_t *
|
||||
pxg_pbuf_get(struct stic_info *si)
|
||||
{
|
||||
u_long off;
|
||||
|
@ -319,7 +319,7 @@ pxg_pbuf_get(struct stic_info *si)
|
|||
return ((u_int32_t *)((caddr_t)si->si_buf + off));
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
pxg_pbuf_post(struct stic_info *si, u_int32_t *buf)
|
||||
{
|
||||
volatile u_int32_t *poll, junk;
|
||||
|
@ -355,7 +355,7 @@ pxg_pbuf_post(struct stic_info *si, u_int32_t *buf)
|
|||
return (-1);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
pxg_ioctl(struct stic_info *si, u_long cmd, caddr_t data, int flag,
|
||||
struct lwp *l)
|
||||
{
|
||||
|
|
110
sys/dev/tc/sfb.c
110
sys/dev/tc/sfb.c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sfb.c,v 1.69 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: sfb.c,v 1.70 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.69 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.70 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -248,10 +248,7 @@ static const u_int8_t shuffle[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
sfbmatch(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
sfbmatch(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
|
@ -261,9 +258,7 @@ sfbmatch(parent, match, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
sfbattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
sfbattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct sfb_softc *sc = device_private(self);
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
@ -315,8 +310,7 @@ sfbattach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
sfb_cmap_init(sc)
|
||||
struct sfb_softc *sc;
|
||||
sfb_cmap_init(struct sfb_softc *sc)
|
||||
{
|
||||
struct hwcmap256 *cm;
|
||||
const u_int8_t *p;
|
||||
|
@ -332,8 +326,7 @@ sfb_cmap_init(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
sfb_common_init(ri)
|
||||
struct rasops_info *ri;
|
||||
sfb_common_init(struct rasops_info *ri)
|
||||
{
|
||||
caddr_t base, asic;
|
||||
int hsetup, vsetup, vbase, cookie;
|
||||
|
@ -400,12 +393,7 @@ sfb_common_init(ri)
|
|||
}
|
||||
|
||||
static int
|
||||
sfbioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct lwp *l;
|
||||
sfbioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct sfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -483,8 +471,7 @@ sfbioctl(v, cmd, data, flag, l)
|
|||
}
|
||||
|
||||
static void
|
||||
sfb_screenblank(sc)
|
||||
struct sfb_softc *sc;
|
||||
sfb_screenblank(struct sfb_softc *sc)
|
||||
{
|
||||
struct rasops_info *ri;
|
||||
caddr_t asic;
|
||||
|
@ -496,10 +483,7 @@ sfb_screenblank(sc)
|
|||
}
|
||||
|
||||
static paddr_t
|
||||
sfbmmap(v, offset, prot)
|
||||
void *v;
|
||||
off_t offset;
|
||||
int prot;
|
||||
sfbmmap(void *v, off_t offset, int prot)
|
||||
{
|
||||
struct sfb_softc *sc = v;
|
||||
|
||||
|
@ -509,12 +493,8 @@ sfbmmap(v, offset, prot)
|
|||
}
|
||||
|
||||
static int
|
||||
sfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
||||
void *v;
|
||||
const struct wsscreen_descr *type;
|
||||
void **cookiep;
|
||||
int *curxp, *curyp;
|
||||
long *attrp;
|
||||
sfb_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *attrp)
|
||||
{
|
||||
struct sfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -533,9 +513,7 @@ sfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
|||
}
|
||||
|
||||
static void
|
||||
sfb_free_screen(v, cookie)
|
||||
void *v;
|
||||
void *cookie;
|
||||
sfb_free_screen(void *v, void *cookie)
|
||||
{
|
||||
struct sfb_softc *sc = v;
|
||||
|
||||
|
@ -546,20 +524,15 @@ sfb_free_screen(v, cookie)
|
|||
}
|
||||
|
||||
static int
|
||||
sfb_show_screen(v, cookie, waitok, cb, cbarg)
|
||||
void *v;
|
||||
void *cookie;
|
||||
int waitok;
|
||||
void (*cb)(void *, int, int);
|
||||
void *cbarg;
|
||||
sfb_show_screen(void *v, void *cookie, int waitok,
|
||||
void (*cb)(void *, int, int), void *cbarg)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* EXPORT */ int
|
||||
sfb_cnattach(addr)
|
||||
tc_addr_t addr;
|
||||
sfb_cnattach(tc_addr_t addr)
|
||||
{
|
||||
struct rasops_info *ri;
|
||||
long defattr;
|
||||
|
@ -574,8 +547,7 @@ sfb_cnattach(addr)
|
|||
}
|
||||
|
||||
static int
|
||||
sfbintr(arg)
|
||||
void *arg;
|
||||
sfbintr(void *arg)
|
||||
{
|
||||
struct sfb_softc *sc = arg;
|
||||
caddr_t base, asic, vdac;
|
||||
|
@ -676,8 +648,7 @@ done:
|
|||
}
|
||||
|
||||
static void
|
||||
sfbhwinit(base)
|
||||
caddr_t base;
|
||||
sfbhwinit(caddr_t base)
|
||||
{
|
||||
caddr_t vdac = base + SFB_RAMDAC_OFFSET;
|
||||
const u_int8_t *p;
|
||||
|
@ -745,9 +716,7 @@ sfbhwinit(base)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cmap(sc, p)
|
||||
struct sfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
get_cmap(struct sfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
u_int index = p->index, count = p->count;
|
||||
int error;
|
||||
|
@ -766,9 +735,7 @@ get_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cmap(sc, p)
|
||||
struct sfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
set_cmap(struct sfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
struct hwcmap256 cmap;
|
||||
u_int index = p->index, count = p->count;
|
||||
|
@ -797,9 +764,7 @@ set_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cursor(sc, p)
|
||||
struct sfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
set_cursor(struct sfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
#define cc (&sc->sc_cursor)
|
||||
u_int v, index = 0, count = 0, icount = 0;
|
||||
|
@ -861,18 +826,14 @@ set_cursor(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cursor(sc, p)
|
||||
struct sfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
get_cursor(struct sfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
|
||||
return (EPASSTHROUGH); /* XXX */
|
||||
}
|
||||
|
||||
static void
|
||||
set_curpos(sc, curpos)
|
||||
struct sfb_softc *sc;
|
||||
struct wsdisplay_curpos *curpos;
|
||||
set_curpos(struct sfb_softc *sc, struct wsdisplay_curpos *curpos)
|
||||
{
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
int x = curpos->x, y = curpos->y;
|
||||
|
@ -941,8 +902,7 @@ set_curpos(sc, curpos)
|
|||
* Paint the cursor.
|
||||
*/
|
||||
static void
|
||||
sfb_do_cursor(ri)
|
||||
struct rasops_info *ri;
|
||||
sfb_do_cursor(struct rasops_info *ri)
|
||||
{
|
||||
caddr_t sfb, p;
|
||||
int scanspan, height, width, align, x, y;
|
||||
|
@ -981,11 +941,7 @@ sfb_do_cursor(ri)
|
|||
* Paint a character.
|
||||
*/
|
||||
static void
|
||||
sfb_putchar(id, row, col, uc, attr)
|
||||
void *id;
|
||||
int row, col;
|
||||
u_int uc;
|
||||
long attr;
|
||||
sfb_putchar(void *id, int row, int col, u_int uc, long attr)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
@ -1040,9 +996,7 @@ sfb_putchar(id, row, col, uc, attr)
|
|||
* Copy characters in a line.
|
||||
*/
|
||||
static void
|
||||
sfb_copycols(id, row, srccol, dstcol, ncols)
|
||||
void *id;
|
||||
int row, srccol, dstcol, ncols;
|
||||
sfb_copycols(void *id, int row, int srccol, int dstcol, int ncols)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sp, dp, basex, sfb;
|
||||
|
@ -1169,10 +1123,7 @@ sfb_copycols(id, row, srccol, dstcol, ncols)
|
|||
* Clear characters in a line.
|
||||
*/
|
||||
static void
|
||||
sfb_erasecols(id, row, startcol, ncols, attr)
|
||||
void *id;
|
||||
int row, startcol, ncols;
|
||||
long attr;
|
||||
sfb_erasecols(void *id, int row, int startcol, int ncols, long attr)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
@ -1231,9 +1182,7 @@ sfb_erasecols(id, row, startcol, ncols, attr)
|
|||
* Copy lines.
|
||||
*/
|
||||
static void
|
||||
sfb_copyrows(id, srcrow, dstrow, nrows)
|
||||
void *id;
|
||||
int srcrow, dstrow, nrows;
|
||||
sfb_copyrows(void *id, int srcrow, int dstrow, int nrows)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
@ -1292,10 +1241,7 @@ sfb_copyrows(id, srcrow, dstrow, nrows)
|
|||
* Erase lines.
|
||||
*/
|
||||
void
|
||||
sfb_eraserows(id, startrow, nrows, attr)
|
||||
void *id;
|
||||
int startrow, nrows;
|
||||
long attr;
|
||||
sfb_eraserows(void *id, int startrow, int nrows, long attr)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sfbplus.c,v 1.24 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: sfbplus.c,v 1.25 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Tohru Nishimura. All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.24 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sfbplus.c,v 1.25 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -239,10 +239,7 @@ static const u_int8_t shuffle[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
sfbpmatch(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
sfbpmatch(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
|
@ -253,9 +250,7 @@ sfbpmatch(parent, match, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
sfbpattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
sfbpattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct sfbp_softc *sc = device_private(self);
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
@ -322,8 +317,7 @@ sfbpattach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
sfbp_cmap_init(sc)
|
||||
struct sfb_softc *sc;
|
||||
sfbp_cmap_init(struct sfbp_softc *sc)
|
||||
{
|
||||
struct hwcmap256 *cm;
|
||||
const u_int8_t *p;
|
||||
|
@ -342,8 +336,7 @@ sfbp_cmap_init(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
sfbp_common_init(ri)
|
||||
struct rasops_info *ri;
|
||||
sfbp_common_init(struct rasops_info *ri)
|
||||
{
|
||||
caddr_t base, asic;
|
||||
int i, depth, hsetup, vsetup, vbase, cookie;
|
||||
|
@ -435,12 +428,7 @@ sfbp_common_init(ri)
|
|||
}
|
||||
|
||||
static int
|
||||
sfbioctl(v, cmd, data, flag, p)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct proc *p;
|
||||
sfbioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
|
||||
{
|
||||
struct sfbp_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -519,10 +507,7 @@ sfbioctl(v, cmd, data, flag, p)
|
|||
}
|
||||
|
||||
paddr_t
|
||||
sfbmmap(v, offset, prot)
|
||||
void *v;
|
||||
off_t offset;
|
||||
int prot;
|
||||
sfbmmap(void *v, off_t offset, int prot)
|
||||
{
|
||||
struct sfbp_softc *sc = v;
|
||||
|
||||
|
@ -532,12 +517,8 @@ sfbmmap(v, offset, prot)
|
|||
}
|
||||
|
||||
static int
|
||||
sfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
||||
void *v;
|
||||
const struct wsscreen_descr *type;
|
||||
void **cookiep;
|
||||
int *curxp, *curyp;
|
||||
long *attrp;
|
||||
sfb_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *attrp)
|
||||
{
|
||||
struct sfbp_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -556,9 +537,7 @@ sfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
|||
}
|
||||
|
||||
void
|
||||
sfb_free_screen(v, cookie)
|
||||
void *v;
|
||||
void *cookie;
|
||||
sfb_free_screen(void *v, void *cookie)
|
||||
{
|
||||
struct sfbp_softc *sc = v;
|
||||
|
||||
|
@ -569,20 +548,15 @@ sfb_free_screen(v, cookie)
|
|||
}
|
||||
|
||||
static int
|
||||
sfb_show_screen(v, cookie, waitok, cb, cbarg)
|
||||
void *v;
|
||||
void *cookie;
|
||||
int waitok;
|
||||
void (*cb)(void *, int, int);
|
||||
void *cbarg;
|
||||
sfb_show_screen(void *v, void *cookie, int waitok,
|
||||
void (*cb)(void *, int, int), void *cbarg)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
sfbp_cnattach(addr)
|
||||
tc_addr_t addr;
|
||||
sfbp_cnattach(tc_addr_t addr)
|
||||
{
|
||||
struct rasops_info *ri;
|
||||
long defattr;
|
||||
|
@ -597,8 +571,7 @@ sfbp_cnattach(addr)
|
|||
}
|
||||
|
||||
static int
|
||||
sfbpintr(arg)
|
||||
void *arg;
|
||||
sfbpintr(void *arg)
|
||||
{
|
||||
#define cc (&sc->sc_cursor)
|
||||
struct sfbp_softc *sc = arg;
|
||||
|
@ -633,8 +606,7 @@ done:
|
|||
}
|
||||
|
||||
static void
|
||||
bt459init(vdac)
|
||||
caddr_t vdac;
|
||||
bt459init(caddr_t vdac)
|
||||
{
|
||||
const u_int8_t *p;
|
||||
int i;
|
||||
|
@ -701,8 +673,7 @@ bt459init(vdac)
|
|||
}
|
||||
|
||||
static void
|
||||
bt463init(vdac)
|
||||
caddr_t vdac;
|
||||
bt463init(caddr_t vdac)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -730,9 +701,7 @@ bt463init(vdac)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cmap(sc, p)
|
||||
struct sfbp_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
get_cmap(struct sfbp_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
u_int index = p->index, count = p->count;
|
||||
int error;
|
||||
|
@ -751,9 +720,7 @@ get_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cmap(sc, p)
|
||||
struct sfbp_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
set_cmap(struct sfbp_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
struct hwcmap256 cmap;
|
||||
u_int index = p->index, count = p->count;
|
||||
|
@ -782,9 +749,7 @@ set_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cursor(sc, p)
|
||||
struct sfbp_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
set_cursor(struct sfbp_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
#define cc (&sc->sc_cursor)
|
||||
u_int v, index = 0, count = 0, icount = 0;
|
||||
|
@ -846,17 +811,13 @@ set_cursor(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cursor(sc, p)
|
||||
struct sfbp_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
get_cursor(struct sfbp_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
return (EPASSTHROUGH); /* XXX */
|
||||
}
|
||||
|
||||
static void
|
||||
set_curpos(sc, curpos)
|
||||
struct sfbp_softc *sc;
|
||||
struct wsdisplay_curpos *curpos;
|
||||
set_curpos(struct sfbp_softc *sc, struct wsdisplay_curpos *curpos)
|
||||
{
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
int x = curpos->x, y = curpos->y;
|
||||
|
@ -874,9 +835,7 @@ set_curpos(sc, curpos)
|
|||
}
|
||||
|
||||
static void
|
||||
bt459visible(hw, on)
|
||||
caddr_t hw;
|
||||
int on;
|
||||
bt459visible(caddr_t hw, int on)
|
||||
{
|
||||
hw += SFB_RAMDAC_OFFSET;
|
||||
SELECT(hw, BT459_IREG_CCR);
|
||||
|
@ -885,17 +844,13 @@ bt459visible(hw, on)
|
|||
}
|
||||
|
||||
static void
|
||||
sfbpvisible(hw, on)
|
||||
caddr_t hw;
|
||||
int on;
|
||||
sfbpvisible(caddr_t hw, int on)
|
||||
{
|
||||
/* XXX use SFBplus ASIC XX */
|
||||
}
|
||||
|
||||
static void
|
||||
bt459locate(hw, cc)
|
||||
caddr_t hw;
|
||||
struct hwcursor64 *cc;
|
||||
bt459locate(caddr_t hw, struct hwcursor64 *cc)
|
||||
{
|
||||
int x, y, s;
|
||||
|
||||
|
@ -916,9 +871,7 @@ bt459locate(hw, cc)
|
|||
}
|
||||
|
||||
static void
|
||||
sfbplocate(hw, cc)
|
||||
caddr_t hw;
|
||||
struct hwcursor64 *cc;
|
||||
sfbplocate(caddr_t hw, struct hwcursor64 *cc)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
|
@ -931,9 +884,7 @@ sfbplocate(hw, cc)
|
|||
}
|
||||
|
||||
static void
|
||||
bt459color(hw, cp)
|
||||
caddr_t hw;
|
||||
u_int8_t *cp;
|
||||
bt459color(caddr_t hw, u_int8_t *cp)
|
||||
{
|
||||
|
||||
hw += SFB_RAMDAC_OFFSET;
|
||||
|
@ -949,17 +900,12 @@ bt459color(hw, cp)
|
|||
}
|
||||
|
||||
static void
|
||||
bt463color(hw, cp)
|
||||
caddr_t hw;
|
||||
u_int8_t *cp;
|
||||
bt463color(caddr_t hw, u_int8_t *cp)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
bt459shape(hw, size, image)
|
||||
caddr_t hw;
|
||||
struct wsdisplay_curpos *size;
|
||||
u_int64_t *image;
|
||||
bt459shape(caddr_t hw, struct wsdisplay_curpos *size, u_int64_t *image)
|
||||
{
|
||||
u_int8_t *ip, *mp, img, msk;
|
||||
u_int8_t u;
|
||||
|
@ -998,18 +944,13 @@ bt459shape(hw, size, image)
|
|||
}
|
||||
|
||||
static void
|
||||
sfbpshape(hw, size, image)
|
||||
caddr_t hw;
|
||||
struct wsdisplay_curpos *size;
|
||||
u_int64_t *image;
|
||||
sfbpshape(caddr_t hw, struct wsdisplay_curpos *size, u_int64_t *image)
|
||||
{
|
||||
/* XXX use SFBplus ASIC XXX */
|
||||
}
|
||||
|
||||
static void
|
||||
bt459setlut(hw, cm)
|
||||
caddr_t hw;
|
||||
struct hwcmap256 *cm;
|
||||
bt459setlut(caddr_t hw, struct hwcmap265 *cm)
|
||||
{
|
||||
int index;
|
||||
|
||||
|
@ -1023,9 +964,7 @@ bt459setlut(hw, cm)
|
|||
}
|
||||
|
||||
static void
|
||||
noplut(hw, cm)
|
||||
caddr_t hw;
|
||||
struct hwcmap256 *cm;
|
||||
noplut(caddr_t hw, struct hwcmap265 *cm)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1111,11 +1050,7 @@ noplut(hw, cm)
|
|||
* Actually write a string to the frame buffer.
|
||||
*/
|
||||
static void
|
||||
sfbp_putchar(id, row, col, uc, attr)
|
||||
void *id;
|
||||
int row, col;
|
||||
u_int uc;
|
||||
long attr;
|
||||
sfbp_putchar(void *id, int row, int col, u_int uc, long attr)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
@ -1169,10 +1104,7 @@ sfbp_putchar(id, row, col, uc, attr)
|
|||
* Clear characters in a line.
|
||||
*/
|
||||
static void
|
||||
sfbp_erasecols(id, row, startcol, ncols, attr)
|
||||
void *id;
|
||||
int row, startcol, ncols;
|
||||
long attr;
|
||||
sfbp_erasecols(void *id, int row, int startcol, int ncols, long attr)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
@ -1234,9 +1166,7 @@ sfbp_erasecols(id, row, startcol, ncols, attr)
|
|||
* Copy lines.
|
||||
*/
|
||||
static void
|
||||
sfbp_copyrows(id, srcrow, dstrow, nrows)
|
||||
void *id;
|
||||
int srcrow, dstrow, nrows;
|
||||
sfbp_copyrows(void *id, int srcrow, int dstrow, int nrows)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
@ -1296,9 +1226,7 @@ sfbp_copyrows(id, srcrow, dstrow, nrows)
|
|||
|
||||
|
||||
static void
|
||||
sfbp_copyrows(id, srcrow, dstrow, nrows)
|
||||
void *id;
|
||||
int srcrow, dstrow, nrows;
|
||||
sfbp_copyrows(void *id, int srcrow, int dstrow, int nrows)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p, q;
|
||||
|
@ -1365,10 +1293,7 @@ sfbp_copyrows(id, srcrow, dstrow, nrows)
|
|||
* Erase lines.
|
||||
*/
|
||||
static void
|
||||
sfbp_eraserows(id, startrow, nrows, attr)
|
||||
void *id;
|
||||
int startrow, nrows;
|
||||
long attr;
|
||||
sfbp_eraserows(void *id, int startrow, int nrows, long attr)
|
||||
{
|
||||
struct rasops_info *ri = id;
|
||||
caddr_t sfb, p;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: stic.c,v 1.30 2005/12/11 12:24:00 christos Exp $ */
|
||||
/* $NetBSD: stic.c,v 1.31 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -73,7 +73,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.30 2005/12/11 12:24:00 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.31 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -157,37 +157,37 @@ __KERNEL_RCSID(0, "$NetBSD: stic.c,v 1.30 2005/12/11 12:24:00 christos Exp $");
|
|||
tc_wmb(); \
|
||||
} while (0)
|
||||
|
||||
int sticioctl(void *, u_long, caddr_t, int, struct lwp *);
|
||||
int stic_alloc_screen(void *, const struct wsscreen_descr *, void **,
|
||||
int *, int *, long *);
|
||||
void stic_free_screen(void *, void *);
|
||||
int stic_show_screen(void *, void *, int, void (*)(void *, int, int),
|
||||
void *);
|
||||
static int sticioctl(void *, u_long, caddr_t, int, struct lwp *);
|
||||
static int stic_alloc_screen(void *, const struct wsscreen_descr *,
|
||||
void **, int *, int *, long *);
|
||||
static void stic_free_screen(void *, void *);
|
||||
static int stic_show_screen(void *, void *, int,
|
||||
void (*)(void *, int, int), void *);
|
||||
|
||||
void stic_do_switch(void *);
|
||||
void stic_setup_backing(struct stic_info *, struct stic_screen *);
|
||||
void stic_setup_vdac(struct stic_info *);
|
||||
void stic_clear_screen(struct stic_info *);
|
||||
static void stic_do_switch(void *);
|
||||
static void stic_setup_backing(struct stic_info *, struct stic_screen *);
|
||||
static void stic_setup_vdac(struct stic_info *);
|
||||
static void stic_clear_screen(struct stic_info *);
|
||||
|
||||
int stic_get_cmap(struct stic_info *, struct wsdisplay_cmap *);
|
||||
int stic_set_cmap(struct stic_info *, struct wsdisplay_cmap *);
|
||||
int stic_set_cursor(struct stic_info *, struct wsdisplay_cursor *);
|
||||
int stic_get_cursor(struct stic_info *, struct wsdisplay_cursor *);
|
||||
void stic_set_curpos(struct stic_info *, struct wsdisplay_curpos *);
|
||||
void stic_set_hwcurpos(struct stic_info *);
|
||||
static int stic_get_cmap(struct stic_info *, struct wsdisplay_cmap *);
|
||||
static int stic_set_cmap(struct stic_info *, struct wsdisplay_cmap *);
|
||||
static int stic_set_cursor(struct stic_info *, struct wsdisplay_cursor *);
|
||||
static int stic_get_cursor(struct stic_info *, struct wsdisplay_cursor *);
|
||||
static void stic_set_curpos(struct stic_info *, struct wsdisplay_curpos *);
|
||||
static void stic_set_hwcurpos(struct stic_info *);
|
||||
|
||||
void stic_cursor(void *, int, int, int);
|
||||
void stic_copycols(void *, int, int, int, int);
|
||||
void stic_copyrows(void *, int, int, int);
|
||||
void stic_erasecols(void *, int, int, int, long);
|
||||
void stic_eraserows(void *, int, int, long);
|
||||
int stic_mapchar(void *, int, u_int *);
|
||||
void stic_putchar(void *, int, int, u_int, long);
|
||||
int stic_allocattr(void *, int, int, int, long *);
|
||||
static void stic_cursor(void *, int, int, int);
|
||||
static void stic_copycols(void *, int, int, int, int);
|
||||
static void stic_copyrows(void *, int, int, int);
|
||||
static void stic_erasecols(void *, int, int, int, long);
|
||||
static void stic_eraserows(void *, int, int, long);
|
||||
static int stic_mapchar(void *, int, u_int *);
|
||||
static void stic_putchar(void *, int, int, u_int, long);
|
||||
static int stic_allocattr(void *, int, int, int, long *);
|
||||
|
||||
dev_type_open(sticopen);
|
||||
dev_type_close(sticclose);
|
||||
dev_type_mmap(sticmmap);
|
||||
static dev_type_open(sticopen);
|
||||
static dev_type_close(sticclose);
|
||||
static dev_type_mmap(sticmmap);
|
||||
|
||||
const struct cdevsw stic_cdevsw = {
|
||||
sticopen, sticclose, noread, nowrite, noioctl,
|
||||
|
@ -481,7 +481,7 @@ stic_cnattach(struct stic_info *si)
|
|||
wsdisplay_cnattach(&stic_stdscreen, ss, 0, 0, defattr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_setup_vdac(struct stic_info *si)
|
||||
{
|
||||
u_int8_t *ip, *mp;
|
||||
|
@ -531,7 +531,7 @@ stic_setup_vdac(struct stic_info *si)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_clear_screen(struct stic_info *si)
|
||||
{
|
||||
u_int32_t *pb;
|
||||
|
@ -557,7 +557,7 @@ stic_clear_screen(struct stic_info *si)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sticioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -643,7 +643,7 @@ sticioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
|||
return (EPASSTHROUGH);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_setup_backing(struct stic_info *si, struct stic_screen *ss)
|
||||
{
|
||||
int size;
|
||||
|
@ -652,7 +652,7 @@ stic_setup_backing(struct stic_info *si, struct stic_screen *ss)
|
|||
ss->ss_backing = malloc(size, M_DEVBUF, M_NOWAIT|M_ZERO);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *attrp)
|
||||
{
|
||||
|
@ -679,7 +679,7 @@ stic_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
|||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_free_screen(void *v, void *cookie)
|
||||
{
|
||||
struct stic_screen *ss;
|
||||
|
@ -697,7 +697,7 @@ stic_free_screen(void *v, void *cookie)
|
|||
free(ss, M_DEVBUF);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_show_screen(void *v, void *cookie, int waitok,
|
||||
void (*cb)(void *, int, int), void *cbarg)
|
||||
{
|
||||
|
@ -719,7 +719,7 @@ stic_show_screen(void *v, void *cookie, int waitok,
|
|||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_do_switch(void *cookie)
|
||||
{
|
||||
struct stic_screen *ss;
|
||||
|
@ -787,7 +787,7 @@ stic_do_switch(void *cookie)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_allocattr(void *cookie, int fg, int bg, int flags, long *attr)
|
||||
{
|
||||
long tmp;
|
||||
|
@ -808,7 +808,7 @@ stic_allocattr(void *cookie, int fg, int bg, int flags, long *attr)
|
|||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_erasecols(void *cookie, int row, int col, int num, long attr)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -849,7 +849,7 @@ stic_erasecols(void *cookie, int row, int col, int num, long attr)
|
|||
(*si->si_pbuf_post)(si, pb);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_eraserows(void *cookie, int row, int num, long attr)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -888,7 +888,7 @@ stic_eraserows(void *cookie, int row, int num, long attr)
|
|||
(*si->si_pbuf_post)(si, pb);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_copyrows(void *cookie, int src, int dst, int height)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -948,7 +948,7 @@ stic_copyrows(void *cookie, int src, int dst, int height)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_copycols(void *cookie, int row, int src, int dst, int num)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -1000,7 +1000,7 @@ stic_copycols(void *cookie, int row, int src, int dst, int num)
|
|||
(*si->si_pbuf_post)(si, pbs);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_putchar(void *cookie, int r, int c, u_int uc, long attr)
|
||||
{
|
||||
struct wsdisplay_font *font;
|
||||
|
@ -1120,7 +1120,7 @@ stic_putchar(void *cookie, int r, int c, u_int uc, long attr)
|
|||
(*si->si_pbuf_post)(si, pb);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_mapchar(void *cookie, int c, u_int *cp)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -1141,7 +1141,7 @@ stic_mapchar(void *cookie, int c, u_int *cp)
|
|||
return (5);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_cursor(void *cookie, int on, int row, int col)
|
||||
{
|
||||
struct stic_screen *ss;
|
||||
|
@ -1258,7 +1258,7 @@ stic_flush(struct stic_info *si)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_get_cmap(struct stic_info *si, struct wsdisplay_cmap *p)
|
||||
{
|
||||
u_int index = p->index, count = p->count;
|
||||
|
@ -1277,7 +1277,7 @@ stic_get_cmap(struct stic_info *si, struct wsdisplay_cmap *p)
|
|||
return error;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_set_cmap(struct stic_info *si, struct wsdisplay_cmap *p)
|
||||
{
|
||||
struct stic_hwcmap256 cmap;
|
||||
|
@ -1317,7 +1317,7 @@ stic_set_cmap(struct stic_info *si, struct wsdisplay_cmap *p)
|
|||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_set_cursor(struct stic_info *si, struct wsdisplay_cursor *p)
|
||||
{
|
||||
#define cc (&si->si_cursor)
|
||||
|
@ -1395,7 +1395,7 @@ stic_set_cursor(struct stic_info *si, struct wsdisplay_cursor *p)
|
|||
#undef cc
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
stic_get_cursor(struct stic_info *si, struct wsdisplay_cursor *p)
|
||||
{
|
||||
|
||||
|
@ -1403,7 +1403,7 @@ stic_get_cursor(struct stic_info *si, struct wsdisplay_cursor *p)
|
|||
return (EPASSTHROUGH);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_set_curpos(struct stic_info *si, struct wsdisplay_curpos *curpos)
|
||||
{
|
||||
int x, y;
|
||||
|
@ -1425,7 +1425,7 @@ stic_set_curpos(struct stic_info *si, struct wsdisplay_curpos *curpos)
|
|||
stic_set_hwcurpos(si);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
stic_set_hwcurpos(struct stic_info *si)
|
||||
{
|
||||
volatile u_int32_t *vdac;
|
||||
|
@ -1452,7 +1452,7 @@ stic_set_hwcurpos(struct stic_info *si)
|
|||
* because access to the DMA engine means that it's possible to circumvent
|
||||
* the securelevel mechanism.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
sticopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -1476,7 +1476,7 @@ sticopen(dev_t dev, int flag, int mode, struct lwp *l)
|
|||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sticclose(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
@ -1490,7 +1490,7 @@ sticclose(dev_t dev, int flag, int mode, struct lwp *l)
|
|||
return (0);
|
||||
}
|
||||
|
||||
paddr_t
|
||||
static paddr_t
|
||||
sticmmap(dev_t dev, off_t offset, int prot)
|
||||
{
|
||||
struct stic_info *si;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tc.c,v 1.44 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: tc.c,v 1.45 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.44 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.45 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include "opt_tcverbose.h"
|
||||
|
||||
|
@ -43,21 +43,18 @@ __KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.44 2006/03/30 16:18:49 thorpej Exp $");
|
|||
#include "locators.h"
|
||||
|
||||
/* Definition of the driver for autoconfig. */
|
||||
int tcmatch(struct device *, struct cfdata *, void *);
|
||||
static int tcmatch(struct device *, struct cfdata *, void *);
|
||||
|
||||
CFATTACH_DECL(tc, sizeof(struct tc_softc),
|
||||
tcmatch, tcattach, NULL, NULL);
|
||||
|
||||
extern struct cfdriver tc_cd;
|
||||
|
||||
int tcprint(void *, const char *);
|
||||
void tc_devinfo(const char *, char *, size_t);
|
||||
static int tcprint(void *, const char *);
|
||||
static void tc_devinfo(const char *, char *, size_t);
|
||||
|
||||
int
|
||||
tcmatch(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
static int
|
||||
tcmatch(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct tcbus_attach_args *tba = aux;
|
||||
|
||||
|
@ -68,10 +65,7 @@ tcmatch(parent, cf, aux)
|
|||
}
|
||||
|
||||
void
|
||||
tcattach(parent, self, aux)
|
||||
struct device *parent;
|
||||
struct device *self;
|
||||
void *aux;
|
||||
tcattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct tc_softc *sc = device_private(self);
|
||||
struct tcbus_attach_args *tba = aux;
|
||||
|
@ -186,10 +180,8 @@ tcattach(parent, self, aux)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
tcprint(aux, pnp)
|
||||
void *aux;
|
||||
const char *pnp;
|
||||
static int
|
||||
tcprint(void *aux, const char *pnp)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
char devinfo[256];
|
||||
|
@ -204,15 +196,13 @@ tcprint(aux, pnp)
|
|||
|
||||
|
||||
#define NTC_ROMOFFS 2
|
||||
static tc_offset_t tc_slot_romoffs[NTC_ROMOFFS] = {
|
||||
static const tc_offset_t tc_slot_romoffs[NTC_ROMOFFS] = {
|
||||
TC_SLOT_ROM,
|
||||
TC_SLOT_PROTOROM,
|
||||
};
|
||||
|
||||
int
|
||||
tc_checkslot(slotbase, namep)
|
||||
tc_addr_t slotbase;
|
||||
char *namep;
|
||||
tc_checkslot(tc_addr_t slotbase, char *namep)
|
||||
{
|
||||
struct tc_rommap *romp;
|
||||
int i, j;
|
||||
|
@ -258,11 +248,8 @@ tc_intr_evcnt(struct device *dev, void *cookie)
|
|||
}
|
||||
|
||||
void
|
||||
tc_intr_establish(dev, cookie, level, handler, arg)
|
||||
struct device *dev;
|
||||
void *cookie, *arg;
|
||||
int level;
|
||||
int (*handler)(void *);
|
||||
tc_intr_establish(struct device *dev, void *cookie, int level,
|
||||
int (*handler)(void *), void *arg)
|
||||
{
|
||||
struct tc_softc *sc = tc_cd.cd_devs[0];
|
||||
|
||||
|
@ -270,9 +257,7 @@ tc_intr_establish(dev, cookie, level, handler, arg)
|
|||
}
|
||||
|
||||
void
|
||||
tc_intr_disestablish(dev, cookie)
|
||||
struct device *dev;
|
||||
void *cookie;
|
||||
tc_intr_disestablish(struct device *dev, void *cookie)
|
||||
{
|
||||
struct tc_softc *sc = tc_cd.cd_devs[0];
|
||||
|
||||
|
@ -290,11 +275,8 @@ struct tc_knowndev {
|
|||
#include <dev/tc/tcdevs_data.h>
|
||||
#endif /* TCVERBOSE */
|
||||
|
||||
void
|
||||
tc_devinfo(id, cp, l)
|
||||
const char *id;
|
||||
char *cp;
|
||||
size_t l;
|
||||
static void
|
||||
tc_devinfo(const char *id, char *cp, size_t l)
|
||||
{
|
||||
const char *driver, *description;
|
||||
#ifdef TCVERBOSE
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tcds.c,v 1.18 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: tcds.c,v 1.19 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -65,7 +65,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.18 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tcds.c,v 1.19 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -106,9 +106,9 @@ struct tcds_softc {
|
|||
#define TCDSF_FASTSCSI 0x02 /* supports Fast SCSI */
|
||||
|
||||
/* Definition of the driver for autoconfig. */
|
||||
int tcdsmatch(struct device *, struct cfdata *, void *);
|
||||
void tcdsattach(struct device *, struct device *, void *);
|
||||
int tcdsprint(void *, const char *);
|
||||
static int tcdsmatch(struct device *, struct cfdata *, void *);
|
||||
static void tcdsattach(struct device *, struct device *, void *);
|
||||
static int tcdsprint(void *, const char *);
|
||||
|
||||
CFATTACH_DECL(tcds, sizeof(struct tcds_softc),
|
||||
tcdsmatch, tcdsattach, NULL, NULL);
|
||||
|
@ -116,7 +116,7 @@ CFATTACH_DECL(tcds, sizeof(struct tcds_softc),
|
|||
/*static*/ int tcds_intr(void *);
|
||||
/*static*/ int tcds_intrnull(void *);
|
||||
|
||||
struct tcds_device {
|
||||
static const struct tcds_device {
|
||||
const char *td_name;
|
||||
int td_flags;
|
||||
} tcds_devices[] = {
|
||||
|
@ -129,14 +129,12 @@ struct tcds_device {
|
|||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
struct tcds_device *tcds_lookup(const char *);
|
||||
void tcds_params(struct tcds_softc *, int, int *, int *);
|
||||
static void tcds_params(struct tcds_softc *, int, int *, int *);
|
||||
|
||||
struct tcds_device *
|
||||
tcds_lookup(modname)
|
||||
const char *modname;
|
||||
static const struct tcds_device *
|
||||
tcds_lookup(const char *modname)
|
||||
{
|
||||
struct tcds_device *td;
|
||||
const struct tcds_device *td;
|
||||
|
||||
for (td = tcds_devices; td->td_name != NULL; td++)
|
||||
if (strncmp(td->td_name, modname, TC_ROM_LLEN) == 0)
|
||||
|
@ -145,27 +143,22 @@ tcds_lookup(modname)
|
|||
return (NULL);
|
||||
}
|
||||
|
||||
int
|
||||
tcdsmatch(parent, cfdata, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cfdata;
|
||||
void *aux;
|
||||
static int
|
||||
tcdsmatch(struct device *parent, struct cfdata *cfdata, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
return (tcds_lookup(ta->ta_modname) != NULL);
|
||||
}
|
||||
|
||||
void
|
||||
tcdsattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
static void
|
||||
tcdsattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct tcds_softc *sc = device_private(self);
|
||||
struct tc_attach_args *ta = aux;
|
||||
struct tcdsdev_attach_args tcdsdev;
|
||||
struct tcds_slotconfig *slotc;
|
||||
struct tcds_device *td;
|
||||
const struct tcds_device *td;
|
||||
bus_space_handle_t sbsh[2];
|
||||
int i, gpi2;
|
||||
const struct evcnt *pevcnt;
|
||||
|
@ -321,10 +314,8 @@ tcdsattach(parent, self, aux)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
tcdsprint(aux, pnp)
|
||||
void *aux;
|
||||
const char *pnp;
|
||||
static int
|
||||
tcdsprint(void *aux, const char *pnp)
|
||||
{
|
||||
struct tcdsdev_attach_args *tcdsdev = aux;
|
||||
|
||||
|
@ -338,13 +329,10 @@ tcdsprint(aux, pnp)
|
|||
}
|
||||
|
||||
void
|
||||
tcds_intr_establish(tcds, slot, func, arg)
|
||||
struct device *tcds;
|
||||
int slot;
|
||||
int (*func)(void *);
|
||||
void *arg;
|
||||
tcds_intr_establish(struct device *tcds, int slot, int (*func)(void *),
|
||||
void *arg)
|
||||
{
|
||||
struct tcds_softc *sc = (struct tcds_softc *)tcds;
|
||||
struct tcds_softc *sc = device_private(tcds);
|
||||
|
||||
if (sc->sc_slots[slot].sc_intrhand != tcds_intrnull)
|
||||
panic("tcds_intr_establish: chip %d twice", slot);
|
||||
|
@ -355,11 +343,9 @@ tcds_intr_establish(tcds, slot, func, arg)
|
|||
}
|
||||
|
||||
void
|
||||
tcds_intr_disestablish(tcds, slot)
|
||||
struct device *tcds;
|
||||
int slot;
|
||||
tcds_intr_disestablish(struct device *tcds, int slot)
|
||||
{
|
||||
struct tcds_softc *sc = (struct tcds_softc *)tcds;
|
||||
struct tcds_softc *sc = device_private(tcds);
|
||||
|
||||
if (sc->sc_slots[slot].sc_intrhand == tcds_intrnull)
|
||||
panic("tcds_intr_disestablish: chip %d missing intr",
|
||||
|
@ -373,8 +359,7 @@ tcds_intr_disestablish(tcds, slot)
|
|||
}
|
||||
|
||||
int
|
||||
tcds_intrnull(val)
|
||||
void *val;
|
||||
tcds_intrnull(void *val)
|
||||
{
|
||||
|
||||
panic("tcds_intrnull: uncaught TCDS intr for chip %lu",
|
||||
|
@ -382,8 +367,7 @@ tcds_intrnull(val)
|
|||
}
|
||||
|
||||
void
|
||||
tcds_scsi_reset(sc)
|
||||
struct tcds_slotconfig *sc;
|
||||
tcds_scsi_reset(struct tcds_slotconfig *sc)
|
||||
{
|
||||
u_int32_t cir;
|
||||
|
||||
|
@ -405,9 +389,7 @@ tcds_scsi_reset(sc)
|
|||
}
|
||||
|
||||
void
|
||||
tcds_scsi_enable(sc, on)
|
||||
struct tcds_slotconfig *sc;
|
||||
int on;
|
||||
tcds_scsi_enable(struct tcds_slotconfig *sc, int on)
|
||||
{
|
||||
u_int32_t imer;
|
||||
|
||||
|
@ -422,9 +404,7 @@ tcds_scsi_enable(sc, on)
|
|||
}
|
||||
|
||||
void
|
||||
tcds_dma_enable(sc, on)
|
||||
struct tcds_slotconfig *sc;
|
||||
int on;
|
||||
tcds_dma_enable(struct tcds_slotconfig *sc, int on)
|
||||
{
|
||||
u_int32_t cir;
|
||||
|
||||
|
@ -440,9 +420,7 @@ tcds_dma_enable(sc, on)
|
|||
}
|
||||
|
||||
int
|
||||
tcds_scsi_isintr(sc, clear)
|
||||
struct tcds_slotconfig *sc;
|
||||
int clear;
|
||||
tcds_scsi_isintr(struct tcds_slotconfig *sc, int clear)
|
||||
{
|
||||
u_int32_t cir;
|
||||
|
||||
|
@ -460,8 +438,7 @@ tcds_scsi_isintr(sc, clear)
|
|||
}
|
||||
|
||||
int
|
||||
tcds_scsi_iserr(sc)
|
||||
struct tcds_slotconfig *sc;
|
||||
tcds_scsi_iserr(struct tcds_slotconfig *sc)
|
||||
{
|
||||
u_int32_t cir;
|
||||
|
||||
|
@ -470,8 +447,7 @@ tcds_scsi_iserr(sc)
|
|||
}
|
||||
|
||||
int
|
||||
tcds_intr(arg)
|
||||
void *arg;
|
||||
tcds_intr(void *arg)
|
||||
{
|
||||
struct tcds_softc *sc = arg;
|
||||
u_int32_t ir, ir0;
|
||||
|
@ -536,10 +512,8 @@ tcds_intr(arg)
|
|||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
tcds_params(sc, chip, idp, fastp)
|
||||
struct tcds_softc *sc;
|
||||
int chip, *idp, *fastp;
|
||||
static void
|
||||
tcds_params(struct tcds_softc *sc, int chip, int *idp, int *fastp)
|
||||
{
|
||||
int id, fast;
|
||||
u_int32_t ids;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tfb.c,v 1.48 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: tfb.c,v 1.49 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.48 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tfb.c,v 1.49 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -267,10 +267,7 @@ static const u_int8_t flip[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
tfbmatch(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
tfbmatch(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
|
@ -283,9 +280,7 @@ tfbmatch(parent, match, aux)
|
|||
|
||||
|
||||
static void
|
||||
tfbattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
tfbattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct tfb_softc *sc = device_private(self);
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
@ -334,8 +329,7 @@ tfbattach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
tfb_common_init(ri)
|
||||
struct rasops_info *ri;
|
||||
tfb_common_init(struct rasops_info *ri)
|
||||
{
|
||||
caddr_t base;
|
||||
int cookie;
|
||||
|
@ -383,8 +377,7 @@ tfb_common_init(ri)
|
|||
}
|
||||
|
||||
static void
|
||||
tfb_cmap_init(sc)
|
||||
struct tfb_softc *sc;
|
||||
tfb_cmap_init(struct tfb_softc *sc)
|
||||
{
|
||||
struct hwcmap256 *cm;
|
||||
const u_int8_t *p;
|
||||
|
@ -400,12 +393,7 @@ tfb_cmap_init(sc)
|
|||
}
|
||||
|
||||
static int
|
||||
tfbioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct lwp *l;
|
||||
tfbioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct tfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -486,10 +474,7 @@ tfbioctl(v, cmd, data, flag, l)
|
|||
}
|
||||
|
||||
static paddr_t
|
||||
tfbmmap(v, offset, prot)
|
||||
void *v;
|
||||
off_t offset;
|
||||
int prot;
|
||||
tfbmmap(void *v, off_t offset, int prot)
|
||||
{
|
||||
struct tfb_softc *sc = v;
|
||||
|
||||
|
@ -499,12 +484,8 @@ tfbmmap(v, offset, prot)
|
|||
}
|
||||
|
||||
static int
|
||||
tfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
||||
void *v;
|
||||
const struct wsscreen_descr *type;
|
||||
void **cookiep;
|
||||
int *curxp, *curyp;
|
||||
long *attrp;
|
||||
tfb_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *attrp)
|
||||
{
|
||||
struct tfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -523,9 +504,7 @@ tfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
|||
}
|
||||
|
||||
static void
|
||||
tfb_free_screen(v, cookie)
|
||||
void *v;
|
||||
void *cookie;
|
||||
tfb_free_screen(void *v, void *cookie)
|
||||
{
|
||||
struct tfb_softc *sc = v;
|
||||
|
||||
|
@ -536,20 +515,15 @@ tfb_free_screen(v, cookie)
|
|||
}
|
||||
|
||||
static int
|
||||
tfb_show_screen(v, cookie, waitok, cb, cbarg)
|
||||
void *v;
|
||||
void *cookie;
|
||||
int waitok;
|
||||
void (*cb)(void *, int, int);
|
||||
void *cbarg;
|
||||
tfb_show_screen(void *v, void *cookie, int waitok,
|
||||
void (*cb)(void *, int, int), void *cbarg)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* EXPORT */ int
|
||||
tfb_cnattach(addr)
|
||||
tc_addr_t addr;
|
||||
tfb_cnattach(tc_addr_t addr)
|
||||
{
|
||||
struct rasops_info *ri;
|
||||
long defattr;
|
||||
|
@ -564,8 +538,7 @@ tfb_cnattach(addr)
|
|||
}
|
||||
|
||||
static int
|
||||
tfbintr(arg)
|
||||
void *arg;
|
||||
tfbintr(void *arg)
|
||||
{
|
||||
struct tfb_softc *sc = arg;
|
||||
caddr_t base, vdac, curs;
|
||||
|
@ -672,8 +645,7 @@ done:
|
|||
}
|
||||
|
||||
static void
|
||||
tfbhwinit(tfbbase)
|
||||
caddr_t tfbbase;
|
||||
tfbhwinit(caddr_t tfbbase)
|
||||
{
|
||||
caddr_t vdac, curs;
|
||||
const u_int8_t *p;
|
||||
|
@ -749,9 +721,7 @@ tfbhwinit(tfbbase)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cmap(sc, p)
|
||||
struct tfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
get_cmap(struct tfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
u_int index = p->index, count = p->count;
|
||||
int error;
|
||||
|
@ -770,9 +740,7 @@ get_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cmap(sc, p)
|
||||
struct tfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
set_cmap(struct tfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
struct hwcmap256 cmap;
|
||||
u_int index = p->index, count = p->count;
|
||||
|
@ -800,9 +768,7 @@ set_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cursor(sc, p)
|
||||
struct tfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
set_cursor(struct tfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
#define cc (&sc->sc_cursor)
|
||||
u_int v, index = 0, count = 0, icount = 0;
|
||||
|
@ -864,17 +830,13 @@ set_cursor(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cursor(sc, p)
|
||||
struct tfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
get_cursor(struct tfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
return (EPASSTHROUGH); /* XXX */
|
||||
}
|
||||
|
||||
static void
|
||||
set_curpos(sc, curpos)
|
||||
struct tfb_softc *sc;
|
||||
struct wsdisplay_curpos *curpos;
|
||||
set_curpos(struct tfb_softc *sc, struct wsdisplay_curpos *curpos)
|
||||
{
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
int x = curpos->x, y = curpos->y;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xcfb.c,v 1.40 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: xcfb.c,v 1.41 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 1999 Tohru Nishimura. All rights reserved.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.40 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xcfb.c,v 1.41 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -203,10 +203,7 @@ static const u_int8_t shuffle[256] = {
|
|||
};
|
||||
|
||||
static int
|
||||
xcfbmatch(parent, match, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *match;
|
||||
void *aux;
|
||||
xcfbmatch(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
||||
|
@ -217,9 +214,7 @@ xcfbmatch(parent, match, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
xcfbattach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
xcfbattach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct xcfb_softc *sc = device_private(self);
|
||||
struct tc_attach_args *ta = aux;
|
||||
|
@ -264,8 +259,7 @@ xcfbattach(parent, self, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
xcfb_cmap_init(sc)
|
||||
struct xcfb_softc *sc;
|
||||
xcfb_cmap_init(struct xcfb_softc *sc)
|
||||
{
|
||||
struct hwcmap256 *cm;
|
||||
const u_int8_t *p;
|
||||
|
@ -281,8 +275,7 @@ xcfb_cmap_init(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
xcfb_common_init(ri)
|
||||
struct rasops_info *ri;
|
||||
xcfb_common_init(struct rasops_info *ri)
|
||||
{
|
||||
int cookie;
|
||||
|
||||
|
@ -327,7 +320,7 @@ xcfb_common_init(ri)
|
|||
}
|
||||
|
||||
int
|
||||
xcfb_cnattach()
|
||||
xcfb_cnattach(void)
|
||||
{
|
||||
struct rasops_info *ri;
|
||||
long defattr;
|
||||
|
@ -342,8 +335,7 @@ xcfb_cnattach()
|
|||
}
|
||||
|
||||
static void
|
||||
xcfbhwinit(base)
|
||||
caddr_t base;
|
||||
xcfbhwinit(caddr_t base)
|
||||
{
|
||||
volatile u_int32_t *csr;
|
||||
u_int32_t i;
|
||||
|
@ -401,12 +393,7 @@ xcfbhwinit(base)
|
|||
}
|
||||
|
||||
static int
|
||||
xcfbioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct lwp *l;
|
||||
xcfbioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct xcfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -483,10 +470,7 @@ xcfbioctl(v, cmd, data, flag, l)
|
|||
}
|
||||
|
||||
static paddr_t
|
||||
xcfbmmap(v, offset, prot)
|
||||
void *v;
|
||||
off_t offset;
|
||||
int prot;
|
||||
xcfbmmap(void *v, off_t offset, int prot)
|
||||
{
|
||||
|
||||
if (offset >= XCFB_FB_SIZE || offset < 0)
|
||||
|
@ -495,12 +479,8 @@ xcfbmmap(v, offset, prot)
|
|||
}
|
||||
|
||||
static int
|
||||
xcfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
||||
void *v;
|
||||
const struct wsscreen_descr *type;
|
||||
void **cookiep;
|
||||
int *curxp, *curyp;
|
||||
long *attrp;
|
||||
xcfb_alloc_screen(void *v, const struct wsscreen_descr *type, void **cookiep,
|
||||
int *curxp, int *curyp, long *attrp)
|
||||
{
|
||||
struct xcfb_softc *sc = v;
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
|
@ -519,9 +499,7 @@ xcfb_alloc_screen(v, type, cookiep, curxp, curyp, attrp)
|
|||
}
|
||||
|
||||
static void
|
||||
xcfb_free_screen(v, cookie)
|
||||
void *v;
|
||||
void *cookie;
|
||||
xcfb_free_screen(void *v, void *cookie)
|
||||
{
|
||||
struct xcfb_softc *sc = v;
|
||||
|
||||
|
@ -532,20 +510,15 @@ xcfb_free_screen(v, cookie)
|
|||
}
|
||||
|
||||
static int
|
||||
xcfb_show_screen(v, cookie, waitok, cb, cbarg)
|
||||
void *v;
|
||||
void *cookie;
|
||||
int waitok;
|
||||
void (*cb)(void *, int, int);
|
||||
void *cbarg;
|
||||
xcfb_show_screen(void *v, void *cookie, int waitok,
|
||||
void (*cb)(void *, int, int), void *cbarg)
|
||||
{
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int
|
||||
xcfbintr(v)
|
||||
void *v;
|
||||
xcfbintr(void *v)
|
||||
{
|
||||
struct xcfb_softc *sc = v;
|
||||
u_int32_t *intr, i;
|
||||
|
@ -558,8 +531,7 @@ xcfbintr(v)
|
|||
}
|
||||
|
||||
static void
|
||||
xcfb_screenblank(sc)
|
||||
struct xcfb_softc *sc;
|
||||
xcfb_screenblank(struct xcfb_softc *sc)
|
||||
{
|
||||
if (sc->sc_blanked)
|
||||
sc->sc_csr |= IMS332_CSR_A_FORCE_BLANK;
|
||||
|
@ -569,9 +541,7 @@ xcfb_screenblank(sc)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cmap(sc, p)
|
||||
struct xcfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
get_cmap(struct xcfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
u_int index = p->index, count = p->count;
|
||||
int error;
|
||||
|
@ -590,9 +560,7 @@ get_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cmap(sc, p)
|
||||
struct xcfb_softc *sc;
|
||||
struct wsdisplay_cmap *p;
|
||||
set_cmap(struct xcfb_softc *sc, struct wsdisplay_cmap *p)
|
||||
{
|
||||
struct hwcmap256 cmap;
|
||||
u_int index = p->index, count = p->count;
|
||||
|
@ -617,9 +585,7 @@ set_cmap(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
set_cursor(sc, p)
|
||||
struct xcfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
set_cursor(struct xcfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
#define cc (&sc->sc_cursor)
|
||||
u_int v, index = 0, count = 0, icount = 0;
|
||||
|
@ -687,17 +653,13 @@ set_cursor(sc, p)
|
|||
}
|
||||
|
||||
static int
|
||||
get_cursor(sc, p)
|
||||
struct xcfb_softc *sc;
|
||||
struct wsdisplay_cursor *p;
|
||||
get_cursor(struct xcfb_softc *sc, struct wsdisplay_cursor *p)
|
||||
{
|
||||
return (EPASSTHROUGH); /* XXX */
|
||||
}
|
||||
|
||||
static void
|
||||
set_curpos(sc, curpos)
|
||||
struct xcfb_softc *sc;
|
||||
struct wsdisplay_curpos *curpos;
|
||||
set_curpos(struct xcfb_softc *sc, struct wsdisplay_curpos *curpos)
|
||||
{
|
||||
struct rasops_info *ri = sc->sc_ri;
|
||||
int x = curpos->x, y = curpos->y;
|
||||
|
@ -715,8 +677,7 @@ set_curpos(sc, curpos)
|
|||
}
|
||||
|
||||
static void
|
||||
ims332_loadcmap(cm)
|
||||
struct hwcmap256 *cm;
|
||||
ims332_loadcmap(struct hwcmap256 *cm)
|
||||
{
|
||||
int i;
|
||||
u_int32_t rgb;
|
||||
|
@ -728,8 +689,7 @@ ims332_loadcmap(cm)
|
|||
}
|
||||
|
||||
static void
|
||||
ims332_set_curpos(sc)
|
||||
struct xcfb_softc *sc;
|
||||
ims332_set_curpos(struct xcfb_softc *sc)
|
||||
{
|
||||
struct wsdisplay_curpos *curpos = &sc->sc_cursor.cc_pos;
|
||||
u_int32_t pos;
|
||||
|
@ -742,8 +702,7 @@ ims332_set_curpos(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
ims332_load_curcmap(sc)
|
||||
struct xcfb_softc *sc;
|
||||
ims332_load_curcmap(struct xcfb_softc *sc)
|
||||
{
|
||||
u_int8_t *cp = sc->sc_cursor.cc_color;
|
||||
u_int32_t rgb;
|
||||
|
@ -758,8 +717,7 @@ ims332_load_curcmap(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
ims332_load_curshape(sc)
|
||||
struct xcfb_softc *sc;
|
||||
ims332_load_curshape(struct xcfb_softc *sc)
|
||||
{
|
||||
u_int i, img, msk, bits;
|
||||
u_int8_t u, *ip, *mp;
|
||||
|
@ -793,9 +751,7 @@ ims332_load_curshape(sc)
|
|||
}
|
||||
|
||||
static void
|
||||
ims332_write_reg(regno, val)
|
||||
int regno;
|
||||
u_int32_t val;
|
||||
ims332_write_reg(int regno, u_int32_t val)
|
||||
{
|
||||
caddr_t high8 = (caddr_t)(ioasic_base + IMS332_HIGH);
|
||||
caddr_t low16 = (caddr_t)(ioasic_base + IMS332_WLOW) + (regno << 4);
|
||||
|
@ -806,8 +762,7 @@ ims332_write_reg(regno, val)
|
|||
|
||||
#if 0
|
||||
static u_int32_t
|
||||
ims332_read_reg(regno)
|
||||
int regno;
|
||||
ims332_read_reg(int regno)
|
||||
{
|
||||
caddr_t high8 = (caddr_t)(ioasic_base + IMS332_HIGH);
|
||||
caddr_t low16 = (caddr_t)(ioasic_base + IMS332_RLOW) + (regno << 4);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zs_ioasic.c,v 1.30 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: zs_ioasic.c,v 1.31 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -48,7 +48,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.30 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.31 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
|
@ -90,24 +90,23 @@ __KERNEL_RCSID(0, "$NetBSD: zs_ioasic.c,v 1.30 2006/03/30 16:18:49 thorpej Exp $
|
|||
/*
|
||||
* Helpers for console support.
|
||||
*/
|
||||
void zs_ioasic_cninit(tc_addr_t, tc_offset_t, int);
|
||||
int zs_ioasic_cngetc(dev_t);
|
||||
void zs_ioasic_cnputc(dev_t, int);
|
||||
void zs_ioasic_cnpollc(dev_t, int);
|
||||
static void zs_ioasic_cninit(tc_addr_t, tc_offset_t, int);
|
||||
static int zs_ioasic_cngetc(dev_t);
|
||||
static void zs_ioasic_cnputc(dev_t, int);
|
||||
static void zs_ioasic_cnpollc(dev_t, int);
|
||||
|
||||
struct consdev zs_ioasic_cons = {
|
||||
NULL, NULL, zs_ioasic_cngetc, zs_ioasic_cnputc,
|
||||
zs_ioasic_cnpollc, NULL, NULL, NULL, NODEV, CN_NORMAL,
|
||||
};
|
||||
|
||||
tc_offset_t zs_ioasic_console_offset;
|
||||
int zs_ioasic_console_channel;
|
||||
int zs_ioasic_console;
|
||||
struct zs_chanstate zs_ioasic_conschanstate_store;
|
||||
static tc_offset_t zs_ioasic_console_offset;
|
||||
static int zs_ioasic_console_channel;
|
||||
static int zs_ioasic_console;
|
||||
static struct zs_chanstate zs_ioasic_conschanstate_store;
|
||||
|
||||
int zs_ioasic_isconsole(tc_offset_t, int);
|
||||
int zs_getc(struct zs_chanstate *);
|
||||
void zs_putc(struct zs_chanstate *, int);
|
||||
static int zs_ioasic_isconsole(tc_offset_t, int);
|
||||
static void zs_putc(struct zs_chanstate *, int);
|
||||
|
||||
/*
|
||||
* Some warts needed by z8530tty.c
|
||||
|
@ -141,7 +140,7 @@ struct zsdevice {
|
|||
struct zshan zs_chan_a;
|
||||
};
|
||||
|
||||
static u_char zs_ioasic_init_reg[16] = {
|
||||
static const u_char zs_ioasic_init_reg[16] = {
|
||||
0, /* 0: CMD (reset, etc.) */
|
||||
0, /* 1: No interrupts yet. */
|
||||
0xf0, /* 2: IVECT */
|
||||
|
@ -160,12 +159,8 @@ static u_char zs_ioasic_init_reg[16] = {
|
|||
ZSWR15_BREAK_IE,
|
||||
};
|
||||
|
||||
struct zshan *zs_ioasic_get_chan_addr(tc_addr_t, int);
|
||||
|
||||
struct zshan *
|
||||
zs_ioasic_get_chan_addr(zsaddr, channel)
|
||||
tc_addr_t zsaddr;
|
||||
int channel;
|
||||
static struct zshan *
|
||||
zs_ioasic_get_chan_addr(tc_addr_t zsaddr, int channel)
|
||||
{
|
||||
struct zsdevice *addr;
|
||||
struct zshan *zc;
|
||||
|
@ -191,27 +186,24 @@ zs_ioasic_get_chan_addr(zsaddr, channel)
|
|||
****************************************************************/
|
||||
|
||||
/* Definition of the driver for autoconfig. */
|
||||
int zs_ioasic_match(struct device *, struct cfdata *, void *);
|
||||
void zs_ioasic_attach(struct device *, struct device *, void *);
|
||||
int zs_ioasic_print(void *, const char *name);
|
||||
int zs_ioasic_submatch(struct device *, struct cfdata *,
|
||||
const int *, void *);
|
||||
static int zs_ioasic_match(struct device *, struct cfdata *, void *);
|
||||
static void zs_ioasic_attach(struct device *, struct device *, void *);
|
||||
static int zs_ioasic_print(void *, const char *name);
|
||||
static int zs_ioasic_submatch(struct device *, struct cfdata *,
|
||||
const int *, void *);
|
||||
|
||||
CFATTACH_DECL(zsc_ioasic, sizeof(struct zsc_softc),
|
||||
zs_ioasic_match, zs_ioasic_attach, NULL, NULL);
|
||||
|
||||
/* Interrupt handlers. */
|
||||
int zs_ioasic_hardintr(void *);
|
||||
void zs_ioasic_softintr(void *);
|
||||
static int zs_ioasic_hardintr(void *);
|
||||
static void zs_ioasic_softintr(void *);
|
||||
|
||||
/*
|
||||
* Is the zs chip present?
|
||||
*/
|
||||
int
|
||||
zs_ioasic_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
static int
|
||||
zs_ioasic_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
tc_addr_t zs_addr;
|
||||
|
@ -236,11 +228,8 @@ zs_ioasic_match(parent, cf, aux)
|
|||
/*
|
||||
* Attach a found zs.
|
||||
*/
|
||||
void
|
||||
zs_ioasic_attach(parent, self, aux)
|
||||
struct device *parent;
|
||||
struct device *self;
|
||||
void *aux;
|
||||
static void
|
||||
zs_ioasic_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct zsc_softc *zs = device_private(self);
|
||||
struct zsc_attach_args zs_args;
|
||||
|
@ -367,10 +356,8 @@ zs_ioasic_attach(parent, self, aux)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
int
|
||||
zs_ioasic_print(aux, name)
|
||||
void *aux;
|
||||
const char *name;
|
||||
static int
|
||||
zs_ioasic_print(void *aux, const char *name)
|
||||
{
|
||||
struct zsc_attach_args *args = aux;
|
||||
|
||||
|
@ -383,12 +370,9 @@ zs_ioasic_print(aux, name)
|
|||
return (UNCONF);
|
||||
}
|
||||
|
||||
int
|
||||
zs_ioasic_submatch(parent, cf, locs, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
const int *locs;
|
||||
void *aux;
|
||||
static int
|
||||
zs_ioasic_submatch(struct device *parent, struct cfdata *cf, const int *locs,
|
||||
void *aux)
|
||||
{
|
||||
struct zsc_softc *zs = (void *)parent;
|
||||
struct zsc_attach_args *pa = aux;
|
||||
|
@ -431,9 +415,8 @@ zs_ioasic_submatch(parent, cf, locs, aux)
|
|||
/*
|
||||
* Hardware interrupt handler.
|
||||
*/
|
||||
int
|
||||
zs_ioasic_hardintr(arg)
|
||||
void *arg;
|
||||
static int
|
||||
zs_ioasic_hardintr(void *arg)
|
||||
{
|
||||
struct zsc_softc *zsc = arg;
|
||||
|
||||
|
@ -455,9 +438,8 @@ zs_ioasic_hardintr(arg)
|
|||
/*
|
||||
* Software-level interrupt (character processing, lower priority).
|
||||
*/
|
||||
void
|
||||
zs_ioasic_softintr(arg)
|
||||
void *arg;
|
||||
static void
|
||||
zs_ioasic_softintr(void *arg)
|
||||
{
|
||||
struct zsc_softc *zsc = arg;
|
||||
int s;
|
||||
|
@ -471,9 +453,7 @@ zs_ioasic_softintr(arg)
|
|||
* MD functions for setting the baud rate and control modes.
|
||||
*/
|
||||
int
|
||||
zs_set_speed(cs, bps)
|
||||
struct zs_chanstate *cs;
|
||||
int bps; /* bits per second */
|
||||
zs_set_speed(struct zs_chanstate *cs, int bps /*bits per second*/)
|
||||
{
|
||||
int tconst, real_bps;
|
||||
|
||||
|
@ -504,9 +484,7 @@ zs_set_speed(cs, bps)
|
|||
}
|
||||
|
||||
int
|
||||
zs_set_modes(cs, cflag)
|
||||
struct zs_chanstate *cs;
|
||||
int cflag; /* bits per second */
|
||||
zs_set_modes(struct zs_chanstate *cs, int cflag)
|
||||
{
|
||||
u_long privflags = (u_long)cs->cs_private;
|
||||
int s;
|
||||
|
@ -568,9 +546,7 @@ zs_set_modes(cs, cflag)
|
|||
#endif
|
||||
|
||||
u_int
|
||||
zs_read_reg(cs, reg)
|
||||
struct zs_chanstate *cs;
|
||||
u_int reg;
|
||||
zs_read_reg(struct zs_chanstate *cs, u_int reg)
|
||||
{
|
||||
volatile struct zshan *zc = (volatile void *)cs->cs_reg_csr;
|
||||
unsigned val;
|
||||
|
@ -585,9 +561,7 @@ zs_read_reg(cs, reg)
|
|||
}
|
||||
|
||||
void
|
||||
zs_write_reg(cs, reg, val)
|
||||
struct zs_chanstate *cs;
|
||||
u_int reg, val;
|
||||
zs_write_reg(struct zs_chanstate *cs, u_int reg, u_int val)
|
||||
{
|
||||
volatile struct zshan *zc = (volatile void *)cs->cs_reg_csr;
|
||||
|
||||
|
@ -600,8 +574,7 @@ zs_write_reg(cs, reg, val)
|
|||
}
|
||||
|
||||
u_int
|
||||
zs_read_csr(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zs_read_csr(struct zs_chanstate *cs)
|
||||
{
|
||||
volatile struct zshan *zc = (volatile void *)cs->cs_reg_csr;
|
||||
unsigned val;
|
||||
|
@ -613,9 +586,7 @@ zs_read_csr(cs)
|
|||
}
|
||||
|
||||
void
|
||||
zs_write_csr(cs, val)
|
||||
struct zs_chanstate *cs;
|
||||
u_int val;
|
||||
zs_write_csr(struct zs_chanstate *cs, u_int val)
|
||||
{
|
||||
volatile struct zshan *zc = (volatile void *)cs->cs_reg_csr;
|
||||
|
||||
|
@ -625,8 +596,7 @@ zs_write_csr(cs, val)
|
|||
}
|
||||
|
||||
u_int
|
||||
zs_read_data(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zs_read_data(struct zs_chanstate *cs)
|
||||
{
|
||||
volatile struct zshan *zc = (volatile void *)cs->cs_reg_csr;
|
||||
unsigned val;
|
||||
|
@ -638,9 +608,7 @@ zs_read_data(cs)
|
|||
}
|
||||
|
||||
void
|
||||
zs_write_data(cs, val)
|
||||
struct zs_chanstate *cs;
|
||||
u_int val;
|
||||
zs_write_data(struct zs_chanstate *cs, u_int val)
|
||||
{
|
||||
volatile struct zshan *zc = (volatile void *)cs->cs_reg_csr;
|
||||
|
||||
|
@ -657,8 +625,7 @@ zs_write_data(cs, val)
|
|||
* Handle user request to enter kernel debugger.
|
||||
*/
|
||||
void
|
||||
zs_abort(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zs_abort(struct zs_chanstate *cs)
|
||||
{
|
||||
int rr0;
|
||||
|
||||
|
@ -681,8 +648,7 @@ zs_abort(cs)
|
|||
* Polled input char.
|
||||
*/
|
||||
int
|
||||
zs_getc(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zs_getc(struct zs_chanstate *cs)
|
||||
{
|
||||
int s, c, rr0;
|
||||
|
||||
|
@ -705,10 +671,8 @@ zs_getc(cs)
|
|||
/*
|
||||
* Polled output char.
|
||||
*/
|
||||
void
|
||||
zs_putc(cs, c)
|
||||
struct zs_chanstate *cs;
|
||||
int c;
|
||||
static void
|
||||
zs_putc(struct zs_chanstate *cs, int c)
|
||||
{
|
||||
register int s, rr0;
|
||||
|
||||
|
@ -734,11 +698,8 @@ zs_putc(cs, c)
|
|||
* Initialize the serial channel for either a keyboard or
|
||||
* a serial console.
|
||||
*/
|
||||
void
|
||||
zs_ioasic_cninit(ioasic_addr, zs_offset, channel)
|
||||
tc_addr_t ioasic_addr;
|
||||
tc_offset_t zs_offset;
|
||||
int channel;
|
||||
static void
|
||||
zs_ioasic_cninit(tc_addr_t ioasic_addr, tc_offset_t zs_offset, int channel)
|
||||
{
|
||||
struct zs_chanstate *cs;
|
||||
tc_addr_t zs_addr;
|
||||
|
@ -809,10 +770,7 @@ zs_ioasic_cninit(ioasic_addr, zs_offset, channel)
|
|||
* Initialize and attach a serial console.
|
||||
*/
|
||||
void
|
||||
zs_ioasic_cnattach(ioasic_addr, zs_offset, channel)
|
||||
tc_addr_t ioasic_addr;
|
||||
tc_offset_t zs_offset;
|
||||
int channel;
|
||||
zs_ioasic_cnattach(tc_addr_t ioasic_addr, tc_offset_t zs_offset, int channel)
|
||||
{
|
||||
struct zs_chanstate *cs = &zs_ioasic_conschanstate_store;
|
||||
extern const struct cdevsw zstty_cdevsw;
|
||||
|
@ -833,10 +791,8 @@ zs_ioasic_cnattach(ioasic_addr, zs_offset, channel)
|
|||
* Initialize and attach a keyboard.
|
||||
*/
|
||||
int
|
||||
zs_ioasic_lk201_cnattach(ioasic_addr, zs_offset, channel)
|
||||
tc_addr_t ioasic_addr;
|
||||
tc_offset_t zs_offset;
|
||||
int channel;
|
||||
zs_ioasic_lk201_cnattach(tc_addr_t ioasic_addr, tc_offset_t zs_offset,
|
||||
int channel)
|
||||
{
|
||||
#if (NZSKBD > 0)
|
||||
struct zs_chanstate *cs = &zs_ioasic_conschanstate_store;
|
||||
|
@ -850,10 +806,8 @@ zs_ioasic_lk201_cnattach(ioasic_addr, zs_offset, channel)
|
|||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
zs_ioasic_isconsole(offset, channel)
|
||||
tc_offset_t offset;
|
||||
int channel;
|
||||
static int
|
||||
zs_ioasic_isconsole(tc_offset_t offset, int channel)
|
||||
{
|
||||
|
||||
if (zs_ioasic_console &&
|
||||
|
@ -867,9 +821,8 @@ zs_ioasic_isconsole(offset, channel)
|
|||
/*
|
||||
* Polled console input putchar.
|
||||
*/
|
||||
int
|
||||
zs_ioasic_cngetc(dev)
|
||||
dev_t dev;
|
||||
static int
|
||||
zs_ioasic_cngetc(dev_t dev)
|
||||
{
|
||||
|
||||
return (zs_getc(&zs_ioasic_conschanstate_store));
|
||||
|
@ -878,10 +831,8 @@ zs_ioasic_cngetc(dev)
|
|||
/*
|
||||
* Polled console output putchar.
|
||||
*/
|
||||
void
|
||||
zs_ioasic_cnputc(dev, c)
|
||||
dev_t dev;
|
||||
int c;
|
||||
static void
|
||||
zs_ioasic_cnputc(dev_t dev, int c)
|
||||
{
|
||||
|
||||
zs_putc(&zs_ioasic_conschanstate_store, c);
|
||||
|
@ -890,10 +841,8 @@ zs_ioasic_cnputc(dev, c)
|
|||
/*
|
||||
* Set polling/no polling on console.
|
||||
*/
|
||||
void
|
||||
zs_ioasic_cnpollc(dev, onoff)
|
||||
dev_t dev;
|
||||
int onoff;
|
||||
static void
|
||||
zs_ioasic_cnpollc(dev_t dev, int onoff)
|
||||
{
|
||||
|
||||
/* XXX ??? */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zskbd.c,v 1.13 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: zskbd.c,v 1.14 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.13 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zskbd.c,v 1.14 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -90,7 +90,7 @@ struct zskbd_internal {
|
|||
struct lk201_state zsi_ks;
|
||||
};
|
||||
|
||||
struct zskbd_internal zskbd_console_internal;
|
||||
static struct zskbd_internal zskbd_console_internal;
|
||||
|
||||
struct zskbd_softc {
|
||||
struct device zskbd_dev; /* required first: base device */
|
||||
|
@ -116,7 +116,7 @@ struct zskbd_softc {
|
|||
struct device *sc_wskbddev;
|
||||
};
|
||||
|
||||
struct zsops zsops_zskbd;
|
||||
static struct zsops zsops_zskbd;
|
||||
|
||||
static void zskbd_input(struct zskbd_softc *, int);
|
||||
|
||||
|
@ -130,7 +130,7 @@ static int zskbd_enable(void *, int);
|
|||
static void zskbd_set_leds(void *, int);
|
||||
static int zskbd_ioctl(void *, u_long, caddr_t, int, struct lwp *);
|
||||
|
||||
const struct wskbd_accessops zskbd_accessops = {
|
||||
static const struct wskbd_accessops zskbd_accessops = {
|
||||
zskbd_enable,
|
||||
zskbd_set_leds,
|
||||
zskbd_ioctl,
|
||||
|
@ -139,14 +139,14 @@ const struct wskbd_accessops zskbd_accessops = {
|
|||
static void zskbd_cngetc(void *, u_int *, int *);
|
||||
static void zskbd_cnpollc(void *, int);
|
||||
|
||||
const struct wskbd_consops zskbd_consops = {
|
||||
static const struct wskbd_consops zskbd_consops = {
|
||||
zskbd_cngetc,
|
||||
zskbd_cnpollc,
|
||||
};
|
||||
|
||||
static int zskbd_sendchar(void *, u_char);
|
||||
static int zskbd_sendchar(void *, u_char);
|
||||
|
||||
const struct wskbd_mapdata zskbd_keymapdata = {
|
||||
static const struct wskbd_mapdata zskbd_keymapdata = {
|
||||
lkkbd_keydesctab,
|
||||
#ifdef ZSKBD_LAYOUT
|
||||
ZSKBD_LAYOUT,
|
||||
|
@ -161,10 +161,7 @@ int zskbd_cnattach(struct zs_chanstate *); /* EXPORTED */
|
|||
* kbd_match: how is this zs channel configured?
|
||||
*/
|
||||
static int
|
||||
zskbd_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
zskbd_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct zsc_attach_args *args = aux;
|
||||
|
||||
|
@ -180,9 +177,7 @@ zskbd_match(parent, cf, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
zskbd_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
zskbd_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct zsc_softc *zsc = device_private(parent);
|
||||
struct zskbd_softc *zskbd = device_private(self);
|
||||
|
@ -241,8 +236,7 @@ zskbd_attach(parent, self, aux)
|
|||
}
|
||||
|
||||
int
|
||||
zskbd_cnattach(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zskbd_cnattach(struct zs_chanstate *cs)
|
||||
{
|
||||
(void) zs_set_speed(cs, ZSKBD_BPS);
|
||||
zs_loadchannelregs(cs);
|
||||
|
@ -259,9 +253,7 @@ zskbd_cnattach(cs)
|
|||
}
|
||||
|
||||
static int
|
||||
zskbd_enable(v, on)
|
||||
void *v;
|
||||
int on;
|
||||
zskbd_enable(void *v, int on)
|
||||
{
|
||||
struct zskbd_softc *sc = v;
|
||||
|
||||
|
@ -270,9 +262,7 @@ zskbd_enable(v, on)
|
|||
}
|
||||
|
||||
static int
|
||||
zskbd_sendchar(v, c)
|
||||
void *v;
|
||||
u_char c;
|
||||
zskbd_sendchar(void *v, u_char c)
|
||||
{
|
||||
struct zs_chanstate *cs = v;
|
||||
zs_write_data(cs, c);
|
||||
|
@ -282,10 +272,7 @@ zskbd_sendchar(v, c)
|
|||
}
|
||||
|
||||
static void
|
||||
zskbd_cngetc(v, type, data)
|
||||
void *v;
|
||||
u_int *type;
|
||||
int *data;
|
||||
zskbd_cngetc(void *v, u_int *type, int *data)
|
||||
{
|
||||
struct zskbd_internal *zsi = v;
|
||||
int c;
|
||||
|
@ -296,9 +283,7 @@ zskbd_cngetc(v, type, data)
|
|||
}
|
||||
|
||||
static void
|
||||
zskbd_cnpollc(v, on)
|
||||
void *v;
|
||||
int on;
|
||||
zskbd_cnpollc(void *v, int on)
|
||||
{
|
||||
#if 0
|
||||
struct zskbd_internal *zsi = v;
|
||||
|
@ -306,9 +291,7 @@ zskbd_cnpollc(v, on)
|
|||
}
|
||||
|
||||
static void
|
||||
zskbd_set_leds(v, leds)
|
||||
void *v;
|
||||
int leds;
|
||||
zskbd_set_leds(void *v, int leds)
|
||||
{
|
||||
struct zskbd_softc *sc = (struct zskbd_softc *)v;
|
||||
|
||||
|
@ -316,12 +299,7 @@ zskbd_set_leds(v, leds)
|
|||
}
|
||||
|
||||
static int
|
||||
zskbd_ioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct lwp *l;
|
||||
zskbd_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
struct zskbd_softc *sc = (struct zskbd_softc *)v;
|
||||
|
||||
|
@ -352,9 +330,7 @@ zskbd_ioctl(v, cmd, data, flag, l)
|
|||
}
|
||||
|
||||
static void
|
||||
zskbd_input(sc, data)
|
||||
struct zskbd_softc *sc;
|
||||
int data;
|
||||
zskbd_input(struct zskbd_softc *sc, int data)
|
||||
{
|
||||
u_int type;
|
||||
int val;
|
||||
|
@ -376,8 +352,7 @@ static void zskbd_txint(struct zs_chanstate *);
|
|||
static void zskbd_softint(struct zs_chanstate *);
|
||||
|
||||
static void
|
||||
zskbd_rxint(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zskbd_rxint(struct zs_chanstate *cs)
|
||||
{
|
||||
struct zskbd_softc *zskbd;
|
||||
int put, put_next;
|
||||
|
@ -417,8 +392,7 @@ zskbd_rxint(cs)
|
|||
|
||||
|
||||
static void
|
||||
zskbd_txint(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zskbd_txint(struct zs_chanstate *cs)
|
||||
{
|
||||
struct zskbd_softc *zskbd;
|
||||
|
||||
|
@ -431,9 +405,7 @@ zskbd_txint(cs)
|
|||
|
||||
|
||||
static void
|
||||
zskbd_stint(cs, force)
|
||||
struct zs_chanstate *cs;
|
||||
int force;
|
||||
zskbd_stint(struct zs_chanstate *cs, int force)
|
||||
{
|
||||
struct zskbd_softc *zskbd;
|
||||
int rr0;
|
||||
|
@ -460,8 +432,7 @@ zskbd_stint(cs, force)
|
|||
|
||||
|
||||
static void
|
||||
zskbd_softint(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zskbd_softint(struct zs_chanstate *cs)
|
||||
{
|
||||
struct zskbd_softc *zskbd;
|
||||
int get, c, s;
|
||||
|
@ -532,7 +503,7 @@ zskbd_softint(cs)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
struct zsops zsops_zskbd = {
|
||||
static struct zsops zsops_zskbd = {
|
||||
zskbd_rxint, /* receive char available */
|
||||
zskbd_stint, /* external/status */
|
||||
zskbd_txint, /* xmit buffer empty */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zsms.c,v 1.13 2006/03/30 16:18:49 thorpej Exp $ */
|
||||
/* $NetBSD: zsms.c,v 1.14 2006/03/31 17:39:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -45,7 +45,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: zsms.c,v 1.13 2006/03/30 16:18:49 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: zsms.c,v 1.14 2006/03/31 17:39:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -108,7 +108,7 @@ struct zsms_softc { /* driver status information */
|
|||
struct device *sc_wsmousedev;
|
||||
};
|
||||
|
||||
struct zsops zsops_zsms;
|
||||
static struct zsops zsops_zsms;
|
||||
|
||||
static int zsms_match(struct device *, struct cfdata *, void *);
|
||||
static void zsms_attach(struct device *, struct device *, void *);
|
||||
|
@ -121,17 +121,14 @@ static int zsms_enable(void *);
|
|||
static int zsms_ioctl(void *, u_long, caddr_t, int, struct lwp *);
|
||||
static void zsms_disable(void *);
|
||||
|
||||
const struct wsmouse_accessops zsms_accessops = {
|
||||
static const struct wsmouse_accessops zsms_accessops = {
|
||||
zsms_enable,
|
||||
zsms_ioctl,
|
||||
zsms_disable,
|
||||
};
|
||||
|
||||
static int
|
||||
zsms_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
struct cfdata *cf;
|
||||
void *aux;
|
||||
zsms_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct zsc_attach_args *args = aux;
|
||||
|
||||
|
@ -147,9 +144,7 @@ zsms_match(parent, cf, aux)
|
|||
}
|
||||
|
||||
static void
|
||||
zsms_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
zsms_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct zsc_softc *zsc = device_private(parent);
|
||||
struct zsms_softc *zsms = device_private(self);
|
||||
|
@ -190,8 +185,7 @@ zsms_attach(parent, self, aux)
|
|||
}
|
||||
|
||||
static int
|
||||
zsms_enable(v)
|
||||
void *v;
|
||||
zsms_enable(void *v)
|
||||
{
|
||||
struct zsms_softc *sc = v;
|
||||
|
||||
|
@ -213,8 +207,7 @@ zsms_enable(v)
|
|||
}
|
||||
|
||||
static void
|
||||
zsms_disable(v)
|
||||
void *v;
|
||||
zsms_disable(void *v)
|
||||
{
|
||||
struct zsms_softc *sc = v;
|
||||
|
||||
|
@ -222,12 +215,7 @@ zsms_disable(v)
|
|||
}
|
||||
|
||||
static int
|
||||
zsms_ioctl(v, cmd, data, flag, l)
|
||||
void *v;
|
||||
u_long cmd;
|
||||
caddr_t data;
|
||||
int flag;
|
||||
struct lwp *l;
|
||||
zsms_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
{
|
||||
|
||||
if (cmd == WSMOUSEIO_GTYPE) {
|
||||
|
@ -238,9 +226,7 @@ zsms_ioctl(v, cmd, data, flag, l)
|
|||
}
|
||||
|
||||
static void
|
||||
zsms_input(vsc, data)
|
||||
void *vsc;
|
||||
int data;
|
||||
zsms_input(void *vsc, int data)
|
||||
{
|
||||
struct zsms_softc *sc = vsc;
|
||||
|
||||
|
@ -295,8 +281,7 @@ static void zsms_txint(struct zs_chanstate *);
|
|||
static void zsms_softint(struct zs_chanstate *);
|
||||
|
||||
static void
|
||||
zsms_rxint(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zsms_rxint(struct zs_chanstate *cs)
|
||||
{
|
||||
struct zsms_softc *zsms;
|
||||
int put, put_next;
|
||||
|
@ -336,8 +321,7 @@ zsms_rxint(cs)
|
|||
|
||||
|
||||
static void
|
||||
zsms_txint(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zsms_txint(struct zs_chanstate *cs)
|
||||
{
|
||||
struct zsms_softc *zsms;
|
||||
|
||||
|
@ -350,9 +334,7 @@ zsms_txint(cs)
|
|||
|
||||
|
||||
static void
|
||||
zsms_stint(cs, force)
|
||||
struct zs_chanstate *cs;
|
||||
int force;
|
||||
zsms_stint(struct zs_chanstate *cs, int force)
|
||||
{
|
||||
struct zsms_softc *zsms;
|
||||
int rr0;
|
||||
|
@ -379,8 +361,7 @@ zsms_stint(cs, force)
|
|||
|
||||
|
||||
static void
|
||||
zsms_softint(cs)
|
||||
struct zs_chanstate *cs;
|
||||
zsms_softint(struct zs_chanstate *cs)
|
||||
{
|
||||
struct zsms_softc *zsms;
|
||||
int get, c, s;
|
||||
|
@ -445,7 +426,7 @@ zsms_softint(cs)
|
|||
splx(s);
|
||||
}
|
||||
|
||||
struct zsops zsops_zsms = {
|
||||
static struct zsops zsops_zsms = {
|
||||
zsms_rxint, /* receive char available */
|
||||
zsms_stint, /* external/status */
|
||||
zsms_txint, /* xmit buffer empty */
|
||||
|
|
Loading…
Reference in New Issue