Home | History | Annotate | Line # | Download | only in rasoc
autoconf.c revision 1.2.8.1
      1  1.2.8.1  martin /*	$NetBSD: autoconf.c,v 1.2.8.1 2012/08/08 15:51:12 martin Exp $	*/
      2      1.2    matt /*-
      3      1.2    matt  * Copyright (c) 2011 CradlePoint Technology, Inc.
      4      1.2    matt  * All rights reserved.
      5      1.2    matt  *
      6      1.2    matt  *
      7      1.2    matt  * Redistribution and use in source and binary forms, with or without
      8      1.2    matt  * modification, are permitted provided that the following conditions
      9      1.2    matt  * are met:
     10      1.2    matt  * 1. Redistributions of source code must retain the above copyright
     11      1.2    matt  *    notice, this list of conditions and the following disclaimer.
     12      1.2    matt  * 2. Redistributions in binary form must reproduce the above copyright
     13      1.2    matt  *    notice, this list of conditions and the following disclaimer in the
     14      1.2    matt  *    documentation and/or other materials provided with the distribution.
     15      1.2    matt  *
     16      1.2    matt  * THIS SOFTWARE IS PROVIDED BY CRADLEPOINT TECHNOLOGY, INC. AND CONTRIBUTORS
     17      1.2    matt  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     18      1.2    matt  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     19      1.2    matt  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
     20      1.2    matt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     21      1.2    matt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     22      1.2    matt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     23      1.2    matt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     24      1.2    matt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     25      1.2    matt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     26      1.2    matt  * POSSIBILITY OF SUCH DAMAGE.
     27      1.2    matt  */
     28      1.2    matt 
     29      1.2    matt #include <sys/cdefs.h>
     30  1.2.8.1  martin __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2.8.1 2012/08/08 15:51:12 martin Exp $");
     31      1.2    matt 
     32      1.2    matt #include <sys/param.h>
     33      1.2    matt #include <sys/bus.h>
     34      1.2    matt #include <sys/conf.h>
     35      1.2    matt #include <sys/device.h>
     36      1.2    matt #include <sys/systm.h>
     37      1.2    matt 
     38      1.2    matt /*
     39      1.2    matt  * Configure all devices on system
     40      1.2    matt  */
     41      1.2    matt void
     42      1.2    matt cpu_configure(void)
     43      1.2    matt {
     44      1.2    matt 	intr_init();
     45      1.2    matt 
     46      1.2    matt 	/* Kick off autoconfiguration. */
     47      1.2    matt 	if (config_rootfound("mainbus", NULL) == NULL)
     48      1.2    matt 		panic("no mainbus found");
     49      1.2    matt 
     50      1.2    matt 	/*
     51      1.2    matt 	 * Hardware interrupts will be enabled in
     52      1.2    matt 	 * sys/arch/mips/mips/mips3_clockintr.c:mips3_initclocks()
     53      1.2    matt 	 * to avoid hardclock(9) by CPU INT5 before softclockintr is
     54      1.2    matt 	 * initialized in initclocks().
     55      1.2    matt 	 */
     56      1.2    matt }
     57      1.2    matt 
     58      1.2    matt void
     59      1.2    matt cpu_rootconf(void)
     60      1.2    matt {
     61  1.2.8.1  martin 	rootconf();
     62      1.2    matt }
     63      1.2    matt 
     64      1.2    matt void
     65      1.2    matt device_register(struct device *dev, void *aux)
     66      1.2    matt {
     67      1.2    matt 	/* TBD */
     68      1.2    matt }
     69