Add support for a single statically-allocated MCPCIA configuration structure,
which holds state of the MCPCIA to which the console is attached. - All MCPCIA info is now stored in the mcpcia_config structure; the mcpcia_softc only contains a struct device and a pointer to one of these. - If attaching the console MCPCIA, use the static configuration, else allocate the substructure. - Rename mcpcia_init() to mcpcia_init0(), and make it take a "mallocsafe" argument. - Implement a new mcpcia_init(), which looks for the MCPCIA which has the EISA bridge attached. Initialize this MCPCIA as the console MCPCIA (the console on the Rawhide is only allowed on this MCPCIA; firmware rule). - Eliminate the kludgy linked listed of mcpcia_softcs. Just use mcpcia_cd to find all configured instances. Separate bug fix: Actually clear the MCPCIA error mask after probing for PCI (and ISA) devices, don't just clear it twice in mcpcia_init0(). Some other slight cleanup.
This commit is contained in:
parent
9af474a62c
commit
279f30928f
@ -1,4 +1,41 @@
|
||||
/* $NetBSD: mcpcia.c,v 1.4 1998/07/08 00:58:09 mjacob Exp $ */
|
||||
/* $NetBSD: mcpcia.c,v 1.5 1999/04/15 22:27:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
|
||||
* NASA Ames Research Center.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 by Matthew Jacob
|
||||
@ -37,7 +74,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.4 1998/07/08 00:58:09 mjacob Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.5 1999/04/15 22:27:40 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -54,13 +91,10 @@ __KERNEL_RCSID(0, "$NetBSD: mcpcia.c,v 1.4 1998/07/08 00:58:09 mjacob Exp $");
|
||||
#include <alpha/pci/mcpciavar.h>
|
||||
#include <alpha/pci/pci_kn300.h>
|
||||
|
||||
struct mcpcia_softc *mcpcias = NULL;
|
||||
static struct mcpcia_softc *mcpcia_lt = NULL;
|
||||
|
||||
#define KV(_addr) ((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))
|
||||
#define MCPCIA_SYSBASE(sc) \
|
||||
((((unsigned long) (sc)->mcpcia_gid) << MCBUS_GID_SHIFT) | \
|
||||
(((unsigned long) (sc)->mcpcia_mid) << MCBUS_MID_SHIFT) | \
|
||||
#define MCPCIA_SYSBASE(mc) \
|
||||
((((unsigned long) (mc)->cc_gid) << MCBUS_GID_SHIFT) | \
|
||||
(((unsigned long) (mc)->cc_mid) << MCBUS_MID_SHIFT) | \
|
||||
(MCBUS_IOSPACE))
|
||||
|
||||
static int mcpciamatch __P((struct device *, struct cfdata *, void *));
|
||||
@ -71,6 +105,15 @@ struct cfattach mcpcia_ca = {
|
||||
|
||||
static int mcpciaprint __P((void *, const char *));
|
||||
|
||||
void mcpcia_init0 __P((struct mcpcia_config *, int));
|
||||
|
||||
/*
|
||||
* We have one statically-allocated mcpcia_config structure; this is
|
||||
* the one used for the console (which, coincidentally, is the only
|
||||
* MCPCIA with an EISA adapter attached to it).
|
||||
*/
|
||||
struct mcpcia_config mcpcia_console_configuration;
|
||||
|
||||
static int
|
||||
mcpciaprint(aux, pnp)
|
||||
void *aux;
|
||||
@ -105,30 +148,45 @@ mcpciaattach(parent, self, aux)
|
||||
static int first = 1;
|
||||
struct mcbus_dev_attach_args *ma = aux;
|
||||
struct mcpcia_softc *mcp = (struct mcpcia_softc *)self;
|
||||
struct mcpcia_config *ccp;
|
||||
struct pcibus_attach_args pba;
|
||||
u_int32_t ctl;
|
||||
|
||||
mcp->mcpcia_dev = *self;
|
||||
mcp->mcpcia_mid = ma->ma_mid;
|
||||
mcp->mcpcia_gid = ma->ma_gid;
|
||||
|
||||
printf("\n");
|
||||
|
||||
mcpcia_init(mcp);
|
||||
mcpcia_dma_init(&mcp->mcpcia_cc);
|
||||
/*
|
||||
* Determine if we're the console's MCPCIA.
|
||||
*/
|
||||
if (ma->ma_mid == mcpcia_console_configuration.cc_mid &&
|
||||
ma->ma_gid == mcpcia_console_configuration.cc_gid)
|
||||
ccp = &mcpcia_console_configuration;
|
||||
else {
|
||||
ccp = malloc(sizeof(struct mcpcia_config), M_DEVBUF, M_WAITOK);
|
||||
memset(ccp, 0, sizeof(struct mcpcia_config));
|
||||
|
||||
mcp->mcpcia_next = NULL;
|
||||
if (mcpcia_lt == NULL) {
|
||||
mcpcias = mcp;
|
||||
} else {
|
||||
mcpcia_lt->mcpcia_next = mcp;
|
||||
ccp->cc_mid = ma->ma_mid;
|
||||
ccp->cc_gid = ma->ma_gid;
|
||||
}
|
||||
mcpcia_lt = mcp;
|
||||
|
||||
mcp->mcpcia_cc = ccp;
|
||||
ccp->cc_sc = mcp;
|
||||
|
||||
/* This initializes cc_sysbase so we can do register access. */
|
||||
mcpcia_init0(ccp, 1);
|
||||
|
||||
ctl = REGVAL(MCPCIA_PCI_REV(ccp));
|
||||
printf("%s: Horse Revision %d, %s Handed Saddle Revision %d,"
|
||||
" CAP Revision %d\n", mcp->mcpcia_dev.dv_xname, HORSE_REV(ctl),
|
||||
(SADDLE_TYPE(ctl) & 1)? "Right": "Left", SADDLE_REV(ctl),
|
||||
CAP_REV(ctl));
|
||||
|
||||
mcpcia_dma_init(ccp);
|
||||
|
||||
/*
|
||||
* Set up interrupts
|
||||
*/
|
||||
pci_kn300_pickintr(&mcp->mcpcia_cc, first);
|
||||
#ifdef EVCNT_COUNTERS
|
||||
pci_kn300_pickintr(ccp, first);
|
||||
#ifdef EVCNT_COUNTERS
|
||||
if (first == 1) {
|
||||
evcnt_attach(self, "intr", kn300_intr_evcnt);
|
||||
first = 0;
|
||||
@ -141,61 +199,93 @@ mcpciaattach(parent, self, aux)
|
||||
* Attach PCI bus
|
||||
*/
|
||||
pba.pba_busname = "pci";
|
||||
pba.pba_iot = &mcp->mcpcia_cc.cc_iot;
|
||||
pba.pba_memt = &mcp->mcpcia_cc.cc_memt;
|
||||
pba.pba_iot = &ccp->cc_iot;
|
||||
pba.pba_memt = &ccp->cc_memt;
|
||||
pba.pba_dmat = /* start with direct, may change... */
|
||||
alphabus_dma_get_tag(&mcp->mcpcia_cc.cc_dmat_direct, ALPHA_BUS_PCI);
|
||||
pba.pba_pc = &mcp->mcpcia_cc.cc_pc;
|
||||
alphabus_dma_get_tag(&ccp->cc_dmat_direct, ALPHA_BUS_PCI);
|
||||
pba.pba_pc = &ccp->cc_pc;
|
||||
pba.pba_bus = 0;
|
||||
pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED;
|
||||
config_found(self, &pba, mcpciaprint);
|
||||
(void) config_found(self, &pba, mcpciaprint);
|
||||
|
||||
/*
|
||||
* Clear any errors that may have occurred during the probe
|
||||
* sequence.
|
||||
*/
|
||||
REGVAL(MCPCIA_CAP_ERR(ccp)) = 0xFFFFFFFF;
|
||||
alpha_mb();
|
||||
}
|
||||
|
||||
void
|
||||
mcpcia_init(mcp)
|
||||
struct mcpcia_softc *mcp;
|
||||
mcpcia_init()
|
||||
{
|
||||
struct mcpcia_config *ccp = &mcpcia_console_configuration;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Look for all of the MCPCIAs on the system. One of them
|
||||
* will have an EISA attached to it. This MCPCIA is the
|
||||
* only one that can be used for the console. Once we find
|
||||
* that one, initialize it.
|
||||
*/
|
||||
|
||||
for (i = 0; i < MCPCIA_PER_MCBUS; i++) {
|
||||
ccp->cc_mid = mcbus_mcpcia_probe_order[i];
|
||||
/*
|
||||
* XXX If we ever support more than one MCBUS, we'll
|
||||
* XXX have to probe for them, and map them to unit
|
||||
* XXX numbers.
|
||||
*/
|
||||
ccp->cc_gid = MCBUS_GID_FROM_INSTANCE(0);
|
||||
ccp->cc_sysbase = MCPCIA_SYSBASE(ccp);
|
||||
|
||||
if (badaddr((void *)ALPHA_PHYS_TO_K0SEG(MCPCIA_PCI_REV(ccp)),
|
||||
sizeof(u_int32_t)))
|
||||
continue;
|
||||
|
||||
if (EISA_PRESENT(REGVAL(MCPCIA_PCI_REV(ccp)))) {
|
||||
mcpcia_init0(ccp, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
panic("mcpcia_init: unable to find EISA bus");
|
||||
}
|
||||
|
||||
void
|
||||
mcpcia_init0(ccp, mallocsafe)
|
||||
struct mcpcia_config *ccp;
|
||||
int mallocsafe;
|
||||
{
|
||||
u_int32_t ctl;
|
||||
struct mcpcia_config *ccp = &mcp->mcpcia_cc;
|
||||
|
||||
if (ccp->cc_initted == 0) {
|
||||
/* don't do these twice since they set up extents */
|
||||
mcpcia_bus_io_init(&ccp->cc_iot, ccp);
|
||||
mcpcia_bus_mem_init(&ccp->cc_memt, ccp);
|
||||
}
|
||||
ccp->cc_mallocsafe = mallocsafe;
|
||||
|
||||
mcpcia_pci_init(&ccp->cc_pc, ccp);
|
||||
ccp->cc_sc = mcp;
|
||||
|
||||
/*
|
||||
* Establish a precalculated base for convenience's sake.
|
||||
*/
|
||||
ccp->cc_sysbase = MCPCIA_SYSBASE(mcp);
|
||||
|
||||
|
||||
ctl = REGVAL(MCPCIA_PCI_REV(mcp));
|
||||
printf("%s: Horse Revision %d, %s Handed Saddle Revision %d,"
|
||||
" CAP Revision %d\n", mcp->mcpcia_dev.dv_xname, HORSE_REV(ctl),
|
||||
(SADDLE_TYPE(ctl) & 1)? "Right": "Left", SADDLE_REV(ctl),
|
||||
CAP_REV(ctl));
|
||||
ccp->cc_sysbase = MCPCIA_SYSBASE(ccp);
|
||||
|
||||
/*
|
||||
* Disable interrupts and clear errors prior to probing
|
||||
*/
|
||||
REGVAL(MCPCIA_INT_MASK0(mcp)) = 0;
|
||||
REGVAL(MCPCIA_INT_MASK1(mcp)) = 0;
|
||||
REGVAL(MCPCIA_CAP_ERR(mcp)) = 0xFFFFFFFF;
|
||||
alpha_mb();
|
||||
|
||||
/*
|
||||
* Clean up any post probe errors (W1TC).
|
||||
*/
|
||||
REGVAL(MCPCIA_CAP_ERR(mcp)) = 0xFFFFFFFF;
|
||||
REGVAL(MCPCIA_INT_MASK0(ccp)) = 0;
|
||||
REGVAL(MCPCIA_INT_MASK1(ccp)) = 0;
|
||||
REGVAL(MCPCIA_CAP_ERR(ccp)) = 0xFFFFFFFF;
|
||||
alpha_mb();
|
||||
|
||||
/*
|
||||
* Use this opportunity to also find out the MID and CPU
|
||||
* type of the currently running CPU (that's us, billybob....)
|
||||
*/
|
||||
ctl = REGVAL(MCPCIA_WHOAMI(mcp));
|
||||
ctl = REGVAL(MCPCIA_WHOAMI(ccp));
|
||||
mcbus_primary.mcbus_cpu_mid = MCBUS_CPU_MID(ctl);
|
||||
if ((MCBUS_CPU_INFO(ctl) & CPU_Fill_Err) == 0 &&
|
||||
mcbus_primary.mcbus_valid == 0) {
|
||||
@ -204,17 +294,19 @@ mcpcia_init(mcp)
|
||||
mcbus_primary.mcbus_valid = 1;
|
||||
}
|
||||
alpha_mb();
|
||||
|
||||
ccp->cc_initted = 1;
|
||||
}
|
||||
|
||||
/* #define TEST_PROBE_DEATH 1 */
|
||||
#ifdef TEST_PROBE_DEATH
|
||||
#ifdef TEST_PROBE_DEATH
|
||||
static void
|
||||
die_heathen_dog(void *arg)
|
||||
die_heathen_dog(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct mcpcia_softc *mcp = arg;
|
||||
struct mcpcia_config *ccp = arg;
|
||||
|
||||
/* this causes a fatal machine check (0x670) */
|
||||
REGVAL(MCPCIA_CAP_DIAG(mcp)) |= CAP_DIAG_MC_ADRPE;
|
||||
REGVAL(MCPCIA_CAP_DIAG(ccp)) |= CAP_DIAG_MC_ADRPE;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -223,22 +315,29 @@ mcpcia_config_cleanup()
|
||||
{
|
||||
volatile u_int32_t ctl;
|
||||
struct mcpcia_softc *mcp;
|
||||
struct mcpcia_config *ccp;
|
||||
int i;
|
||||
extern struct cfdriver mcpcia_cd;
|
||||
|
||||
/*
|
||||
* Turn on Hard, Soft error interrupts. Maybe i2c too.
|
||||
*/
|
||||
for (mcp = mcpcias; mcp; mcp = mcp->mcpcia_next) {
|
||||
ctl = REGVAL(MCPCIA_INT_MASK0(mcp));
|
||||
for (i = 0; i < mcpcia_cd.cd_ndevs; i++) {
|
||||
if ((mcp = mcpcia_cd.cd_devs[i]) == NULL)
|
||||
continue;
|
||||
|
||||
ccp = mcp->mcpcia_cc;
|
||||
|
||||
ctl = REGVAL(MCPCIA_INT_MASK0(ccp));
|
||||
ctl |= MCPCIA_GEN_IENABL;
|
||||
REGVAL(MCPCIA_INT_MASK0(mcp)) = ctl;
|
||||
REGVAL(MCPCIA_INT_MASK0(ccp)) = ctl;
|
||||
alpha_mb();
|
||||
|
||||
/* force stall while write completes */
|
||||
ctl = REGVAL(MCPCIA_INT_MASK0(mcp));
|
||||
}
|
||||
#ifdef TEST_PROBE_DEATH
|
||||
{
|
||||
extern int hz;
|
||||
(void) timeout (die_heathen_dog, (void *) mcpcias, 30 * hz);
|
||||
ctl = REGVAL(MCPCIA_INT_MASK0(ccp));
|
||||
}
|
||||
#ifdef TEST_PROBE_DEATH
|
||||
(void) timeout (die_heathen_dog, &mcpcia_console_configuration,
|
||||
30 * hz);
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcpciareg.h,v 1.2 1998/07/08 00:40:18 mjacob Exp $ */
|
||||
/* $NetBSD: mcpciareg.h,v 1.3 1999/04/15 22:27:40 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 by Matthew Jacob
|
||||
@ -213,56 +213,56 @@
|
||||
/*
|
||||
* Handier defines- uses precalculated offset in softc.
|
||||
*/
|
||||
#define _SYBRIDGE(sc) ((sc)->mcpcia_cc.cc_sysbase | MCPCIA_PCI_BRIDGE)
|
||||
#define _SYBRIDGE(ccp) ((ccp)->cc_sysbase | MCPCIA_PCI_BRIDGE)
|
||||
|
||||
#define MCPCIA_PCI_REV(sc) (_SYBRIDGE(sc) | _MCPCIA_PCI_REV)
|
||||
#define MCPCIA_WHOAMI(sc) (_SYBRIDGE(sc) | _MCPCIA_WHOAMI)
|
||||
#define MCPCIA_PCI_LAT(sc) (_SYBRIDGE(sc) | _MCPCIA_PCI_LAT)
|
||||
#define MCPCIA_CAP_CTRL(sc) (_SYBRIDGE(sc) | _MCPCIA_CAP_CTRL)
|
||||
#define MCPCIA_HAE_MEM(sc) (_SYBRIDGE(sc) | _MCPCIA_HAE_MEM)
|
||||
#define MCPCIA_HAE_IO(sc) (_SYBRIDGE(sc) | _MCPCIA_HAE_IO)
|
||||
#define MCPCIA_IACK_SC(sc) (_SYBRIDGE(sc) | _MCPCIA_IACK_SC)
|
||||
#define MCPCIA_HAE_DENSE(sc) (_SYBRIDGE(sc) | _MCPCIA_HAE_DENSE)
|
||||
#define MCPCIA_INT_CTL(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_CTL)
|
||||
#define MCPCIA_INT_REQ(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_REQ)
|
||||
#define MCPCIA_INT_TARG(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_TARG)
|
||||
#define MCPCIA_INT_ADR(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_ADR)
|
||||
#define MCPCIA_INT_ADR_EXT(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_ADR_EXT)
|
||||
#define MCPCIA_INT_MASK0(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_MASK0)
|
||||
#define MCPCIA_INT_MASK1(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_MASK1)
|
||||
#define MCPCIA_INT_ACK0(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_ACK0)
|
||||
#define MCPCIA_INT_ACK1(sc) (_SYBRIDGE(sc) | _MCPCIA_INT_ACK1)
|
||||
#define MCPCIA_PERF_MON(sc) (_SYBRIDGE(sc) | _MCPCIA_PERF_MON)
|
||||
#define MCPCIA_PERF_CONT(sc) (_SYBRIDGE(sc) | _MCPCIA_PERF_CONT)
|
||||
#define MCPCIA_CAP_DIAG(sc) (_SYBRIDGE(sc) | _MCPCIA_CAP_DIAG)
|
||||
#define MCPCIA_SCRATCH0(sc) (_SYBRIDGE(sc) | _MCPCIA_SCRATCH0)
|
||||
#define MCPCIA_SCRATCH1(sc) (_SYBRIDGE(sc) | _MCPCIA_SCRATCH1)
|
||||
#define MCPCIA_TOM(sc) (_SYBRIDGE(sc) | _MCPCIA_TOM)
|
||||
#define MCPCIA_MC_ERR0(sc) (_SYBRIDGE(sc) | _MCPCIA_MC_ERR0)
|
||||
#define MCPCIA_MC_ERR1(sc) (_SYBRIDGE(sc) | _MCPCIA_MC_ERR1)
|
||||
#define MCPCIA_CAP_ERR(sc) (_SYBRIDGE(sc) | _MCPCIA_CAP_ERR)
|
||||
#define MCPCIA_PCI_ERR1(sc) (_SYBRIDGE(sc) | _MCPCIA_PCI_ERR1)
|
||||
#define MCPCIA_MDPA_STAT(sc) (_SYBRIDGE(sc) | _MCPCIA_MDPA_STAT)
|
||||
#define MCPCIA_MDPA_SYN(sc) (_SYBRIDGE(sc) | _MCPCIA_MDPA_SYN)
|
||||
#define MCPCIA_MDPA_DIAG(sc) (_SYBRIDGE(sc) | _MCPCIA_MDPA_DIAG)
|
||||
#define MCPCIA_MDPB_STAT(sc) (_SYBRIDGE(sc) | _MCPCIA_MDPB_STAT)
|
||||
#define MCPCIA_MDPB_SYN(sc) (_SYBRIDGE(sc) | _MCPCIA_MDPB_SYN)
|
||||
#define MCPCIA_MDPB_DIAG(sc) (_SYBRIDGE(sc) | _MCPCIA_MDPB_DIAG)
|
||||
#define MCPCIA_SG_TBIA(sc) (_SYBRIDGE(sc) | _MCPCIA_SG_TBIA)
|
||||
#define MCPCIA_HBASE(sc) (_SYBRIDGE(sc) | _MCPCIA_HBASE)
|
||||
#define MCPCIA_W0_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_W0_BASE)
|
||||
#define MCPCIA_W0_MASK(sc) (_SYBRIDGE(sc) | _MCPCIA_W0_MASK)
|
||||
#define MCPCIA_T0_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_T0_BASE)
|
||||
#define MCPCIA_W1_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_W1_BASE)
|
||||
#define MCPCIA_W1_MASK(sc) (_SYBRIDGE(sc) | _MCPCIA_W1_MASK)
|
||||
#define MCPCIA_T1_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_T1_BASE)
|
||||
#define MCPCIA_W2_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_W2_BASE)
|
||||
#define MCPCIA_W2_MASK(sc) (_SYBRIDGE(sc) | _MCPCIA_W2_MASK)
|
||||
#define MCPCIA_T2_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_T2_BASE)
|
||||
#define MCPCIA_W3_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_W3_BASE)
|
||||
#define MCPCIA_W3_MASK(sc) (_SYBRIDGE(sc) | _MCPCIA_W3_MASK)
|
||||
#define MCPCIA_T3_BASE(sc) (_SYBRIDGE(sc) | _MCPCIA_T3_BASE)
|
||||
#define MCPCIA_W_DAC(sc) (_SYBRIDGE(sc) | _MCPCIA_W_DAC)
|
||||
#define MCPCIA_PCI_REV(ccp) (_SYBRIDGE(ccp) | _MCPCIA_PCI_REV)
|
||||
#define MCPCIA_WHOAMI(ccp) (_SYBRIDGE(ccp) | _MCPCIA_WHOAMI)
|
||||
#define MCPCIA_PCI_LAT(ccp) (_SYBRIDGE(ccp) | _MCPCIA_PCI_LAT)
|
||||
#define MCPCIA_CAP_CTRL(ccp) (_SYBRIDGE(ccp) | _MCPCIA_CAP_CTRL)
|
||||
#define MCPCIA_HAE_MEM(ccp) (_SYBRIDGE(ccp) | _MCPCIA_HAE_MEM)
|
||||
#define MCPCIA_HAE_IO(ccp) (_SYBRIDGE(ccp) | _MCPCIA_HAE_IO)
|
||||
#define MCPCIA_IACK_SC(ccp) (_SYBRIDGE(ccp) | _MCPCIA_IACK_SC)
|
||||
#define MCPCIA_HAE_DENSE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_HAE_DENSE)
|
||||
#define MCPCIA_INT_CTL(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_CTL)
|
||||
#define MCPCIA_INT_REQ(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_REQ)
|
||||
#define MCPCIA_INT_TARG(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_TARG)
|
||||
#define MCPCIA_INT_ADR(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_ADR)
|
||||
#define MCPCIA_INT_ADR_EXT(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_ADR_EXT)
|
||||
#define MCPCIA_INT_MASK0(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_MASK0)
|
||||
#define MCPCIA_INT_MASK1(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_MASK1)
|
||||
#define MCPCIA_INT_ACK0(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_ACK0)
|
||||
#define MCPCIA_INT_ACK1(ccp) (_SYBRIDGE(ccp) | _MCPCIA_INT_ACK1)
|
||||
#define MCPCIA_PERF_MON(ccp) (_SYBRIDGE(ccp) | _MCPCIA_PERF_MON)
|
||||
#define MCPCIA_PERF_CONT(ccp) (_SYBRIDGE(ccp) | _MCPCIA_PERF_CONT)
|
||||
#define MCPCIA_CAP_DIAG(ccp) (_SYBRIDGE(ccp) | _MCPCIA_CAP_DIAG)
|
||||
#define MCPCIA_SCRATCH0(ccp) (_SYBRIDGE(ccp) | _MCPCIA_SCRATCH0)
|
||||
#define MCPCIA_SCRATCH1(ccp) (_SYBRIDGE(ccp) | _MCPCIA_SCRATCH1)
|
||||
#define MCPCIA_TOM(ccp) (_SYBRIDGE(ccp) | _MCPCIA_TOM)
|
||||
#define MCPCIA_MC_ERR0(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MC_ERR0)
|
||||
#define MCPCIA_MC_ERR1(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MC_ERR1)
|
||||
#define MCPCIA_CAP_ERR(ccp) (_SYBRIDGE(ccp) | _MCPCIA_CAP_ERR)
|
||||
#define MCPCIA_PCI_ERR1(ccp) (_SYBRIDGE(ccp) | _MCPCIA_PCI_ERR1)
|
||||
#define MCPCIA_MDPA_STAT(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MDPA_STAT)
|
||||
#define MCPCIA_MDPA_SYN(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MDPA_SYN)
|
||||
#define MCPCIA_MDPA_DIAG(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MDPA_DIAG)
|
||||
#define MCPCIA_MDPB_STAT(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MDPB_STAT)
|
||||
#define MCPCIA_MDPB_SYN(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MDPB_SYN)
|
||||
#define MCPCIA_MDPB_DIAG(ccp) (_SYBRIDGE(ccp) | _MCPCIA_MDPB_DIAG)
|
||||
#define MCPCIA_SG_TBIA(ccp) (_SYBRIDGE(ccp) | _MCPCIA_SG_TBIA)
|
||||
#define MCPCIA_HBASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_HBASE)
|
||||
#define MCPCIA_W0_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W0_BASE)
|
||||
#define MCPCIA_W0_MASK(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W0_MASK)
|
||||
#define MCPCIA_T0_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_T0_BASE)
|
||||
#define MCPCIA_W1_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W1_BASE)
|
||||
#define MCPCIA_W1_MASK(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W1_MASK)
|
||||
#define MCPCIA_T1_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_T1_BASE)
|
||||
#define MCPCIA_W2_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W2_BASE)
|
||||
#define MCPCIA_W2_MASK(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W2_MASK)
|
||||
#define MCPCIA_T2_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_T2_BASE)
|
||||
#define MCPCIA_W3_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W3_BASE)
|
||||
#define MCPCIA_W3_MASK(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W3_MASK)
|
||||
#define MCPCIA_T3_BASE(ccp) (_SYBRIDGE(ccp) | _MCPCIA_T3_BASE)
|
||||
#define MCPCIA_W_DAC(ccp) (_SYBRIDGE(ccp) | _MCPCIA_W_DAC)
|
||||
|
||||
/*
|
||||
* This is here for what error handling will get as a collected subpacket.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcpciavar.h,v 1.2 1999/02/17 03:17:17 mjacob Exp $ */
|
||||
/* $NetBSD: mcpciavar.h,v 1.3 1999/04/15 22:27:40 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 by Matthew Jacob
|
||||
@ -41,7 +41,10 @@
|
||||
* MPCIA configuration.
|
||||
*/
|
||||
struct mcpcia_config {
|
||||
int cc_gid; /* GID of this MCbus */
|
||||
int cc_mid; /* MCbus Module ID */
|
||||
int cc_initted;
|
||||
int cc_mallocsafe;
|
||||
struct alpha_bus_space cc_iot;
|
||||
struct alpha_bus_space cc_memt;
|
||||
struct extent * cc_io_ex;
|
||||
@ -60,16 +63,12 @@ struct mcpcia_config {
|
||||
|
||||
struct mcpcia_softc {
|
||||
struct device mcpcia_dev;
|
||||
struct mcpcia_softc * mcpcia_next; /* next in a list */
|
||||
struct mcpcia_config mcpcia_cc; /* config info */
|
||||
u_int8_t mcpcia_gid; /* GID of this MCbus */
|
||||
u_int8_t mcpcia_mid; /* MCbus Module ID */
|
||||
struct mcpcia_config *mcpcia_cc; /* config info */
|
||||
};
|
||||
void mcpcia_config_cleanup __P((void));
|
||||
|
||||
extern struct mcpcia_config *mcpcia_eisaccp;
|
||||
void mcpcia_init __P((void));
|
||||
void mcpcia_config_cleanup __P((void));
|
||||
|
||||
void mcpcia_init __P((struct mcpcia_softc *));
|
||||
void mcpcia_pci_init __P((pci_chipset_tag_t, void *));
|
||||
void mcpcia_dma_init __P((struct mcpcia_config *));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user