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