diff options
author | phk <phk@FreeBSD.org> | 1996-09-06 23:09:20 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-09-06 23:09:20 +0000 |
commit | bca885205da7f15208946f0896edc2eda3caff01 (patch) | |
tree | 35dad08bf59366e84921fd4aad9718c2f9426a1b /sys/pci | |
parent | 9640e2d9e8f825813ec445d294de60884ad82bc8 (diff) | |
download | FreeBSD-src-bca885205da7f15208946f0896edc2eda3caff01.zip FreeBSD-src-bca885205da7f15208946f0896edc2eda3caff01.tar.gz |
Remove devconf, it never grew up to be of any use.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_de.c | 18 | ||||
-rw-r--r-- | sys/pci/if_fxp.c | 12 | ||||
-rw-r--r-- | sys/pci/if_pdq.c | 24 | ||||
-rw-r--r-- | sys/pci/if_vx.c | 6 | ||||
-rw-r--r-- | sys/pci/meteor.c | 1 | ||||
-rw-r--r-- | sys/pci/ncr.c | 5 | ||||
-rw-r--r-- | sys/pci/pci.c | 79 | ||||
-rw-r--r-- | sys/pci/pcisupport.c | 3 | ||||
-rw-r--r-- | sys/pci/pcivar.h | 5 |
9 files changed, 23 insertions, 130 deletions
diff --git a/sys/pci/if_de.c b/sys/pci/if_de.c index 3078142..32c3e6a 100644 --- a/sys/pci/if_de.c +++ b/sys/pci/if_de.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_de.c,v 1.48 1996/06/14 05:25:32 davidg Exp $ + * $Id: if_de.c,v 1.49 1996/08/06 21:09:25 phk Exp $ * */ @@ -46,7 +46,6 @@ #include <sys/kernel.h> #include <sys/proc.h> /* only for declaration of wakeup() used by vm.h */ #if defined(__FreeBSD__) -#include <sys/devconf.h> #include <machine/clock.h> #elif defined(__bsdi__) || defined(__NetBSD__) #include <sys/device.h> @@ -3712,17 +3711,14 @@ static const int tulip_eisa_irqs[4] = { IRQ5, IRQ9, IRQ10, IRQ11 }; static int tulip_pci_shutdown( - struct kern_devconf * const kdc, + int unit, int force) { - if (kdc->kdc_unit < tulip_count) { - tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(kdc->kdc_unit); - TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET); - DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at - 33MHz that comes to two microseconds but wait a - bit longer anyways) */ - } - (void) dev_detach(kdc); + tulip_softc_t * const sc = TULIP_UNIT_TO_SOFTC(unit); + TULIP_CSR_WRITE(sc, csr_busmode, TULIP_BUSMODE_SWRESET); + DELAY(10); /* Wait 10 microseconds (actually 50 PCI cycles but at + 33MHz that comes to two microseconds but wait a + bit longer anyways) */ return 0; } diff --git a/sys/pci/if_fxp.c b/sys/pci/if_fxp.c index fa64fca..6da34be 100644 --- a/sys/pci/if_fxp.c +++ b/sys/pci/if_fxp.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: if_fxp.c,v 1.12 1996/04/08 01:31:41 davidg Exp $ + * $Id: if_fxp.c,v 1.13 1996/06/01 23:25:10 gpalmer Exp $ */ /* @@ -39,7 +39,6 @@ #include <sys/mbuf.h> #include <sys/malloc.h> #include <sys/kernel.h> -#include <sys/devconf.h> #include <sys/syslog.h> #include <net/if.h> @@ -131,7 +130,7 @@ static u_char fxp_cb_config_template[] = { static inline int fxp_scb_wait __P((struct fxp_csr *)); static char *fxp_probe __P((pcici_t, pcidi_t)); static void fxp_attach __P((pcici_t, int)); -static int fxp_shutdown __P((struct kern_devconf *, int)); +static int fxp_shutdown __P((int, int)); static void fxp_intr __P((void *)); static void fxp_start __P((struct ifnet *)); static int fxp_ioctl __P((struct ifnet *, int, caddr_t)); @@ -392,15 +391,14 @@ fxp_get_macaddr(sc) * kernel memory doesn't get clobbered during warmboot. */ static int -fxp_shutdown(kdc, force) - struct kern_devconf *kdc; +fxp_shutdown(unit, force) + int unit; int force; { - struct fxp_softc *sc = fxp_sc[kdc->kdc_unit]; + struct fxp_softc *sc = fxp_sc[unit]; fxp_stop(sc); - (void) dev_detach(kdc); return 0; } diff --git a/sys/pci/if_pdq.c b/sys/pci/if_pdq.c index 4c749bb..e4092cd 100644 --- a/sys/pci/if_pdq.c +++ b/sys/pci/if_pdq.c @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: if_pdq.c,v 1.15 1996/03/23 19:29:10 fenner Exp $ + * $Id: if_pdq.c,v 1.16 1996/06/18 01:22:40 bde Exp $ * */ @@ -97,7 +97,6 @@ #if NFEA > 0 #include <i386/isa/icu.h> #ifdef __FreeBSD__ -#include <sys/devconf.h> #include <i386/isa/isa_device.h> #endif #ifdef __bsdi__ @@ -619,26 +618,6 @@ pdq_eisa_devinit( } #ifdef __FreeBSD__ -static struct kern_devconf kdc_fea[NFEA] = { { - 0, 0, 0, /* filled in by dev_attach */ - "fea", 0, { MDDT_ISA, 0, "net" }, - isa_generic_externalize, 0, 0, ISA_EXTERNALLEN, - &kdc_isa0, /* parent */ - 0, /* parentdata */ - DC_BUSY, /* host adapters are always ``in use'' */ - "DEC DEFEA EISA FDDI Controller" -} }; - -static inline void -pdq_eisa_registerdev( - struct isa_device *id) -{ - if (id->id_unit) - kdc_fea[id->id_unit] = kdc_fea[0]; - kdc_fea[id->id_unit].kdc_unit = id->id_unit; - kdc_fea[id->id_unit].kdc_parentdata = id; - dev_attach(&kdc_fea[id->id_unit]); -} static int pdq_eisa_slots = ~1; @@ -707,7 +686,6 @@ pdq_eisa_attach( bcopy((caddr_t) sc->sc_pdq->pdq_hwaddr.lanaddr_bytes, sc->sc_ac.ac_enaddr, 6); pdq_ifattach(sc, pdq_eisa_ifinit, pdq_eisa_ifreset, pdq_eisa_ifwatchdog); - pdq_eisa_registerdev(id); return 1; } diff --git a/sys/pci/if_vx.c b/sys/pci/if_vx.c index f0e86e1..36b6ed6 100644 --- a/sys/pci/if_vx.c +++ b/sys/pci/if_vx.c @@ -61,7 +61,6 @@ #if defined(__FreeBSD__) #include <sys/systm.h> #include <sys/kernel.h> -#include <sys/devconf.h> #endif #include <sys/mbuf.h> #include <sys/socket.h> @@ -157,11 +156,10 @@ get_e(unit, offset) static int vx_pci_shutdown( - struct kern_devconf * const kdc, + int unit, int force) { - vxreset(kdc->kdc_unit); - dev_detach(kdc); + vxreset(unit); return 0; } diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c index b4c8b74..a03963b 100644 --- a/sys/pci/meteor.c +++ b/sys/pci/meteor.c @@ -159,7 +159,6 @@ #include <sys/kernel.h> #include <sys/proc.h> #include <sys/signalvar.h> -#include <sys/devconf.h> #include <sys/mman.h> #ifdef DEVFS #include <sys/devfsext.h> diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 93f1fe9..20e181c 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.75 1996/08/26 22:38:07 se Exp $ +** $Id: ncr.c,v 1.76 1996/08/27 20:41:02 se Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -197,7 +197,6 @@ #ifndef __NetBSD__ -#include <sys/devconf.h> #include <pci/pcivar.h> #include <pci/pcireg.h> #include <pci/ncrreg.h> @@ -1254,7 +1253,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.75 1996/08/26 22:38:07 se Exp $\n"; + "\n$Id: ncr.c,v 1.76 1996/08/27 20:41:02 se Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 diff --git a/sys/pci/pci.c b/sys/pci/pci.c index 6bc7c9d..db97c8b 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pci.c,v 1.52 1996/09/02 21:23:04 se Exp $ +** $Id: pci.c,v 1.53 1996/09/05 21:28:51 se Exp $ ** ** General subroutines for the PCI bus. ** pci_configure () @@ -53,13 +53,11 @@ #include <sys/kernel.h> #include <sys/sysctl.h> #include <sys/proc.h> /* declaration of wakeup(), used by vm.h */ -#include <sys/devconf.h> #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/pmap.h> -#include <sys/devconf.h> #include <i386/isa/isa_device.h> /* XXX inthand2_t */ @@ -77,21 +75,7 @@ **======================================================== */ -extern struct kern_devconf kdc_cpu0; - -struct kern_devconf kdc_pci0 = { - 0, 0, 0, /* filled in by dev_attach */ - "pci", 0, { MDDT_BUS, 0 }, - 0, 0, 0, BUS_EXTERNALLEN, - &kdc_cpu0, /* parent is the CPU */ - 0, /* no parentdata */ - DC_BUSY, /* busses are always busy */ - "PCI bus", - DC_CLS_BUS /* class */ -}; - struct pci_devconf { - struct kern_devconf pdc_kdc; struct pci_info pdc_pi; }; @@ -123,10 +107,6 @@ struct pcicb { u_long pcicb_p_memlimit; }; -static int pci_externalize (struct kern_devconf *, struct sysctl_req *); - -static int pci_internalize (struct kern_devconf *, struct sysctl_req *); - static void not_supported (pcici_t tag, u_long type); @@ -677,27 +657,7 @@ pci_bus_config (void) pdcp -> pdc_pi.pi_bus = bus_no; pdcp -> pdc_pi.pi_device = device; pdcp -> pdc_pi.pi_func = func; - - pdcp -> pdc_kdc.kdc_name = dvp->pd_name; - pdcp -> pdc_kdc.kdc_unit = unit; - - pdcp -> pdc_kdc.kdc_md.mddc_devtype = MDDT_PCI; - - pdcp -> pdc_kdc.kdc_externalize = pci_externalize; - pdcp -> pdc_kdc.kdc_internalize = pci_internalize; - - pdcp -> pdc_kdc.kdc_datalen = PCI_EXTERNAL_LEN; - pdcp -> pdc_kdc.kdc_parent = &kdc_pci0; - pdcp -> pdc_kdc.kdc_parentdata = &pdcp->pdc_pi; - pdcp -> pdc_kdc.kdc_state = DC_UNKNOWN; - pdcp -> pdc_kdc.kdc_description = name; - pdcp -> pdc_kdc.kdc_shutdown = dvp->pd_shutdown; - - /* - ** And register this device - */ - - dev_attach (&pdcp->pdc_kdc); + pdcp -> pdc_pi.pi_unit = unit; /* ** attach device @@ -937,8 +897,6 @@ void pci_configure() ** hello world .. */ - dev_attach(&kdc_pci0); - pciroots = 1; while (pciroots--) { @@ -1196,39 +1154,6 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa) return (1); } -/*------------------------------------------------------------ -** -** Interface functions for the devconf module. -** -**------------------------------------------------------------ -*/ - -static int -pci_externalize (struct kern_devconf *kdcp, struct sysctl_req *req) -{ - struct pci_externalize_buffer buffer; - struct pci_info * pip = kdcp->kdc_parentdata; - pcici_t tag; - int i; - - tag = pcibus->pb_tag (pip->pi_bus, pip->pi_device, pip->pi_func); - - buffer.peb_pci_info = *pip; - - for (i=0; i<PCI_EXT_CONF_LEN; i++) { - buffer.peb_config[i] = pci_conf_read (tag, i*4); - }; - - return SYSCTL_OUT(req, &buffer, sizeof buffer); -} - - -static int -pci_internalize (struct kern_devconf *kdcp, struct sysctl_req *re) -{ - return EOPNOTSUPP; -} - /*----------------------------------------------------------------------- ** ** Pci meta interrupt handler diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c index a4b6daa..dae2bac 100644 --- a/sys/pci/pcisupport.c +++ b/sys/pci/pcisupport.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcisupport.c,v 1.36 1996/09/05 21:34:12 se Exp $ +** $Id: pcisupport.c,v 1.37 1996/09/06 09:21:48 rgrimes Exp $ ** ** Device driver for DEC/INTEL PCI chipsets. ** @@ -46,7 +46,6 @@ #include <sys/systm.h> #include <sys/malloc.h> #include <sys/kernel.h> -#include <sys/devconf.h> #include <pci/pcivar.h> #include <pci/pcireg.h> diff --git a/sys/pci/pcivar.h b/sys/pci/pcivar.h index 4f4a29f..51516ec 100644 --- a/sys/pci/pcivar.h +++ b/sys/pci/pcivar.h @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pcivar.h,v 1.9 1996/01/25 18:32:00 se Exp $ +** $Id: pcivar.h,v 1.10 1996/03/19 15:02:58 bde Exp $ ** ** Declarations for pci device drivers. ** @@ -132,7 +132,7 @@ struct pci_device { char* (*pd_probe ) (pcici_t tag, pcidi_t type); void (*pd_attach) (pcici_t tag, int unit); u_long *pd_count; - int (*pd_shutdown) (struct kern_devconf *, int); + int (*pd_shutdown) (int, int); }; /*----------------------------------------------------------------- @@ -161,6 +161,7 @@ struct pci_info { u_char pi_device; u_char pi_func; u_char pi_dummy; + u_char pi_unit; }; #define PCI_EXT_CONF_LEN (16) |