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