Liberally sprinkle static around to get more symbols out of the
global namespace. A small bit of const poisoning in the TC code.
This commit is contained in:
parent
e2840100a9
commit
b7b2b8a3d8
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bus_dma.c,v 1.71 2020/11/18 02:04:29 thorpej Exp $ */
|
||||
/* $NetBSD: bus_dma.c,v 1.72 2021/05/07 16:58:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71 2020/11/18 02:04:29 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.72 2021/05/07 16:58:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -50,9 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.71 2020/11/18 02:04:29 thorpej Exp $")
|
||||
|
||||
#include <dev/bus_dma/bus_dmamem_common.h>
|
||||
|
||||
int _bus_dmamap_load_buffer_direct(bus_dma_tag_t,
|
||||
bus_dmamap_t, void *, bus_size_t, struct vmspace *, int,
|
||||
paddr_t *, int *, int);
|
||||
static int _bus_dmamap_load_buffer_direct(bus_dma_tag_t,
|
||||
bus_dmamap_t, void *, bus_size_t, struct vmspace *, int,
|
||||
paddr_t *, int *, int);
|
||||
|
||||
extern paddr_t avail_start, avail_end; /* from pmap.c */
|
||||
|
||||
@ -129,7 +129,7 @@ _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
* the starting segment on entrance, and the ending segment on exit.
|
||||
* first indicates if this is the first invocation of this function.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
_bus_dmamap_load_buffer_direct(bus_dma_tag_t t, bus_dmamap_t map,
|
||||
void *buf, size_t buflen, struct vmspace *vm, int flags, paddr_t *lastaddrp,
|
||||
int *segp, int first)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: shared_intr.c,v 1.26 2020/09/26 02:35:31 thorpej Exp $ */
|
||||
/* $NetBSD: shared_intr.c,v 1.27 2021/05/07 16:58:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2020 The NetBSD Foundation, Inc.
|
||||
@ -62,7 +62,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.26 2020/09/26 02:35:31 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.27 2021/05/07 16:58:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -76,8 +76,6 @@ __KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.26 2020/09/26 02:35:31 thorpej Exp
|
||||
#include <sys/intr.h>
|
||||
#include <sys/xcall.h>
|
||||
|
||||
static const char *intr_typename(int);
|
||||
|
||||
static const char *
|
||||
intr_typename(int type)
|
||||
{
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isa_machdep.c,v 1.21 2012/02/06 02:14:13 matt Exp $ */
|
||||
/* $NetBSD: isa_machdep.c,v 1.22 2021/05/07 16:58:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.21 2012/02/06 02:14:13 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.22 2021/05/07 16:58:33 thorpej Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -55,8 +55,8 @@ __KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.21 2012/02/06 02:14:13 matt Exp $"
|
||||
#if (NPCPPI > 0)
|
||||
#include <dev/isa/pcppivar.h>
|
||||
|
||||
int isabeepmatch(device_t, cfdata_t, void *);
|
||||
void isabeepattach(device_t, device_t, void *);
|
||||
static int isabeepmatch(device_t, cfdata_t, void *);
|
||||
static void isabeepattach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(isabeep, 0,
|
||||
isabeepmatch, isabeepattach, NULL, NULL);
|
||||
@ -78,13 +78,13 @@ isa_display_console(bus_space_tag_t iot, bus_space_tag_t memt)
|
||||
}
|
||||
|
||||
#if (NPCPPI > 0)
|
||||
int
|
||||
static int
|
||||
isabeepmatch(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
return (!ppi_attached);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
isabeepattach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
printf("\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: isadma_bounce.c,v 1.14 2020/11/18 02:04:29 thorpej Exp $ */
|
||||
/* $NetBSD: isadma_bounce.c,v 1.15 2021/05/07 16:58:33 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.14 2020/11/18 02:04:29 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: isadma_bounce.c,v 1.15 2021/05/07 16:58:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -86,9 +86,9 @@ struct isadma_bounce_cookie {
|
||||
#define ID_BUFTYPE_UIO 3
|
||||
#define ID_BUFTYPE_RAW 4
|
||||
|
||||
int isadma_bounce_alloc_bouncebuf(bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_size_t, int);
|
||||
void isadma_bounce_free_bouncebuf(bus_dma_tag_t, bus_dmamap_t);
|
||||
static int isadma_bounce_alloc_bouncebuf(bus_dma_tag_t, bus_dmamap_t,
|
||||
bus_size_t, int);
|
||||
static void isadma_bounce_free_bouncebuf(bus_dma_tag_t, bus_dmamap_t);
|
||||
|
||||
/*
|
||||
* Returns true if the system memory configuration exceeds the
|
||||
@ -577,7 +577,7 @@ isadma_bounce_dmamem_alloc(bus_dma_tag_t t, bus_size_t size,
|
||||
* ISA DMA utility functions
|
||||
**********************************************************************/
|
||||
|
||||
int
|
||||
static int
|
||||
isadma_bounce_alloc_bouncebuf(bus_dma_tag_t t, bus_dmamap_t map,
|
||||
bus_size_t size, int flags)
|
||||
{
|
||||
@ -606,7 +606,7 @@ isadma_bounce_alloc_bouncebuf(bus_dma_tag_t t, bus_dmamap_t map,
|
||||
return (error);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
isadma_bounce_free_bouncebuf(bus_dma_tag_t t, bus_dmamap_t map)
|
||||
{
|
||||
struct isadma_bounce_cookie *cookie = map->_dm_cookie;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcclock_isa.c,v 1.20 2011/07/01 19:22:35 dyoung Exp $ */
|
||||
/* $NetBSD: mcclock_isa.c,v 1.21 2021/05/07 16:58:33 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.20 2011/07/01 19:22:35 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.21 2021/05/07 16:58:33 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -46,16 +46,16 @@ __KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.20 2011/07/01 19:22:35 dyoung Exp
|
||||
|
||||
#include <alpha/alpha/mcclockvar.h>
|
||||
|
||||
int mcclock_isa_match(device_t, cfdata_t, void *);
|
||||
void mcclock_isa_attach(device_t, device_t, void *);
|
||||
static int mcclock_isa_match(device_t, cfdata_t, void *);
|
||||
static void mcclock_isa_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(mcclock_isa, sizeof(struct mc146818_softc),
|
||||
mcclock_isa_match, mcclock_isa_attach, NULL, NULL);
|
||||
|
||||
void mcclock_isa_write(struct mc146818_softc *, u_int, u_int);
|
||||
u_int mcclock_isa_read(struct mc146818_softc *, u_int);
|
||||
static void mcclock_isa_write(struct mc146818_softc *, u_int, u_int);
|
||||
static u_int mcclock_isa_read(struct mc146818_softc *, u_int);
|
||||
|
||||
int
|
||||
static int
|
||||
mcclock_isa_match(device_t parent, cfdata_t cf, void *aux)
|
||||
{
|
||||
struct isa_attach_args *ia = aux;
|
||||
@ -94,7 +94,7 @@ mcclock_isa_match(device_t parent, cfdata_t cf, void *aux)
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mcclock_isa_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct mc146818_softc *sc = device_private(self);
|
||||
@ -112,7 +112,7 @@ mcclock_isa_attach(device_t parent, device_t self, void *aux)
|
||||
mcclock_attach(sc);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mcclock_isa_write(struct mc146818_softc *sc, u_int reg, u_int datum)
|
||||
{
|
||||
bus_space_tag_t iot = sc->sc_bst;
|
||||
@ -122,7 +122,7 @@ mcclock_isa_write(struct mc146818_softc *sc, u_int reg, u_int datum)
|
||||
bus_space_write_1(iot, ioh, 1, datum);
|
||||
}
|
||||
|
||||
u_int
|
||||
static u_int
|
||||
mcclock_isa_read(struct mc146818_softc *sc, u_int reg)
|
||||
{
|
||||
bus_space_tag_t iot = sc->sc_bst;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com_jensenio.c,v 1.18 2020/09/25 03:40:11 thorpej Exp $ */
|
||||
/* $NetBSD: com_jensenio.c,v 1.19 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: com_jensenio.c,v 1.18 2020/09/25 03:40:11 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: com_jensenio.c,v 1.19 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -67,13 +67,13 @@ struct com_jensenio_softc {
|
||||
struct jensenio_scb_intrhand sc_jih;
|
||||
};
|
||||
|
||||
int com_jensenio_match(device_t, cfdata_t , void *);
|
||||
void com_jensenio_attach(device_t, device_t, void *);
|
||||
static int com_jensenio_match(device_t, cfdata_t , void *);
|
||||
static void com_jensenio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(com_jensenio, sizeof(struct com_jensenio_softc),
|
||||
com_jensenio_match, com_jensenio_attach, NULL, NULL);
|
||||
|
||||
int
|
||||
static int
|
||||
com_jensenio_match(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct jensenio_attach_args *ja = aux;
|
||||
@ -85,7 +85,7 @@ com_jensenio_match(device_t parent, cfdata_t match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
com_jensenio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct com_jensenio_softc *jsc = device_private(self);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: jensenio.c,v 1.20 2021/04/24 23:36:23 thorpej Exp $ */
|
||||
/* $NetBSD: jensenio.c,v 1.21 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.20 2021/04/24 23:36:23 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.21 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -91,11 +91,11 @@ static int jensenio_attached;
|
||||
struct jensenio_config jensenio_configuration;
|
||||
|
||||
static void jensenio_eisa_attach_hook(device_t, device_t,
|
||||
struct eisabus_attach_args *);
|
||||
struct eisabus_attach_args *);
|
||||
static int jensenio_eisa_maxslots(void *);
|
||||
|
||||
static void jensenio_isa_attach_hook(device_t, device_t,
|
||||
struct isabus_attach_args *);
|
||||
struct isabus_attach_args *);
|
||||
|
||||
static void jensenio_isa_detach_hook(isa_chipset_tag_t, device_t);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: jensenio_dma.c,v 1.7 2020/10/14 00:59:50 thorpej Exp $ */
|
||||
/* $NetBSD: jensenio_dma.c,v 1.8 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2020 The NetBSD Foundation, Inc.
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: jensenio_dma.c,v 1.7 2020/10/14 00:59:50 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: jensenio_dma.c,v 1.8 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: jensenio_dma.c,v 1.7 2020/10/14 00:59:50 thorpej Exp
|
||||
|
||||
#include <machine/alpha.h>
|
||||
|
||||
bus_dma_tag_t jensenio_dma_get_tag(bus_dma_tag_t, alpha_bus_t);
|
||||
static bus_dma_tag_t jensenio_dma_get_tag(bus_dma_tag_t, alpha_bus_t);
|
||||
|
||||
void
|
||||
jensenio_page_physload(unsigned long const start_pfn,
|
||||
@ -144,7 +144,7 @@ jensenio_dma_init(struct jensenio_config *jcp)
|
||||
* Return the bus dma tag to be used for the specified bus type.
|
||||
* INTERNAL USE ONLY!
|
||||
*/
|
||||
bus_dma_tag_t
|
||||
static bus_dma_tag_t
|
||||
jensenio_dma_get_tag(bus_dma_tag_t t, alpha_bus_t bustype)
|
||||
{
|
||||
struct jensenio_config *jcp = t->_cookie;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: jensenio_intr.c,v 1.13 2020/09/25 03:40:11 thorpej Exp $ */
|
||||
/* $NetBSD: jensenio_intr.c,v 1.14 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.13 2020/09/25 03:40:11 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.14 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -56,26 +56,27 @@ static bus_space_tag_t pic_iot;
|
||||
static bus_space_handle_t pic_ioh[2];
|
||||
static bus_space_handle_t pic_elcr_ioh;
|
||||
|
||||
int jensenio_eisa_intr_map(void *, u_int, eisa_intr_handle_t *);
|
||||
const char *jensenio_eisa_intr_string(void *, int, char *, size_t);
|
||||
const struct evcnt *jensenio_eisa_intr_evcnt(void *, int);
|
||||
void *jensenio_eisa_intr_establish(void *, int, int, int,
|
||||
int (*)(void *), void *);
|
||||
void jensenio_eisa_intr_disestablish(void *, void *);
|
||||
int jensenio_eisa_intr_alloc(void *, int, int, int *);
|
||||
static int jensenio_eisa_intr_map(void *, u_int,
|
||||
eisa_intr_handle_t *);
|
||||
static const char * jensenio_eisa_intr_string(void *, int, char *, size_t);
|
||||
static const struct evcnt *jensenio_eisa_intr_evcnt(void *, int);
|
||||
static void * jensenio_eisa_intr_establish(void *, int, int, int,
|
||||
int (*)(void *), void *);
|
||||
static void jensenio_eisa_intr_disestablish(void *, void *);
|
||||
static int jensenio_eisa_intr_alloc(void *, int, int, int *);
|
||||
|
||||
#define JENSEN_MAX_IRQ 16
|
||||
#define JENSEN_MAX_IRQ_STR 16
|
||||
|
||||
struct alpha_shared_intr *jensenio_eisa_intr;
|
||||
static struct alpha_shared_intr *jensenio_eisa_intr;
|
||||
|
||||
void jensenio_iointr(void *, u_long);
|
||||
static void jensenio_iointr(void *, u_long);
|
||||
|
||||
void jensenio_enable_intr(int, int);
|
||||
void jensenio_setlevel(int, int);
|
||||
void jensenio_pic_init(void);
|
||||
static void jensenio_enable_intr(int, int);
|
||||
static void jensenio_setlevel(int, int);
|
||||
static void jensenio_pic_init(void);
|
||||
|
||||
const int jensenio_intr_deftype[JENSEN_MAX_IRQ] = {
|
||||
static const int jensenio_intr_deftype[JENSEN_MAX_IRQ] = {
|
||||
IST_EDGE, /* 0: interval timer 0 output */
|
||||
IST_EDGE, /* 1: line printer */
|
||||
IST_UNUSABLE, /* 2: (cascade) */
|
||||
@ -211,7 +212,7 @@ jensenio_intr_establish(struct jensenio_scb_intrhand *jih,
|
||||
mutex_exit(&cpu_lock);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
jensenio_eisa_intr_map(void *v, u_int eirq, eisa_intr_handle_t *ihp)
|
||||
{
|
||||
|
||||
@ -232,7 +233,7 @@ jensenio_eisa_intr_map(void *v, u_int eirq, eisa_intr_handle_t *ihp)
|
||||
return (0);
|
||||
}
|
||||
|
||||
const char *
|
||||
static const char *
|
||||
jensenio_eisa_intr_string(void *v, int eirq, char *buf, size_t len)
|
||||
{
|
||||
if (eirq >= JENSEN_MAX_IRQ)
|
||||
@ -242,7 +243,7 @@ jensenio_eisa_intr_string(void *v, int eirq, char *buf, size_t len)
|
||||
return buf;
|
||||
}
|
||||
|
||||
const struct evcnt *
|
||||
static const struct evcnt *
|
||||
jensenio_eisa_intr_evcnt(void *v, int eirq)
|
||||
{
|
||||
|
||||
@ -252,7 +253,7 @@ jensenio_eisa_intr_evcnt(void *v, int eirq)
|
||||
return (alpha_shared_intr_evcnt(jensenio_eisa_intr, eirq));
|
||||
}
|
||||
|
||||
void *
|
||||
static void *
|
||||
jensenio_eisa_intr_establish(void *v, int irq, int type, int level,
|
||||
int (*fn)(void *), void *arg)
|
||||
{
|
||||
@ -294,7 +295,7 @@ jensenio_eisa_intr_establish(void *v, int irq, int type, int level,
|
||||
return cookie;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
jensenio_eisa_intr_disestablish(void *v, void *cookie)
|
||||
{
|
||||
struct alpha_shared_intrhand *ih = cookie;
|
||||
@ -316,7 +317,7 @@ jensenio_eisa_intr_disestablish(void *v, void *cookie)
|
||||
alpha_shared_intr_free_intrhand(cookie);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
jensenio_eisa_intr_alloc(void *v, int mask, int type, int *rqp)
|
||||
{
|
||||
|
||||
@ -324,7 +325,7 @@ jensenio_eisa_intr_alloc(void *v, int mask, int type, int *rqp)
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
jensenio_iointr(void *framep, u_long vec)
|
||||
{
|
||||
int irq;
|
||||
@ -337,7 +338,7 @@ jensenio_iointr(void *framep, u_long vec)
|
||||
jensenio_specific_eoi(irq);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
jensenio_enable_intr(int irq, int onoff)
|
||||
{
|
||||
int pic;
|
||||
@ -371,7 +372,7 @@ jensenio_setlevel(int irq, int level)
|
||||
bus_space_write_1(pic_iot, pic_elcr_ioh, elcr, mask);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
jensenio_pic_init(void)
|
||||
{
|
||||
static const int picaddr[2] = { IO_ICU1, IO_ICU2 };
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lpt_jensenio.c,v 1.13 2014/03/29 19:28:25 christos Exp $ */
|
||||
/* $NetBSD: lpt_jensenio.c,v 1.14 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt_jensenio.c,v 1.13 2014/03/29 19:28:25 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt_jensenio.c,v 1.14 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -66,13 +66,13 @@ struct lpt_jensenio_softc {
|
||||
void *sc_ih; /* interrupt handler */
|
||||
};
|
||||
|
||||
int lpt_jensenio_match(device_t, cfdata_t , void *);
|
||||
void lpt_jensenio_attach(device_t, device_t, void *);
|
||||
static int lpt_jensenio_match(device_t, cfdata_t , void *);
|
||||
static void lpt_jensenio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(lpt_jensenio, sizeof(struct lpt_jensenio_softc),
|
||||
lpt_jensenio_match, lpt_jensenio_attach, NULL, NULL);
|
||||
|
||||
int
|
||||
static int
|
||||
lpt_jensenio_match(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct jensenio_attach_args *ja = aux;
|
||||
@ -84,7 +84,7 @@ lpt_jensenio_match(device_t parent, cfdata_t match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
lpt_jensenio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct lpt_jensenio_softc *jsc = device_private(self);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcclock_jensenio.c,v 1.10 2011/07/01 19:22:35 dyoung Exp $ */
|
||||
/* $NetBSD: mcclock_jensenio.c,v 1.11 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -58,7 +58,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_jensenio.c,v 1.10 2011/07/01 19:22:35 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_jensenio.c,v 1.11 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -82,17 +82,17 @@ struct mcclock_jensenio_softc {
|
||||
bus_space_handle_t sc_std_rtc_ioh;
|
||||
};
|
||||
|
||||
int mcclock_jensenio_match(device_t, cfdata_t, void *);
|
||||
void mcclock_jensenio_attach(device_t, device_t, void *);
|
||||
static int mcclock_jensenio_match(device_t, cfdata_t, void *);
|
||||
static void mcclock_jensenio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(mcclock_jensenio, sizeof(struct mcclock_jensenio_softc),
|
||||
mcclock_jensenio_match, mcclock_jensenio_attach, NULL, NULL);
|
||||
|
||||
void mcclock_jensenio_write(struct mc146818_softc *, u_int, u_int);
|
||||
u_int mcclock_jensenio_read(struct mc146818_softc *, u_int);
|
||||
static void mcclock_jensenio_write(struct mc146818_softc *, u_int, u_int);
|
||||
static u_int mcclock_jensenio_read(struct mc146818_softc *, u_int);
|
||||
|
||||
|
||||
int
|
||||
static int
|
||||
mcclock_jensenio_match(device_t parent, cfdata_t cf, void *aux)
|
||||
{
|
||||
struct jensenio_attach_args *ja = aux;
|
||||
@ -104,7 +104,7 @@ mcclock_jensenio_match(device_t parent, cfdata_t cf, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mcclock_jensenio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct mcclock_jensenio_softc *jsc = device_private(self);
|
||||
@ -130,7 +130,7 @@ mcclock_jensenio_attach(device_t parent, device_t self, void *aux)
|
||||
mcclock_attach(sc);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mcclock_jensenio_write(struct mc146818_softc *sc, u_int reg, u_int datum)
|
||||
{
|
||||
bus_space_tag_t iot = sc->sc_bst;
|
||||
@ -140,7 +140,7 @@ mcclock_jensenio_write(struct mc146818_softc *sc, u_int reg, u_int datum)
|
||||
bus_space_write_1(iot, ioh, 1, datum);
|
||||
}
|
||||
|
||||
u_int
|
||||
static u_int
|
||||
mcclock_jensenio_read(struct mc146818_softc *sc, u_int reg)
|
||||
{
|
||||
bus_space_tag_t iot = sc->sc_bst;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pckbc_jensenio.c,v 1.15 2020/11/18 02:04:29 thorpej Exp $ */
|
||||
/* $NetBSD: pckbc_jensenio.c,v 1.16 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pckbc_jensenio.c,v 1.15 2020/11/18 02:04:29 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pckbc_jensenio.c,v 1.16 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -61,15 +61,16 @@ struct pckbc_jensenio_softc {
|
||||
struct jensenio_scb_intrhand sc_jih[PCKBC_NSLOTS];
|
||||
};
|
||||
|
||||
int pckbc_jensenio_match(device_t, cfdata_t, void *);
|
||||
void pckbc_jensenio_attach(device_t, device_t, void *);
|
||||
static int pckbc_jensenio_match(device_t, cfdata_t, void *);
|
||||
static void pckbc_jensenio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(pckbc_jensenio, sizeof(struct pckbc_jensenio_softc),
|
||||
pckbc_jensenio_match, pckbc_jensenio_attach, NULL, NULL);
|
||||
|
||||
void pckbc_jensenio_intr_establish(struct pckbc_softc *, pckbc_slot_t);
|
||||
static void pckbc_jensenio_intr_establish(struct pckbc_softc *,
|
||||
pckbc_slot_t);
|
||||
|
||||
int
|
||||
static int
|
||||
pckbc_jensenio_match(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct jensenio_attach_args *ja = aux;
|
||||
@ -81,7 +82,7 @@ pckbc_jensenio_match(device_t parent, cfdata_t match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pckbc_jensenio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct pckbc_jensenio_softc *jsc = device_private(self);
|
||||
@ -128,7 +129,7 @@ pckbc_jensenio_attach(device_t parent, device_t self, void *aux)
|
||||
pckbc_attach(sc);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pckbc_jensenio_intr_establish(struct pckbc_softc *sc, pckbc_slot_t slot)
|
||||
{
|
||||
struct pckbc_jensenio_softc *jsc = (void *) sc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: apecs_pci.c,v 1.26 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: apecs_pci.c,v 1.27 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.26 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.27 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -41,13 +41,13 @@ __KERNEL_RCSID(0, "$NetBSD: apecs_pci.c,v 1.26 2015/10/02 05:22:49 msaitoh Exp $
|
||||
#include <alpha/pci/apecsreg.h>
|
||||
#include <alpha/pci/apecsvar.h>
|
||||
|
||||
void apecs_attach_hook(device_t, device_t,
|
||||
static void apecs_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
int apecs_bus_maxdevs(void *, int);
|
||||
pcitag_t apecs_make_tag(void *, int, int, int);
|
||||
void apecs_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
pcireg_t apecs_conf_read(void *, pcitag_t, int);
|
||||
void apecs_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static int apecs_bus_maxdevs(void *, int);
|
||||
static pcitag_t apecs_make_tag(void *, int, int, int);
|
||||
static void apecs_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
static pcireg_t apecs_conf_read(void *, pcitag_t, int);
|
||||
static void apecs_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
void
|
||||
apecs_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
@ -62,26 +62,26 @@ apecs_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
pc->pc_conf_write = apecs_conf_write;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
apecs_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
apecs_bus_maxdevs(void *cpv, int busno)
|
||||
{
|
||||
|
||||
return 32;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
static pcitag_t
|
||||
apecs_make_tag(void *cpv, int b, int d, int f)
|
||||
{
|
||||
|
||||
return (b << 16) | (d << 11) | (f << 8);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
apecs_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
|
||||
@ -93,7 +93,7 @@ apecs_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
*fp = (tag >> 8) & 0x7;
|
||||
}
|
||||
|
||||
pcireg_t
|
||||
static pcireg_t
|
||||
apecs_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
{
|
||||
struct apecs_config *acp = cpv;
|
||||
@ -141,7 +141,7 @@ apecs_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
return data;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
apecs_conf_write(void *cpv, pcitag_t tag, int offset, pcireg_t data)
|
||||
{
|
||||
struct apecs_config *acp = cpv;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cia_pci.c,v 1.33 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: cia_pci.c,v 1.34 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: cia_pci.c,v 1.33 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cia_pci.c,v 1.34 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -41,13 +41,13 @@ __KERNEL_RCSID(0, "$NetBSD: cia_pci.c,v 1.33 2015/10/02 05:22:49 msaitoh Exp $")
|
||||
#include <alpha/pci/ciareg.h>
|
||||
#include <alpha/pci/ciavar.h>
|
||||
|
||||
void cia_attach_hook(device_t, device_t,
|
||||
static void cia_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
int cia_bus_maxdevs(void *, int);
|
||||
pcitag_t cia_make_tag(void *, int, int, int);
|
||||
void cia_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
pcireg_t cia_conf_read(void *, pcitag_t, int);
|
||||
void cia_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static int cia_bus_maxdevs(void *, int);
|
||||
static pcitag_t cia_make_tag(void *, int, int, int);
|
||||
static void cia_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
static pcireg_t cia_conf_read(void *, pcitag_t, int);
|
||||
static void cia_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
void
|
||||
cia_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
@ -62,26 +62,26 @@ cia_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
pc->pc_conf_write = cia_conf_write;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
cia_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
cia_bus_maxdevs(void *cpv, int busno)
|
||||
{
|
||||
|
||||
return 32;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
static pcitag_t
|
||||
cia_make_tag(void *cpv, int b, int d, int f)
|
||||
{
|
||||
|
||||
return (b << 16) | (d << 11) | (f << 8);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
cia_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
|
||||
@ -93,7 +93,7 @@ cia_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
*fp = (tag >> 8) & 0x7;
|
||||
}
|
||||
|
||||
pcireg_t
|
||||
static pcireg_t
|
||||
cia_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
{
|
||||
struct cia_config *ccp = cpv;
|
||||
@ -191,7 +191,7 @@ cia_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
return data;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
cia_conf_write(void *cpv, pcitag_t tag, int offset, pcireg_t data)
|
||||
{
|
||||
struct cia_config *ccp = cpv;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dwlpx_pci.c,v 1.19 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: dwlpx_pci.c,v 1.20 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 by Matthew Jacob
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dwlpx_pci.c,v 1.19 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dwlpx_pci.c,v 1.20 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -47,14 +47,14 @@ __KERNEL_RCSID(0, "$NetBSD: dwlpx_pci.c,v 1.19 2015/10/02 05:22:49 msaitoh Exp $
|
||||
|
||||
#define KV(_addr) ((void *)ALPHA_PHYS_TO_K0SEG((_addr)))
|
||||
|
||||
void dwlpx_attach_hook(device_t, device_t,
|
||||
static void dwlpx_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
int dwlpx_bus_maxdevs(void *, int);
|
||||
pcitag_t dwlpx_make_tag(void *, int, int, int);
|
||||
void dwlpx_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
static int dwlpx_bus_maxdevs(void *, int);
|
||||
static pcitag_t dwlpx_make_tag(void *, int, int, int);
|
||||
static void dwlpx_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
int *);
|
||||
pcireg_t dwlpx_conf_read(void *, pcitag_t, int);
|
||||
void dwlpx_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static pcireg_t dwlpx_conf_read(void *, pcitag_t, int);
|
||||
static void dwlpx_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
void
|
||||
dwlpx_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
@ -68,22 +68,18 @@ dwlpx_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
pc->pc_conf_write = dwlpx_conf_write;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dwlpx_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba)
|
||||
{
|
||||
#if 0
|
||||
struct dwlpx_config *ccp = pba->pba_pc->pc_conf_v;
|
||||
printf("dwlpx_attach_hook for %s\n", device_xname(ccp->cc_sc->dwlpx_dev));
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
dwlpx_bus_maxdevs(void *cpv, int busno)
|
||||
{
|
||||
return DWLPX_MAXDEV;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
static pcitag_t
|
||||
dwlpx_make_tag(void *cpv, int b, int d, int f)
|
||||
{
|
||||
pcitag_t tag;
|
||||
@ -95,7 +91,7 @@ dwlpx_make_tag(void *cpv, int b, int d, int f)
|
||||
return (tag);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dwlpx_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
|
||||
@ -115,7 +111,7 @@ dwlpx_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
*fp = (tag >> 13) & 0x7;
|
||||
}
|
||||
|
||||
pcireg_t
|
||||
static pcireg_t
|
||||
dwlpx_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
{
|
||||
struct dwlpx_config *ccp = cpv;
|
||||
@ -184,7 +180,7 @@ dwlpx_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
return (data);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dwlpx_conf_write(void *cpv, pcitag_t tag, int offset, pcireg_t data)
|
||||
{
|
||||
struct dwlpx_config *ccp = cpv;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: irongate_pci.c,v 1.10 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: irongate_pci.c,v 1.11 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: irongate_pci.c,v 1.10 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: irongate_pci.c,v 1.11 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -48,14 +48,14 @@ __KERNEL_RCSID(0, "$NetBSD: irongate_pci.c,v 1.10 2015/10/02 05:22:49 msaitoh Ex
|
||||
#include <alpha/pci/irongatereg.h>
|
||||
#include <alpha/pci/irongatevar.h>
|
||||
|
||||
void irongate_attach_hook(device_t, device_t,
|
||||
static void irongate_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
int irongate_bus_maxdevs(void *, int);
|
||||
pcitag_t irongate_make_tag(void *, int, int, int);
|
||||
void irongate_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
static int irongate_bus_maxdevs(void *, int);
|
||||
static pcitag_t irongate_make_tag(void *, int, int, int);
|
||||
static void irongate_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
int *);
|
||||
pcireg_t irongate_conf_read(void *, pcitag_t, int);
|
||||
void irongate_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static pcireg_t irongate_conf_read(void *, pcitag_t, int);
|
||||
static void irongate_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
/* AMD 751 systems are always single-processor, so this is easy. */
|
||||
#define PCI_CONF_LOCK(s) (s) = splhigh()
|
||||
@ -79,27 +79,27 @@ irongate_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
pc->pc_conf_write = irongate_conf_write;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
irongate_attach_hook(device_t parent, device_t self,
|
||||
struct pcibus_attach_args *pba)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
irongate_bus_maxdevs(void *ipv, int busno)
|
||||
{
|
||||
|
||||
return 32;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
static pcitag_t
|
||||
irongate_make_tag(void *ipv, int b, int d, int f)
|
||||
{
|
||||
|
||||
return (b << 16) | (d << 11) | (f << 8);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
irongate_decompose_tag(void *ipv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
|
||||
@ -111,7 +111,7 @@ irongate_decompose_tag(void *ipv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
*fp = (tag >> 8) & 0x7;
|
||||
}
|
||||
|
||||
pcireg_t
|
||||
static pcireg_t
|
||||
irongate_conf_read(void *ipv, pcitag_t tag, int offset)
|
||||
{
|
||||
int d;
|
||||
@ -153,7 +153,7 @@ irongate_conf_read0(void *ipv, pcitag_t tag, int offset)
|
||||
return (data);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
irongate_conf_write(void *ipv, pcitag_t tag, int offset, pcireg_t data)
|
||||
{
|
||||
int s;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lca_pci.c,v 1.22 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: lca_pci.c,v 1.23 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: lca_pci.c,v 1.22 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lca_pci.c,v 1.23 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -41,13 +41,13 @@ __KERNEL_RCSID(0, "$NetBSD: lca_pci.c,v 1.22 2015/10/02 05:22:49 msaitoh Exp $")
|
||||
#include <alpha/pci/lcareg.h>
|
||||
#include <alpha/pci/lcavar.h>
|
||||
|
||||
void lca_attach_hook(device_t, device_t,
|
||||
static void lca_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
int lca_bus_maxdevs(void *, int);
|
||||
pcitag_t lca_make_tag(void *, int, int, int);
|
||||
void lca_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
pcireg_t lca_conf_read(void *, pcitag_t, int);
|
||||
void lca_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static int lca_bus_maxdevs(void *, int);
|
||||
static pcitag_t lca_make_tag(void *, int, int, int);
|
||||
static void lca_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
static pcireg_t lca_conf_read(void *, pcitag_t, int);
|
||||
static void lca_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
void
|
||||
lca_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
@ -62,12 +62,12 @@ lca_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
pc->pc_conf_write = lca_conf_write;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
lca_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
lca_bus_maxdevs(void *cpv, int busno)
|
||||
{
|
||||
|
||||
@ -77,14 +77,14 @@ lca_bus_maxdevs(void *cpv, int busno)
|
||||
return 32;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
static pcitag_t
|
||||
lca_make_tag(void *cpv, int b, int d, int f)
|
||||
{
|
||||
|
||||
return (b << 16) | (d << 11) | (f << 8);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
lca_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
|
||||
@ -96,7 +96,7 @@ lca_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
*fp = (tag >> 8) & 0x7;
|
||||
}
|
||||
|
||||
pcireg_t
|
||||
static pcireg_t
|
||||
lca_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
{
|
||||
struct lca_config *lcp = cpv;
|
||||
@ -149,7 +149,7 @@ lca_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
return data;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
lca_conf_write(void *cpv, pcitag_t tag, int offset, pcireg_t data)
|
||||
{
|
||||
struct lca_config *lcp = cpv;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcpcia_pci.c,v 1.12 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: mcpcia_pci.c,v 1.13 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 by Matthew Jacob
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcpcia_pci.c,v 1.12 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcpcia_pci.c,v 1.13 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -46,18 +46,13 @@ __KERNEL_RCSID(0, "$NetBSD: mcpcia_pci.c,v 1.12 2015/10/02 05:22:49 msaitoh Exp
|
||||
|
||||
#define KV(_addr) ((void *)ALPHA_PHYS_TO_K0SEG((_addr)))
|
||||
|
||||
static void mcpcia_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
static int
|
||||
mcpcia_bus_maxdevs(void *, int);
|
||||
static pcitag_t
|
||||
mcpcia_make_tag(void *, int, int, int);
|
||||
static void
|
||||
mcpcia_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
static pcireg_t
|
||||
mcpcia_conf_read(void *, pcitag_t, int);
|
||||
static void
|
||||
mcpcia_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static void mcpcia_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
static int mcpcia_bus_maxdevs(void *, int);
|
||||
static pcitag_t mcpcia_make_tag(void *, int, int, int);
|
||||
static void mcpcia_decompose_tag(void *, pcitag_t, int *, int *, int *);
|
||||
static pcireg_t mcpcia_conf_read(void *, pcitag_t, int);
|
||||
static void mcpcia_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
void
|
||||
mcpcia_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sio.c,v 1.55 2021/04/24 23:36:23 thorpej Exp $ */
|
||||
/* $NetBSD: sio.c,v 1.56 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
@ -63,7 +63,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: sio.c,v 1.55 2021/04/24 23:36:23 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sio.c,v 1.56 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -105,14 +105,14 @@ struct sio_softc {
|
||||
isa_chipset_tag_t sc_ic;
|
||||
};
|
||||
|
||||
int siomatch(device_t, cfdata_t, void *);
|
||||
void sioattach(device_t, device_t, void *);
|
||||
static int siomatch(device_t, cfdata_t, void *);
|
||||
static void sioattach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(sio, sizeof(struct sio_softc),
|
||||
siomatch, sioattach, NULL, NULL);
|
||||
|
||||
#if NPCEB > 0
|
||||
int pcebmatch(device_t, cfdata_t, void *);
|
||||
static int pcebmatch(device_t, cfdata_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(pceb, sizeof(struct sio_softc),
|
||||
pcebmatch, sioattach, NULL, NULL);
|
||||
@ -123,19 +123,19 @@ union sio_attach_args {
|
||||
struct eisabus_attach_args sa_eba;
|
||||
};
|
||||
|
||||
void sio_isa_attach_hook(device_t, device_t,
|
||||
struct isabus_attach_args *);
|
||||
void sio_isa_detach_hook(isa_chipset_tag_t, device_t);
|
||||
static void sio_isa_attach_hook(device_t, device_t,
|
||||
struct isabus_attach_args *);
|
||||
static void sio_isa_detach_hook(isa_chipset_tag_t, device_t);
|
||||
#if NPCEB > 0
|
||||
void sio_eisa_attach_hook(device_t, device_t,
|
||||
struct eisabus_attach_args *);
|
||||
int sio_eisa_maxslots(void *);
|
||||
int sio_eisa_intr_map(void *, u_int, eisa_intr_handle_t *);
|
||||
static void sio_eisa_attach_hook(device_t, device_t,
|
||||
struct eisabus_attach_args *);
|
||||
static int sio_eisa_maxslots(void *);
|
||||
static int sio_eisa_intr_map(void *, u_int, eisa_intr_handle_t *);
|
||||
#endif
|
||||
|
||||
void sio_bridge_callback(device_t);
|
||||
static void sio_bridge_callback(device_t);
|
||||
|
||||
int
|
||||
static int
|
||||
siomatch(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct pci_attach_args *pa = aux;
|
||||
@ -162,7 +162,7 @@ siomatch(device_t parent, cfdata_t match, void *aux)
|
||||
}
|
||||
|
||||
#if NPCEB > 0
|
||||
int
|
||||
static int
|
||||
pcebmatch(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct pci_attach_args *pa = aux;
|
||||
@ -175,7 +175,7 @@ pcebmatch(device_t parent, cfdata_t match, void *aux)
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
static void
|
||||
sioattach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct sio_softc *sc = device_private(self);
|
||||
@ -201,7 +201,7 @@ sioattach(device_t parent, device_t self, void *aux)
|
||||
config_defer(self, sio_bridge_callback);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
sio_bridge_callback(device_t self)
|
||||
{
|
||||
struct sio_softc *sc = device_private(self);
|
||||
@ -289,14 +289,14 @@ sio_bridge_callback(device_t self)
|
||||
CFARG_EOL);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
sio_isa_attach_hook(device_t parent, device_t self, struct isabus_attach_args *iba)
|
||||
{
|
||||
|
||||
/* Nothing to do. */
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
sio_isa_detach_hook(isa_chipset_tag_t ic, device_t self)
|
||||
{
|
||||
|
||||
@ -305,7 +305,7 @@ sio_isa_detach_hook(isa_chipset_tag_t ic, device_t self)
|
||||
|
||||
#if NPCEB > 0
|
||||
|
||||
void
|
||||
static void
|
||||
sio_eisa_attach_hook(device_t parent, device_t self, struct eisabus_attach_args *eba)
|
||||
{
|
||||
|
||||
@ -314,14 +314,14 @@ sio_eisa_attach_hook(device_t parent, device_t self, struct eisabus_attach_args
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sio_eisa_maxslots(void *v)
|
||||
{
|
||||
|
||||
return 16; /* as good a number as any. only 8, maybe? */
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sio_eisa_intr_map(void *v, u_int irq, eisa_intr_handle_t *ihp)
|
||||
{
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sio_pic.c,v 1.46 2020/09/29 01:19:52 thorpej Exp $ */
|
||||
/* $NetBSD: sio_pic.c,v 1.47 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000, 2020 The NetBSD Foundation, Inc.
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.46 2020/09/29 01:19:52 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.47 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -119,28 +119,27 @@ static struct alpha_shared_intr *sio_intr;
|
||||
* If prom console is broken, must remember the initial interrupt
|
||||
* settings and enforce them. WHEE!
|
||||
*/
|
||||
uint8_t initial_ocw1[2];
|
||||
uint8_t initial_elcr[2];
|
||||
static uint8_t initial_ocw1[2];
|
||||
static uint8_t initial_elcr[2];
|
||||
#endif
|
||||
|
||||
void sio_setirqstat(int, int, int);
|
||||
static void sio_setirqstat(int, int, int);
|
||||
|
||||
uint8_t (*sio_read_elcr)(int);
|
||||
void (*sio_write_elcr)(int, uint8_t);
|
||||
static uint8_t (*sio_read_elcr)(int);
|
||||
static void (*sio_write_elcr)(int, uint8_t);
|
||||
static void specific_eoi(int);
|
||||
#ifdef BROKEN_PROM_CONSOLE
|
||||
void sio_intr_shutdown(void *);
|
||||
static void sio_intr_shutdown(void *);
|
||||
#endif
|
||||
|
||||
/******************** i82378 SIO ELCR functions ********************/
|
||||
|
||||
int i82378_setup_elcr(void);
|
||||
uint8_t i82378_read_elcr(int);
|
||||
void i82378_write_elcr(int, uint8_t);
|
||||
static bus_space_handle_t sio_ioh_elcr;
|
||||
|
||||
bus_space_handle_t sio_ioh_elcr;
|
||||
static uint8_t i82378_read_elcr(int);
|
||||
static void i82378_write_elcr(int, uint8_t);
|
||||
|
||||
int
|
||||
static int
|
||||
i82378_setup_elcr(void)
|
||||
{
|
||||
int rv;
|
||||
@ -161,14 +160,14 @@ i82378_setup_elcr(void)
|
||||
return (rv);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
static uint8_t
|
||||
i82378_read_elcr(int elcr)
|
||||
{
|
||||
|
||||
return (bus_space_read_1(sio_iot, sio_ioh_elcr, elcr));
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
i82378_write_elcr(int elcr, uint8_t val)
|
||||
{
|
||||
|
||||
@ -177,13 +176,12 @@ i82378_write_elcr(int elcr, uint8_t val)
|
||||
|
||||
/******************** Cypress CY82C693 ELCR functions ********************/
|
||||
|
||||
int cy82c693_setup_elcr(void);
|
||||
uint8_t cy82c693_read_elcr(int);
|
||||
void cy82c693_write_elcr(int, uint8_t);
|
||||
static const struct cy82c693_handle *sio_cy82c693_handle;
|
||||
|
||||
const struct cy82c693_handle *sio_cy82c693_handle;
|
||||
static uint8_t cy82c693_read_elcr(int);
|
||||
static void cy82c693_write_elcr(int, uint8_t);
|
||||
|
||||
int
|
||||
static int
|
||||
cy82c693_setup_elcr(void)
|
||||
{
|
||||
int device, maxndevs;
|
||||
@ -241,14 +239,14 @@ cy82c693_setup_elcr(void)
|
||||
return (ENODEV);
|
||||
}
|
||||
|
||||
uint8_t
|
||||
static uint8_t
|
||||
cy82c693_read_elcr(int elcr)
|
||||
{
|
||||
|
||||
return (cy82c693_read(sio_cy82c693_handle, CONFIG_ELCR1 + elcr));
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
cy82c693_write_elcr(int elcr, uint8_t val)
|
||||
{
|
||||
|
||||
@ -272,7 +270,7 @@ int (*const sio_elcr_setup_funcs[])(void) = {
|
||||
|
||||
/******************** Shared SIO/Cypress functions ********************/
|
||||
|
||||
void
|
||||
static void
|
||||
sio_setirqstat(int irq, int enabled, int type)
|
||||
{
|
||||
uint8_t ocw1[2], elcr[2];
|
||||
@ -404,7 +402,7 @@ sio_intr_setup(pci_chipset_tag_t pc, bus_space_tag_t iot)
|
||||
}
|
||||
|
||||
#ifdef BROKEN_PROM_CONSOLE
|
||||
void
|
||||
static void
|
||||
sio_intr_shutdown(void *arg)
|
||||
{
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tsp_pci.c,v 1.10 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: tsp_pci.c,v 1.11 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
|
||||
@ -28,12 +28,11 @@
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: tsp_pci.c,v 1.10 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tsp_pci.c,v 1.11 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -51,14 +50,14 @@ __KERNEL_RCSID(0, "$NetBSD: tsp_pci.c,v 1.10 2015/10/02 05:22:49 msaitoh Exp $")
|
||||
|
||||
#define tsp_pci() { Generate ctags(1) key. }
|
||||
|
||||
void tsp_attach_hook(device_t, device_t,
|
||||
static void tsp_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
int tsp_bus_maxdevs(void *, int);
|
||||
pcitag_t tsp_make_tag(void *, int, int, int);
|
||||
void tsp_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
static int tsp_bus_maxdevs(void *, int);
|
||||
static pcitag_t tsp_make_tag(void *, int, int, int);
|
||||
static void tsp_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
int *);
|
||||
pcireg_t tsp_conf_read(void *, pcitag_t, int);
|
||||
void tsp_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static pcireg_t tsp_conf_read(void *, pcitag_t, int);
|
||||
static void tsp_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
void
|
||||
tsp_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
@ -72,24 +71,24 @@ tsp_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
pc->pc_conf_write = tsp_conf_write;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
tsp_attach_hook(device_t parent, device_t self, struct pcibus_attach_args *pba)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
tsp_bus_maxdevs(void *cpv, int busno)
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
static pcitag_t
|
||||
tsp_make_tag(void *cpv, int b, int d, int f)
|
||||
{
|
||||
return b << 16 | d << 11 | f << 8;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
tsp_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
if (bp != NULL)
|
||||
@ -99,12 +98,13 @@ tsp_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
if (fp != NULL)
|
||||
*fp = (tag >> 8) & 0x7;
|
||||
}
|
||||
|
||||
/*
|
||||
* Tsunami makes this a lot easier than it used to be, automatically
|
||||
* generating type 0 or type 1 cycles, and quietly returning -1 with
|
||||
* no errors on unanswered probes.
|
||||
*/
|
||||
pcireg_t
|
||||
static pcireg_t
|
||||
tsp_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
{
|
||||
pcireg_t *datap, data;
|
||||
@ -120,7 +120,7 @@ tsp_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
return data;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
tsp_conf_write(void *cpv, pcitag_t tag, int offset, pcireg_t data)
|
||||
{
|
||||
pcireg_t *datap;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ttwoga_pci.c,v 1.8 2015/10/02 05:22:49 msaitoh Exp $ */
|
||||
/* $NetBSD: ttwoga_pci.c,v 1.9 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: ttwoga_pci.c,v 1.8 2015/10/02 05:22:49 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ttwoga_pci.c,v 1.9 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -44,16 +44,16 @@ __KERNEL_RCSID(0, "$NetBSD: ttwoga_pci.c,v 1.8 2015/10/02 05:22:49 msaitoh Exp $
|
||||
#include <alpha/pci/ttwogareg.h>
|
||||
#include <alpha/pci/ttwogavar.h>
|
||||
|
||||
void ttwoga_attach_hook(device_t, device_t,
|
||||
static void ttwoga_attach_hook(device_t, device_t,
|
||||
struct pcibus_attach_args *);
|
||||
int ttwoga_bus_maxdevs(void *, int);
|
||||
pcitag_t ttwoga_make_tag(void *, int, int, int);
|
||||
void ttwoga_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
static int ttwoga_bus_maxdevs(void *, int);
|
||||
static pcitag_t ttwoga_make_tag(void *, int, int, int);
|
||||
static void ttwoga_decompose_tag(void *, pcitag_t, int *, int *,
|
||||
int *);
|
||||
pcireg_t ttwoga_conf_read(void *, pcitag_t, int);
|
||||
void ttwoga_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
static pcireg_t ttwoga_conf_read(void *, pcitag_t, int);
|
||||
static void ttwoga_conf_write(void *, pcitag_t, int, pcireg_t);
|
||||
|
||||
paddr_t ttwoga_make_type0addr(int, int);
|
||||
static paddr_t ttwoga_make_type0addr(int, int);
|
||||
|
||||
/*
|
||||
* The T2 has an annoying bug that can manifest itself while
|
||||
@ -70,7 +70,7 @@ cpuid_t ttwoga_conf_cpu; /* XXX core logic bug */
|
||||
|
||||
#define TTWOGA_CONF_LOCK() \
|
||||
do { \
|
||||
mutex_enter(&ttwoga_conf_lock); \
|
||||
mutex_enter(&ttwoga_conf_lock); \
|
||||
ttwoga_conf_cpu = cpu_number(); \
|
||||
} while (0)
|
||||
|
||||
@ -95,20 +95,20 @@ ttwoga_pci_init(pci_chipset_tag_t pc, void *v)
|
||||
pc->pc_conf_write = ttwoga_conf_write;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ttwoga_attach_hook(device_t parent, device_t self,
|
||||
struct pcibus_attach_args *pba)
|
||||
{
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
ttwoga_bus_maxdevs(void *cpv, int busno)
|
||||
{
|
||||
|
||||
return 32;
|
||||
}
|
||||
|
||||
pcitag_t
|
||||
static pcitag_t
|
||||
ttwoga_make_tag(void *cpv, int b, int d, int f)
|
||||
{
|
||||
|
||||
@ -116,7 +116,7 @@ ttwoga_make_tag(void *cpv, int b, int d, int f)
|
||||
return (b << 16) | (d << 11) | (f << 8);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ttwoga_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
{
|
||||
|
||||
@ -128,7 +128,7 @@ ttwoga_decompose_tag(void *cpv, pcitag_t tag, int *bp, int *dp, int *fp)
|
||||
*fp = (tag >> 8) & 0x7;
|
||||
}
|
||||
|
||||
paddr_t
|
||||
static paddr_t
|
||||
ttwoga_make_type0addr(int d, int f)
|
||||
{
|
||||
|
||||
@ -137,7 +137,7 @@ ttwoga_make_type0addr(int d, int f)
|
||||
return ((0x0800UL << d) | (f << 8));
|
||||
}
|
||||
|
||||
pcireg_t
|
||||
static pcireg_t
|
||||
ttwoga_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
{
|
||||
struct ttwoga_config *tcp = cpv;
|
||||
@ -192,7 +192,7 @@ ttwoga_conf_read(void *cpv, pcitag_t tag, int offset)
|
||||
return (data);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ttwoga_conf_write(void *cpv, pcitag_t tag, int offset, pcireg_t data)
|
||||
{
|
||||
struct ttwoga_config *tcp = cpv;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: com_sableio.c,v 1.15 2020/09/22 15:24:02 thorpej Exp $ */
|
||||
/* $NetBSD: com_sableio.c,v 1.16 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: com_sableio.c,v 1.15 2020/09/22 15:24:02 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: com_sableio.c,v 1.16 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -65,13 +65,13 @@ struct com_sableio_softc {
|
||||
void *sc_ih; /* interrupt handler */
|
||||
};
|
||||
|
||||
int com_sableio_match(device_t, cfdata_t , void *);
|
||||
void com_sableio_attach(device_t, device_t, void *);
|
||||
static int com_sableio_match(device_t, cfdata_t , void *);
|
||||
static void com_sableio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(com_sableio, sizeof(struct com_sableio_softc),
|
||||
com_sableio_match, com_sableio_attach, NULL, NULL);
|
||||
|
||||
int
|
||||
static int
|
||||
com_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct sableio_attach_args *sa = aux;
|
||||
@ -83,7 +83,7 @@ com_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
com_sableio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct com_sableio_softc *ssc = device_private(self);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fdc_sableio.c,v 1.16 2020/09/22 15:24:02 thorpej Exp $ */
|
||||
/* $NetBSD: fdc_sableio.c,v 1.17 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: fdc_sableio.c,v 1.16 2020/09/22 15:24:02 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fdc_sableio.c,v 1.17 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -52,8 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: fdc_sableio.c,v 1.16 2020/09/22 15:24:02 thorpej Exp
|
||||
|
||||
#include <alpha/sableio/sableiovar.h>
|
||||
|
||||
int fdc_sableio_match(device_t, cfdata_t, void *);
|
||||
void fdc_sableio_attach(device_t, device_t, void *);
|
||||
static int fdc_sableio_match(device_t, cfdata_t, void *);
|
||||
static void fdc_sableio_attach(device_t, device_t, void *);
|
||||
|
||||
struct fdc_sableio_softc {
|
||||
struct fdc_softc sc_fdc; /* real "fdc" softc */
|
||||
@ -64,7 +64,7 @@ struct fdc_sableio_softc {
|
||||
CFATTACH_DECL_NEW(fdc_sableio, sizeof(struct fdc_sableio_softc),
|
||||
fdc_sableio_match, fdc_sableio_attach, NULL, NULL);
|
||||
|
||||
int
|
||||
static int
|
||||
fdc_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct sableio_attach_args *sa = aux;
|
||||
@ -76,7 +76,7 @@ fdc_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
fdc_sableio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct fdc_sableio_softc *sfdc = device_private(self);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lpt_sableio.c,v 1.11 2020/09/22 15:24:02 thorpej Exp $ */
|
||||
/* $NetBSD: lpt_sableio.c,v 1.12 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt_sableio.c,v 1.11 2020/09/22 15:24:02 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lpt_sableio.c,v 1.12 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -65,13 +65,13 @@ struct lpt_sableio_softc {
|
||||
void *sc_ih; /* interrupt handler */
|
||||
};
|
||||
|
||||
int lpt_sableio_match(device_t, cfdata_t , void *);
|
||||
void lpt_sableio_attach(device_t, device_t, void *);
|
||||
static int lpt_sableio_match(device_t, cfdata_t , void *);
|
||||
static void lpt_sableio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(lpt_sableio, sizeof(struct lpt_sableio_softc),
|
||||
lpt_sableio_match, lpt_sableio_attach, NULL, NULL);
|
||||
|
||||
int
|
||||
static int
|
||||
lpt_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct sableio_attach_args *sa = aux;
|
||||
@ -83,7 +83,7 @@ lpt_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
lpt_sableio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct lpt_sableio_softc *ssc = device_private(self);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pckbc_sableio.c,v 1.14 2020/11/18 02:04:30 thorpej Exp $ */
|
||||
/* $NetBSD: pckbc_sableio.c,v 1.15 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pckbc_sableio.c,v 1.14 2020/11/18 02:04:30 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pckbc_sableio.c,v 1.15 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -61,15 +61,16 @@ struct pckbc_sableio_softc {
|
||||
pci_chipset_tag_t sc_pc; /* PCI chipset for registering intrs */
|
||||
};
|
||||
|
||||
int pckbc_sableio_match(device_t, cfdata_t, void *);
|
||||
void pckbc_sableio_attach(device_t, device_t, void *);
|
||||
static int pckbc_sableio_match(device_t, cfdata_t, void *);
|
||||
static void pckbc_sableio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(pckbc_sableio, sizeof(struct pckbc_sableio_softc),
|
||||
pckbc_sableio_match, pckbc_sableio_attach, NULL, NULL);
|
||||
|
||||
void pckbc_sableio_intr_establish(struct pckbc_softc *, pckbc_slot_t);
|
||||
static void pckbc_sableio_intr_establish(struct pckbc_softc *,
|
||||
pckbc_slot_t);
|
||||
|
||||
int
|
||||
static int
|
||||
pckbc_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
{
|
||||
struct sableio_attach_args *sa = aux;
|
||||
@ -81,7 +82,7 @@ pckbc_sableio_match(device_t parent, cfdata_t match, void *aux)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pckbc_sableio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct pckbc_sableio_softc *ssc = device_private(self);
|
||||
@ -129,7 +130,7 @@ pckbc_sableio_attach(device_t parent, device_t self, void *aux)
|
||||
pckbc_attach(sc);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
pckbc_sableio_intr_establish(struct pckbc_softc *sc, pckbc_slot_t slot)
|
||||
{
|
||||
struct pckbc_sableio_softc *ssc = (void *) sc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sableio.c,v 1.14 2021/04/24 23:36:24 thorpej Exp $ */
|
||||
/* $NetBSD: sableio.c,v 1.15 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: sableio.c,v 1.14 2021/04/24 23:36:24 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sableio.c,v 1.15 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include "isadma.h"
|
||||
|
||||
@ -69,7 +69,7 @@ __KERNEL_RCSID(0, "$NetBSD: sableio.c,v 1.14 2021/04/24 23:36:24 thorpej Exp $")
|
||||
/*
|
||||
* The devices built-in to the Sable STDIO module.
|
||||
*/
|
||||
const struct sableio_dev {
|
||||
static const struct sableio_dev {
|
||||
const char *sd_name; /* device name */
|
||||
bus_addr_t sd_ioaddr; /* I/O space address */
|
||||
int sd_sableirq[2]; /* Sable IRQs */
|
||||
@ -97,17 +97,17 @@ struct sableio_softc {
|
||||
struct alpha_isa_chipset sc_isa_chipset;
|
||||
};
|
||||
|
||||
int sableio_match(device_t, cfdata_t, void *);
|
||||
void sableio_attach(device_t, device_t, void *);
|
||||
static int sableio_match(device_t, cfdata_t, void *);
|
||||
static void sableio_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(sableio, sizeof(struct sableio_softc),
|
||||
sableio_match, sableio_attach, NULL, NULL);
|
||||
|
||||
int sableio_print(void *, const char *);
|
||||
static int sableio_print(void *, const char *);
|
||||
|
||||
struct sableio_softc *sableio_attached;
|
||||
static struct sableio_softc *sableio_attached;
|
||||
|
||||
int
|
||||
static int
|
||||
sableio_match(device_t parent, cfdata_t cf, void *aux)
|
||||
{
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
@ -131,7 +131,7 @@ sableio_match(device_t parent, cfdata_t cf, void *aux)
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
sableio_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct sableio_softc *sc = device_private(self);
|
||||
@ -176,7 +176,7 @@ sableio_attach(device_t parent, device_t self, void *aux)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
sableio_print(void *aux, const char *pnp)
|
||||
{
|
||||
struct sableio_attach_args *sa = aux;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ioasic.c,v 1.48 2020/11/18 02:04:30 thorpej Exp $ */
|
||||
/* $NetBSD: ioasic.c,v 1.49 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.48 2020/11/18 02:04:30 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.49 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -79,14 +79,14 @@ __KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.48 2020/11/18 02:04:30 thorpej Exp $");
|
||||
#include <dev/tc/ioasicvar.h>
|
||||
|
||||
/* Definition of the driver for autoconfig. */
|
||||
int ioasicmatch(device_t, cfdata_t, void *);
|
||||
void ioasicattach(device_t, device_t, void *);
|
||||
static int ioasicmatch(device_t, cfdata_t, void *);
|
||||
static void ioasicattach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(ioasic, sizeof(struct ioasic_softc),
|
||||
ioasicmatch, ioasicattach, NULL, NULL);
|
||||
|
||||
int ioasic_intr(void *);
|
||||
int ioasic_intrnull(void *);
|
||||
static int ioasic_intr(void *);
|
||||
static int ioasic_intrnull(void *);
|
||||
|
||||
#define C(x) ((void *)(x))
|
||||
|
||||
@ -99,7 +99,7 @@ int ioasic_intrnull(void *);
|
||||
|
||||
#define IOASIC_NCOOKIES 4
|
||||
|
||||
struct ioasic_dev ioasic_devs[] = {
|
||||
static const struct ioasic_dev ioasic_devs[] = {
|
||||
{ "PMAD-BA ", IOASIC_SLOT_3_START, C(IOASIC_DEV_LANCE),
|
||||
IOASIC_INTR_LANCE, },
|
||||
{ "z8530 ", IOASIC_SLOT_4_START, C(IOASIC_DEV_SCC0),
|
||||
@ -111,9 +111,9 @@ struct ioasic_dev ioasic_devs[] = {
|
||||
{ "AMD79c30", IOASIC_SLOT_9_START, C(IOASIC_DEV_ISDN),
|
||||
IOASIC_INTR_ISDN_TXLOAD | IOASIC_INTR_ISDN_RXLOAD, },
|
||||
};
|
||||
int ioasic_ndevs = sizeof(ioasic_devs) / sizeof(ioasic_devs[0]);
|
||||
static const int ioasic_ndevs = __arraycount(ioasic_devs);
|
||||
|
||||
struct ioasicintr {
|
||||
static struct ioasicintr {
|
||||
int (*iai_func)(void *);
|
||||
void *iai_arg;
|
||||
struct evcnt iai_evcnt;
|
||||
@ -122,9 +122,9 @@ struct ioasicintr {
|
||||
tc_addr_t ioasic_base; /* XXX XXX XXX */
|
||||
|
||||
/* There can be only one. */
|
||||
int ioasicfound;
|
||||
static int ioasicfound;
|
||||
|
||||
int
|
||||
static int
|
||||
ioasicmatch(device_t parent, cfdata_t cf, void *aux)
|
||||
{
|
||||
struct tc_attach_args *ta = aux;
|
||||
@ -143,7 +143,7 @@ ioasicmatch(device_t parent, cfdata_t cf, void *aux)
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
ioasicattach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct ioasic_softc *sc = device_private(self);
|
||||
@ -266,7 +266,7 @@ ioasic_intr_disestablish(device_t ioa, void *cookie)
|
||||
ioasicintrs[dev].iai_arg = (void *)dev;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
ioasic_intrnull(void *val)
|
||||
{
|
||||
|
||||
@ -277,7 +277,7 @@ ioasic_intrnull(void *val)
|
||||
/*
|
||||
* ASIC interrupt handler.
|
||||
*/
|
||||
int
|
||||
static int
|
||||
ioasic_intr(void *val)
|
||||
{
|
||||
register struct ioasic_softc *sc = val;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcclock_ioasic.c,v 1.17 2012/02/06 02:14:16 matt Exp $ */
|
||||
/* $NetBSD: mcclock_ioasic.c,v 1.18 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.17 2012/02/06 02:14:16 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.18 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -58,16 +58,16 @@ struct mcclock_ioasic_softc {
|
||||
struct mcclock_ioasic_clockdatum *sc_dp;
|
||||
};
|
||||
|
||||
int mcclock_ioasic_match(device_t, cfdata_t, void *);
|
||||
void mcclock_ioasic_attach(device_t, device_t, void *);
|
||||
static int mcclock_ioasic_match(device_t, cfdata_t, void *);
|
||||
static void mcclock_ioasic_attach(device_t, device_t, void *);
|
||||
|
||||
CFATTACH_DECL_NEW(mcclock_ioasic, sizeof(struct mcclock_ioasic_softc),
|
||||
mcclock_ioasic_match, mcclock_ioasic_attach, NULL, NULL);
|
||||
|
||||
void mcclock_ioasic_write(struct mc146818_softc *, u_int, u_int);
|
||||
u_int mcclock_ioasic_read(struct mc146818_softc *, u_int);
|
||||
static void mcclock_ioasic_write(struct mc146818_softc *, u_int, u_int);
|
||||
static u_int mcclock_ioasic_read(struct mc146818_softc *, u_int);
|
||||
|
||||
int
|
||||
static int
|
||||
mcclock_ioasic_match(device_t parent, cfdata_t cf, void *aux)
|
||||
{
|
||||
struct ioasicdev_attach_args *d = aux;
|
||||
@ -78,7 +78,7 @@ mcclock_ioasic_match(device_t parent, cfdata_t cf, void *aux)
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mcclock_ioasic_attach(device_t parent, device_t self, void *aux)
|
||||
{
|
||||
struct mcclock_ioasic_softc *isc = device_private(self);
|
||||
@ -96,7 +96,7 @@ mcclock_ioasic_attach(device_t parent, device_t self, void *aux)
|
||||
mcclock_attach(sc);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
mcclock_ioasic_write(struct mc146818_softc *sc, u_int reg, u_int datum)
|
||||
{
|
||||
struct mcclock_ioasic_softc *isc = (void *)sc;
|
||||
@ -104,7 +104,7 @@ mcclock_ioasic_write(struct mc146818_softc *sc, u_int reg, u_int datum)
|
||||
isc->sc_dp[reg].datum = datum;
|
||||
}
|
||||
|
||||
u_int
|
||||
static u_int
|
||||
mcclock_ioasic_read(struct mc146818_softc *sc, u_int reg)
|
||||
{
|
||||
struct mcclock_ioasic_softc *isc = (void *)sc;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tc_3000_300.c,v 1.38 2020/11/18 02:04:30 thorpej Exp $ */
|
||||
/* $NetBSD: tc_3000_300.c,v 1.39 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_3000_300.c,v 1.38 2020/11/18 02:04:30 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_3000_300.c,v 1.39 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: tc_3000_300.c,v 1.38 2020/11/18 02:04:30 thorpej Exp
|
||||
extern int sfb_cnattach(tc_addr_t);
|
||||
#endif
|
||||
|
||||
int tc_3000_300_intrnull(void *);
|
||||
static int tc_3000_300_intrnull(void *);
|
||||
|
||||
#define C(x) ((void *)(u_long)x)
|
||||
#define KV(x) (ALPHA_PHYS_TO_K0SEG(x))
|
||||
@ -65,7 +65,7 @@ int tc_3000_300_intrnull(void *);
|
||||
*/
|
||||
#define DEC_3000_300_IOASIC_ADDR KV(0x1a0000000)
|
||||
|
||||
struct tc_slotdesc tc_3000_300_slots[] = {
|
||||
const struct tc_slotdesc tc_3000_300_slots[] = {
|
||||
{ KV(0x100000000), C(TC_3000_300_DEV_OPT0), }, /* 0 - opt slot 0 */
|
||||
{ KV(0x120000000), C(TC_3000_300_DEV_OPT1), }, /* 1 - opt slot 1 */
|
||||
{ KV(0x140000000), C(TC_3000_300_DEV_BOGUS), }, /* 2 - unused */
|
||||
@ -74,18 +74,16 @@ struct tc_slotdesc tc_3000_300_slots[] = {
|
||||
{ KV(0x1a0000000), C(TC_3000_300_DEV_BOGUS), }, /* 5 - IOCTL ASIC */
|
||||
{ KV(0x1c0000000), C(TC_3000_300_DEV_BOGUS), }, /* 6 - CXTurbo */
|
||||
};
|
||||
int tc_3000_300_nslots =
|
||||
sizeof(tc_3000_300_slots) / sizeof(tc_3000_300_slots[0]);
|
||||
const int tc_3000_300_nslots = __arraycount(tc_3000_300_slots);
|
||||
|
||||
struct tc_builtin tc_3000_300_builtins[] = {
|
||||
const struct tc_builtin tc_3000_300_builtins[] = {
|
||||
{ "PMAGB-BA", 6, 0x02000000, C(TC_3000_300_DEV_CXTURBO), },
|
||||
{ "FLAMG-IO", 5, 0x00000000, C(TC_3000_300_DEV_IOASIC), },
|
||||
{ "PMAZ-DS ", 4, 0x00000000, C(TC_3000_300_DEV_TCDS), },
|
||||
};
|
||||
int tc_3000_300_nbuiltins =
|
||||
sizeof(tc_3000_300_builtins) / sizeof(tc_3000_300_builtins[0]);
|
||||
const int tc_3000_300_nbuiltins = __arraycount(tc_3000_300_builtins);
|
||||
|
||||
struct tcintr {
|
||||
static struct tcintr {
|
||||
int (*tci_func)(void *);
|
||||
void *tci_arg;
|
||||
struct evcnt tci_evcnt;
|
||||
@ -205,7 +203,7 @@ tc_3000_300_intr_disestablish(device_t tcadev, void *cookie)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
tc_3000_300_intrnull(void *val)
|
||||
{
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tc_3000_500.c,v 1.37 2020/11/18 02:04:30 thorpej Exp $ */
|
||||
/* $NetBSD: tc_3000_500.c,v 1.38 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_3000_500.c,v 1.37 2020/11/18 02:04:30 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tc_3000_500.c,v 1.38 2021/05/07 16:58:34 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -52,19 +52,12 @@ __KERNEL_RCSID(0, "$NetBSD: tc_3000_500.c,v 1.37 2020/11/18 02:04:30 thorpej Exp
|
||||
extern int sfb_cnattach(tc_addr_t);
|
||||
#endif
|
||||
|
||||
void tc_3000_500_intr_setup(void);
|
||||
void tc_3000_500_intr_establish(device_t, void *,
|
||||
tc_intrlevel_t, int (*)(void *), void *);
|
||||
void tc_3000_500_intr_disestablish(device_t, void *);
|
||||
void tc_3000_500_iointr(void *, unsigned long);
|
||||
|
||||
int tc_3000_500_intrnull(void *);
|
||||
int tc_3000_500_fb_cnattach(uint64_t);
|
||||
static int tc_3000_500_intrnull(void *);
|
||||
|
||||
#define C(x) ((void *)(u_long)x)
|
||||
#define KV(x) (ALPHA_PHYS_TO_K0SEG(x))
|
||||
|
||||
struct tc_slotdesc tc_3000_500_slots[] = {
|
||||
const struct tc_slotdesc tc_3000_500_slots[] = {
|
||||
{ KV(0x100000000), C(TC_3000_500_DEV_OPT0), }, /* 0 - opt slot 0 */
|
||||
{ KV(0x120000000), C(TC_3000_500_DEV_OPT1), }, /* 1 - opt slot 1 */
|
||||
{ KV(0x140000000), C(TC_3000_500_DEV_OPT2), }, /* 2 - opt slot 2 */
|
||||
@ -74,25 +67,24 @@ struct tc_slotdesc tc_3000_500_slots[] = {
|
||||
{ KV(0x1c0000000), C(TC_3000_500_DEV_BOGUS), }, /* 6 - TCDS ASIC */
|
||||
{ KV(0x1e0000000), C(TC_3000_500_DEV_BOGUS), }, /* 7 - IOCTL ASIC */
|
||||
};
|
||||
int tc_3000_500_nslots =
|
||||
sizeof(tc_3000_500_slots) / sizeof(tc_3000_500_slots[0]);
|
||||
const int tc_3000_500_nslots = __arraycount(tc_3000_500_slots);
|
||||
|
||||
struct tc_builtin tc_3000_500_graphics_builtins[] = {
|
||||
const struct tc_builtin tc_3000_500_graphics_builtins[] = {
|
||||
{ "FLAMG-IO", 7, 0x00000000, C(TC_3000_500_DEV_IOASIC), },
|
||||
{ "PMAGB-BA", 7, 0x02000000, C(TC_3000_500_DEV_CXTURBO), },
|
||||
{ "PMAZ-DS ", 6, 0x00000000, C(TC_3000_500_DEV_TCDS), },
|
||||
};
|
||||
int tc_3000_500_graphics_nbuiltins = sizeof(tc_3000_500_graphics_builtins) /
|
||||
sizeof(tc_3000_500_graphics_builtins[0]);
|
||||
const int tc_3000_500_graphics_nbuiltins =
|
||||
__arraycount(tc_3000_500_graphics_builtins);
|
||||
|
||||
struct tc_builtin tc_3000_500_nographics_builtins[] = {
|
||||
const struct tc_builtin tc_3000_500_nographics_builtins[] = {
|
||||
{ "FLAMG-IO", 7, 0x00000000, C(TC_3000_500_DEV_IOASIC), },
|
||||
{ "PMAZ-DS ", 6, 0x00000000, C(TC_3000_500_DEV_TCDS), },
|
||||
};
|
||||
int tc_3000_500_nographics_nbuiltins = sizeof(tc_3000_500_nographics_builtins) /
|
||||
sizeof(tc_3000_500_nographics_builtins[0]);
|
||||
const int tc_3000_500_nographics_nbuiltins =
|
||||
__arraycount(tc_3000_500_nographics_builtins);
|
||||
|
||||
uint32_t tc_3000_500_intrbits[TC_3000_500_NCOOKIES] = {
|
||||
static const uint32_t tc_3000_500_intrbits[TC_3000_500_NCOOKIES] = {
|
||||
TC_3000_500_IR_OPT0,
|
||||
TC_3000_500_IR_OPT1,
|
||||
TC_3000_500_IR_OPT2,
|
||||
@ -104,13 +96,13 @@ uint32_t tc_3000_500_intrbits[TC_3000_500_NCOOKIES] = {
|
||||
TC_3000_500_IR_CXTURBO,
|
||||
};
|
||||
|
||||
struct tcintr {
|
||||
static struct tcintr {
|
||||
int (*tci_func)(void *);
|
||||
void *tci_arg;
|
||||
struct evcnt tci_evcnt;
|
||||
} tc_3000_500_intr[TC_3000_500_NCOOKIES];
|
||||
|
||||
uint32_t tc_3000_500_imask; /* intrs we want to ignore; mirrors IMR. */
|
||||
static uint32_t tc_3000_500_imask; /* intrs we want to ignore; mirrors IMR. */
|
||||
|
||||
void
|
||||
tc_3000_500_intr_setup(void)
|
||||
@ -209,7 +201,7 @@ tc_3000_500_intr_disestablish(device_t tcadev, void *cookie)
|
||||
splx(s);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
tc_3000_500_intrnull(void *val)
|
||||
{
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tc_conf.h,v 1.14 2017/06/22 16:46:52 flxd Exp $ */
|
||||
/* $NetBSD: tc_conf.h,v 1.15 2021/05/07 16:58:34 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Carnegie-Mellon University.
|
||||
@ -46,12 +46,12 @@ extern void tc_3000_500_intr_establish(device_t, void *,
|
||||
tc_intrlevel_t, int (*)(void *), void *);
|
||||
extern void tc_3000_500_intr_disestablish(device_t, void *);
|
||||
|
||||
extern int tc_3000_500_nslots;
|
||||
extern struct tc_slotdesc tc_3000_500_slots[];
|
||||
extern int tc_3000_500_graphics_nbuiltins;
|
||||
extern struct tc_builtin tc_3000_500_graphics_builtins[];
|
||||
extern int tc_3000_500_nographics_nbuiltins;
|
||||
extern struct tc_builtin tc_3000_500_nographics_builtins[];
|
||||
extern const int tc_3000_500_nslots;
|
||||
extern const struct tc_slotdesc tc_3000_500_slots[];
|
||||
extern const int tc_3000_500_graphics_nbuiltins;
|
||||
extern const struct tc_builtin tc_3000_500_graphics_builtins[];
|
||||
extern const int tc_3000_500_nographics_nbuiltins;
|
||||
extern const struct tc_builtin tc_3000_500_nographics_builtins[];
|
||||
#endif /* DEC_3000_500 */
|
||||
|
||||
#ifdef DEC_3000_300
|
||||
@ -66,10 +66,10 @@ extern void tc_3000_300_intr_establish(device_t, void *,
|
||||
tc_intrlevel_t, int (*)(void *), void *);
|
||||
extern void tc_3000_300_intr_disestablish(device_t, void *);
|
||||
|
||||
extern int tc_3000_300_nslots;
|
||||
extern struct tc_slotdesc tc_3000_300_slots[];
|
||||
extern int tc_3000_300_nbuiltins;
|
||||
extern struct tc_builtin tc_3000_300_builtins[];
|
||||
extern const int tc_3000_300_nslots;
|
||||
extern const struct tc_slotdesc tc_3000_300_slots[];
|
||||
extern const int tc_3000_300_nbuiltins;
|
||||
extern const struct tc_builtin tc_3000_300_builtins[];
|
||||
#endif /* DEC_3000_300 */
|
||||
|
||||
extern int tc_fb_cnattach(tc_addr_t);
|
||||
|
Loading…
Reference in New Issue
Block a user