1 /* $NetBSD: ixp12x0_mainbus.c,v 1.7 2005/12/11 12:17:09 christos Exp $ */
4 * Ichiro FUKUHARA <ichiro@ichiro.org>.
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
16 * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA ``AS IS'' AND ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 * IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS HEAD BE LIABLE FOR
20 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 #include <sys/cdefs.h>
30 __KERNEL_RCSID(0, "$NetBSD: ixp12x0_mainbus.c,v 1.7 2005/12/11 12:17:09 christos Exp $");
33 * front-end for the ixp12x0 I/O Processor.
36 #include <sys/param.h>
37 #include <sys/systm.h>
38 #include <sys/device.h>
40 #include <machine/autoconf.h>
41 #include <machine/bus.h>
43 #include <evbarm/ixm1200/ixm1200reg.h>
44 #include <evbarm/ixm1200/ixm1200var.h>
46 #include <arm/ixp12x0/ixp12x0reg.h>
47 #include <arm/ixp12x0/ixp12x0var.h>
51 static int ixp12x0_mainbus_match(struct device
*, struct cfdata
*, void *);
52 static void ixp12x0_mainbus_attach(struct device
*, struct device
*, void *);
54 CFATTACH_DECL(ixpio_mainbus
, sizeof(struct ixp12x0_softc
),
55 ixp12x0_mainbus_match
, ixp12x0_mainbus_attach
, NULL
, NULL
);
57 extern struct bus_space ixp12x0_bs_tag
;
60 ixp12x0_mainbus_match(struct device
*parent
, struct cfdata
*cf
, void *aux
)
66 ixp12x0_mainbus_attach(struct device
*parent
, struct device
*self
, void *aux
)
68 struct ixp12x0_softc
*sc
= (void *) self
;
71 * Initialize the interrupt part of our PCI chipset tag
73 ixm1200_pci_init(&sc
->ia_pci_chipset
, sc
);