1*cbab9cadSchs /* $NetBSD: nslu2_mainbus.c,v 1.5 2012/10/27 17:17:48 chs Exp $ */
26f616773Sscw
36f616773Sscw /*-
46f616773Sscw * Copyright (c) 2006 The NetBSD Foundation, Inc.
56f616773Sscw * All rights reserved.
66f616773Sscw *
76f616773Sscw * This code is derived from software contributed to The NetBSD Foundation
86f616773Sscw * by Steve C. Woodford.
96f616773Sscw *
106f616773Sscw * Redistribution and use in source and binary forms, with or without
116f616773Sscw * modification, are permitted provided that the following conditions
126f616773Sscw * are met:
136f616773Sscw * 1. Redistributions of source code must retain the above copyright
146f616773Sscw * notice, this list of conditions and the following disclaimer.
156f616773Sscw * 2. Redistributions in binary form must reproduce the above copyright
166f616773Sscw * notice, this list of conditions and the following disclaimer in the
176f616773Sscw * documentation and/or other materials provided with the distribution.
186f616773Sscw *
196f616773Sscw * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
206f616773Sscw * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
216f616773Sscw * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
226f616773Sscw * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
236f616773Sscw * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
246f616773Sscw * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
256f616773Sscw * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
266f616773Sscw * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
276f616773Sscw * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
286f616773Sscw * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
296f616773Sscw * POSSIBILITY OF SUCH DAMAGE.
306f616773Sscw */
316f616773Sscw
326f616773Sscw #include <sys/cdefs.h>
33*cbab9cadSchs __KERNEL_RCSID(0, "$NetBSD: nslu2_mainbus.c,v 1.5 2012/10/27 17:17:48 chs Exp $");
346f616773Sscw
356f616773Sscw #include <sys/param.h>
366f616773Sscw #include <sys/systm.h>
376f616773Sscw #include <sys/device.h>
386f616773Sscw
396f616773Sscw #include <machine/autoconf.h>
406f616773Sscw
416f616773Sscw #include <arm/xscale/ixp425reg.h>
426f616773Sscw #include <arm/xscale/ixp425var.h>
436f616773Sscw
446f616773Sscw static int
ixp425_mainbus_match(device_t parent,cfdata_t cf,void * aux)45*cbab9cadSchs ixp425_mainbus_match(device_t parent, cfdata_t cf, void *aux)
466f616773Sscw {
476f616773Sscw
486f616773Sscw return (1);
496f616773Sscw }
506f616773Sscw
516f616773Sscw static void
ixp425_mainbus_attach(device_t parent,device_t self,void * aux)52*cbab9cadSchs ixp425_mainbus_attach(device_t parent, device_t self, void *aux)
536f616773Sscw {
546f616773Sscw
5582faf916Sryo ixp425_intr_evcnt_attach();
56a2b8c7fbSmsaitoh ixp425_attach(self);
576f616773Sscw }
586f616773Sscw
59a2b8c7fbSmsaitoh CFATTACH_DECL_NEW(ixpio_mainbus, sizeof(struct ixp425_softc),
606f616773Sscw ixp425_mainbus_match, ixp425_mainbus_attach, NULL, NULL);
61