Home | History | Annotate | Line # | Download | only in ibm4xx
board_prop.c revision 1.1.2.2
      1  1.1.2.2  skrll /*	$NetBSD: board_prop.c,v 1.1.2.2 2005/01/24 08:34:26 skrll Exp $	*/
      2  1.1.2.2  skrll 
      3  1.1.2.2  skrll /*
      4  1.1.2.2  skrll  * Copyright (c) 2004 Shigeyuki Fukushima.
      5  1.1.2.2  skrll  * All rights reserved.
      6  1.1.2.2  skrll  *
      7  1.1.2.2  skrll  * Redistribution and use in source and binary forms, with or without
      8  1.1.2.2  skrll  * modification, are permitted provided that the following conditions
      9  1.1.2.2  skrll  * are met:
     10  1.1.2.2  skrll  * 1. Redistributions of source code must retain the above copyright
     11  1.1.2.2  skrll  *    notice, this list of conditions and the following disclaimer.
     12  1.1.2.2  skrll  * 2. Redistributions in binary form must reproduce the above
     13  1.1.2.2  skrll  *    copyright notice, this list of conditions and the following
     14  1.1.2.2  skrll  *    disclaimer in the documentation and/or other materials provided
     15  1.1.2.2  skrll  *    with the distribution.
     16  1.1.2.2  skrll  * 3. The name of the author may not be used to endorse or promote
     17  1.1.2.2  skrll  *    products derived from this software without specific prior
     18  1.1.2.2  skrll  *    written permission.
     19  1.1.2.2  skrll  *
     20  1.1.2.2  skrll  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
     21  1.1.2.2  skrll  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     22  1.1.2.2  skrll  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     23  1.1.2.2  skrll  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
     24  1.1.2.2  skrll  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     25  1.1.2.2  skrll  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
     26  1.1.2.2  skrll  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     27  1.1.2.2  skrll  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
     28  1.1.2.2  skrll  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
     29  1.1.2.2  skrll  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
     30  1.1.2.2  skrll  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     31  1.1.2.2  skrll  */
     32  1.1.2.2  skrll 
     33  1.1.2.2  skrll #include <sys/cdefs.h>
     34  1.1.2.2  skrll __KERNEL_RCSID(0, "$NetBSD: board_prop.c,v 1.1.2.2 2005/01/24 08:34:26 skrll Exp $");
     35  1.1.2.2  skrll 
     36  1.1.2.2  skrll #include <sys/param.h>
     37  1.1.2.2  skrll #include <sys/properties.h>
     38  1.1.2.2  skrll #include <sys/systm.h>
     39  1.1.2.2  skrll 
     40  1.1.2.2  skrll #include <machine/cpu.h>
     41  1.1.2.2  skrll 
     42  1.1.2.2  skrll struct propdb *board_info = NULL;
     43  1.1.2.2  skrll 
     44  1.1.2.2  skrll void
     45  1.1.2.2  skrll board_info_init(void)
     46  1.1.2.2  skrll {
     47  1.1.2.2  skrll 
     48  1.1.2.2  skrll 	/*
     49  1.1.2.2  skrll 	 * Set up the board properties database.
     50  1.1.2.2  skrll 	 */
     51  1.1.2.2  skrll 	if (board_info != NULL)
     52  1.1.2.2  skrll 		return;
     53  1.1.2.2  skrll 	if (!(board_info = propdb_create("board properties")))
     54  1.1.2.2  skrll 		panic("Cannot create board properties database");
     55  1.1.2.2  skrll }
     56