xref: /netbsd-src/sys/arch/evbarm/ixdp425/ixdp425_mainbus.c (revision a2b8c7fb0742c36745ea1fd35822da4277b62383)
1 /*	$NetBSD: ixdp425_mainbus.c,v 1.9 2012/10/14 14:20:58 msaitoh Exp $ */
2 
3 /*
4  * Copyright (c) 2003
5  *	Ichiro FUKUHARA <ichiro@ichiro.org>.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  *    notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  *    notice, this list of conditions and the following disclaimer in the
15  *    documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY ICHIRO FUKUHARA ``AS IS'' AND ANY EXPRESS OR
18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20  * IN NO EVENT SHALL ICHIRO FUKUHARA OR THE VOICES IN HIS HEAD BE LIABLE FOR
21  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27  * SUCH DAMAGE.
28  */
29 
30 #include <sys/cdefs.h>
31 __KERNEL_RCSID(0, "$NetBSD: ixdp425_mainbus.c,v 1.9 2012/10/14 14:20:58 msaitoh Exp $");
32 
33 /*
34  * front-end for the ixp425 NetworkProcessor.
35  */
36 
37 #include <sys/param.h>
38 #include <sys/systm.h>
39 #include <sys/device.h>
40 
41 #include <machine/autoconf.h>
42 #include <sys/bus.h>
43 
44 #include <arm/xscale/ixp425reg.h>
45 #include <arm/xscale/ixp425var.h>
46 
47 #include <evbarm/ixdp425/ixdp425var.h>
48 
49 #include "locators.h"
50 
51 static int	ixp425_mainbus_match(device_t, cfdata_t, void *);
52 static void	ixp425_mainbus_attach(device_t, device_t, void *);
53 
54 CFATTACH_DECL_NEW(ixpio_mainbus, sizeof(struct ixp425_softc),
55     ixp425_mainbus_match, ixp425_mainbus_attach, NULL, NULL);
56 
57 int
ixp425_mainbus_match(device_t parent,cfdata_t cf,void * aux)58 ixp425_mainbus_match(device_t parent, cfdata_t cf, void *aux)
59 {
60 	return (1);
61 }
62 
63 void
ixp425_mainbus_attach(device_t parent,device_t self,void * aux)64 ixp425_mainbus_attach(device_t parent, device_t self, void *aux)
65 {
66 
67 	ixp425_intr_evcnt_attach();
68 	ixp425_attach(self);
69 }
70