The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/ofw/ofw_bus.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 2001, 2003 by Thomas Moestl <tmm@FreeBSD.org>
    3  * Copyright (c) 2004 by Marius Strobl <marius@FreeBSD.org>
    4  * All rights reserved.
    5  *
    6  * Redistribution and use in source and binary forms, with or without
    7  * modification, are permitted provided that the following conditions
    8  * are met:
    9  * 1. Redistributions of source code must retain the above copyright
   10  *    notice, this list of conditions and the following disclaimer.
   11  * 2. Redistributions in binary form must reproduce the above copyright
   12  *    notice, this list of conditions and the following disclaimer in the
   13  *    documentation and/or other materials provided with the distribution.
   14  *
   15  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
   16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   17  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
   18  * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
   19  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
   20  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
   21  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
   22  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   23  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
   24  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   25  *
   26  * $FreeBSD: releng/8.1/sys/dev/ofw/ofw_bus.h 133589 2004-08-12 17:41:33Z marius $
   27  */
   28 
   29 #ifndef _DEV_OFW_OFW_BUS_H_
   30 #define _DEV_OFW_OFW_BUS_H_
   31 
   32 #include <sys/bus.h>
   33 
   34 #include <dev/ofw/openfirm.h>
   35 
   36 #include "ofw_bus_if.h"
   37 
   38 static __inline const char *
   39 ofw_bus_get_compat(device_t dev)
   40 {
   41 
   42         return (OFW_BUS_GET_COMPAT(device_get_parent(dev), dev));
   43 }
   44 
   45 static __inline const char *
   46 ofw_bus_get_model(device_t dev)
   47 {
   48 
   49         return (OFW_BUS_GET_MODEL(device_get_parent(dev), dev));
   50 }
   51 
   52 static __inline const char *
   53 ofw_bus_get_name(device_t dev)
   54 {
   55 
   56         return (OFW_BUS_GET_NAME(device_get_parent(dev), dev));
   57 }
   58 
   59 static __inline phandle_t
   60 ofw_bus_get_node(device_t dev)
   61 {
   62 
   63         return (OFW_BUS_GET_NODE(device_get_parent(dev), dev));
   64 }
   65 
   66 static __inline const char *
   67 ofw_bus_get_type(device_t dev)
   68 {
   69 
   70         return (OFW_BUS_GET_TYPE(device_get_parent(dev), dev));
   71 }
   72 
   73 #endif /* !_DEV_OFW_OFW_BUS_H_ */

Cache object: d6445e6a6394bb1bee6af417d2a32af8


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.