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