obio.c revision 1.3 1 1.3 christos /* $NetBSD: obio.c,v 1.3 1996/10/13 03:21:26 christos Exp $ */
2 1.1 briggs
3 1.1 briggs /*
4 1.1 briggs * Copyright (c) 1994 Gordon W. Ross
5 1.1 briggs * Copyright (c) 1993 Adam Glass
6 1.1 briggs * All rights reserved.
7 1.1 briggs *
8 1.1 briggs * Redistribution and use in source and binary forms, with or without
9 1.1 briggs * modification, are permitted provided that the following conditions
10 1.1 briggs * are met:
11 1.1 briggs * 1. Redistributions of source code must retain the above copyright
12 1.1 briggs * notice, this list of conditions and the following disclaimer.
13 1.1 briggs * 2. Redistributions in binary form must reproduce the above copyright
14 1.1 briggs * notice, this list of conditions and the following disclaimer in the
15 1.1 briggs * documentation and/or other materials provided with the distribution.
16 1.1 briggs * 3. All advertising materials mentioning features or use of this software
17 1.1 briggs * must display the following acknowledgement:
18 1.1 briggs * This product includes software developed by Adam Glass and Gordon Ross.
19 1.1 briggs * 4. The name of the authors may not be used to endorse or promote products
20 1.1 briggs * derived from this software without specific prior written permission.
21 1.1 briggs *
22 1.1 briggs * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
23 1.1 briggs * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 1.1 briggs * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 1.1 briggs * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 1.1 briggs * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 1.1 briggs * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 1.1 briggs * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 1.1 briggs * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 1.1 briggs * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 1.1 briggs * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 1.1 briggs */
33 1.1 briggs
34 1.1 briggs #include <sys/param.h>
35 1.1 briggs #include <sys/systm.h>
36 1.1 briggs #include <sys/device.h>
37 1.1 briggs
38 1.1 briggs #include <machine/autoconf.h>
39 1.1 briggs #include <machine/pte.h>
40 1.1 briggs
41 1.1 briggs static int obio_match __P((struct device *, void *, void *));
42 1.1 briggs static void obio_attach __P((struct device *, struct device *, void *));
43 1.1 briggs
44 1.1 briggs struct cfattach obio_ca = {
45 1.1 briggs sizeof(struct device), obio_match, obio_attach
46 1.1 briggs };
47 1.1 briggs
48 1.1 briggs struct cfdriver obio_cd = {
49 1.1 briggs NULL, "obio", DV_DULL
50 1.1 briggs };
51 1.1 briggs
52 1.1 briggs static int
53 1.1 briggs obio_match(parent, vcf, aux)
54 1.1 briggs struct device *parent;
55 1.1 briggs void *vcf, *aux;
56 1.1 briggs {
57 1.1 briggs struct confargs *ca = aux;
58 1.1 briggs
59 1.1 briggs if (ca->ca_bustype != BUS_OBIO)
60 1.1 briggs return (0);
61 1.1 briggs return(1);
62 1.1 briggs }
63 1.1 briggs
64 1.1 briggs static void
65 1.1 briggs obio_attach(parent, self, aux)
66 1.1 briggs struct device *parent;
67 1.1 briggs struct device *self;
68 1.1 briggs void *aux;
69 1.1 briggs {
70 1.3 christos printf("\n");
71 1.1 briggs
72 1.1 briggs (void) config_search(bus_scan, self, aux);
73 1.1 briggs }
74