make "i386_isa_chipset" globally visible so it can be used from outside
the "isa" bus, attach "pnpbios" pseudo-bus if configured
This commit is contained in:
parent
8f5c3d689b
commit
59e13361f3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mainbus.c,v 1.28 1999/03/19 04:58:46 cgd Exp $ */
|
||||
/* $NetBSD: mainbus.c,v 1.29 1999/11/12 18:39:39 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -46,12 +46,17 @@
|
|||
#include "eisa.h"
|
||||
#include "isa.h"
|
||||
#include "apm.h"
|
||||
#include "pnpbios.h"
|
||||
|
||||
#if NAPM > 0
|
||||
#include <machine/bioscall.h>
|
||||
#include <machine/apmvar.h>
|
||||
#endif
|
||||
|
||||
#if NPNPBIOS > 0
|
||||
#include <arch/i386/pnpbios/pnpbiosvar.h>
|
||||
#endif
|
||||
|
||||
int mainbus_match __P((struct device *, struct cfdata *, void *));
|
||||
void mainbus_attach __P((struct device *, struct device *, void *));
|
||||
|
||||
|
@ -69,6 +74,9 @@ union mainbus_attach_args {
|
|||
#if NAPM > 0
|
||||
struct apm_attach_args mba_aaa;
|
||||
#endif
|
||||
#if NPNPBIOS > 0
|
||||
struct pnpbios_attach_args mba_paa;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -76,6 +84,15 @@ union mainbus_attach_args {
|
|||
* time it's checked below, then mainbus attempts to attach an ISA.
|
||||
*/
|
||||
int isa_has_been_seen;
|
||||
struct i386_isa_chipset i386_isa_chipset;
|
||||
#if NISA > 0
|
||||
struct isabus_attach_args mba_iba = {
|
||||
"isa",
|
||||
I386_BUS_SPACE_IO, I386_BUS_SPACE_MEM,
|
||||
&isa_bus_dma_tag,
|
||||
&i386_isa_chipset
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Same as above, but for EISA.
|
||||
|
@ -107,6 +124,14 @@ mainbus_attach(parent, self, aux)
|
|||
|
||||
printf("\n");
|
||||
|
||||
#if NPNPBIOS > 0
|
||||
if (pnpbios_probe()) {
|
||||
mba.mba_paa.paa_busname = "pnpbios";
|
||||
mba.mba_paa.paa_ic = &i386_isa_chipset;
|
||||
config_found(self, &mba.mba_paa, mainbus_print);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* XXX Note also that the presence of a PCI bus should
|
||||
* XXX _always_ be checked, and if present the bus should be
|
||||
|
@ -136,15 +161,11 @@ mainbus_attach(parent, self, aux)
|
|||
config_found(self, &mba.mba_eba, mainbus_print);
|
||||
}
|
||||
|
||||
if (isa_has_been_seen == 0) {
|
||||
mba.mba_iba.iba_busname = "isa";
|
||||
mba.mba_iba.iba_iot = I386_BUS_SPACE_IO;
|
||||
mba.mba_iba.iba_memt = I386_BUS_SPACE_MEM;
|
||||
#if NISA > 0
|
||||
mba.mba_iba.iba_dmat = &isa_bus_dma_tag;
|
||||
if (isa_has_been_seen == 0)
|
||||
config_found(self, &mba_iba, mainbus_print);
|
||||
#endif
|
||||
config_found(self, &mba.mba_iba, mainbus_print);
|
||||
}
|
||||
|
||||
#if NAPM > 0
|
||||
if (apm_busprobe()) {
|
||||
mba.mba_aaa.aaa_busname = "apm";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: isa_machdep.c,v 1.44 1999/10/25 14:49:41 drochner Exp $ */
|
||||
/* $NetBSD: isa_machdep.c,v 1.45 1999/11/12 18:39:38 drochner Exp $ */
|
||||
|
||||
#define ISA_DMA_STATS
|
||||
|
||||
|
@ -531,7 +531,7 @@ isa_attach_hook(parent, self, iba)
|
|||
struct device *parent, *self;
|
||||
struct isabus_attach_args *iba;
|
||||
{
|
||||
static struct i386_isa_chipset i386_isa_chipset;
|
||||
extern struct i386_isa_chipset i386_isa_chipset;
|
||||
extern int isa_has_been_seen;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue