summaryrefslogtreecommitdiffstats
path: root/rtemsbsd/include/rtems/bsd/local/ofw_bus_if.h
blob: b21b9eda09e849332b63572ddbf9f8a79f42f7b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*
 * This file is produced automatically.
 * Do not modify anything in here by hand.
 *
 * Created from source file
 *   freebsd-org/sys/dev/ofw/ofw_bus_if.m
 * with
 *   makeobjops.awk
 *
 * See the source file for legal information
 */


#ifndef _ofw_bus_if_h_
#define _ofw_bus_if_h_


struct ofw_bus_devinfo {
	phandle_t	obd_node;
	char		*obd_compat;
	char		*obd_model;
	char		*obd_name;
	char		*obd_type;
	char		*obd_status;
};

/** @brief Unique descriptor for the OFW_BUS_GET_DEVINFO() method */
extern struct kobjop_desc ofw_bus_get_devinfo_desc;
/** @brief A function implementing the OFW_BUS_GET_DEVINFO() method */
typedef const struct ofw_bus_devinfo * ofw_bus_get_devinfo_t(device_t bus,
                                                             device_t dev);

static __inline const struct ofw_bus_devinfo * OFW_BUS_GET_DEVINFO(device_t bus,
                                                                   device_t dev)
{
	kobjop_t _m;
	KOBJOPLOOKUP(((kobj_t)bus)->ops,ofw_bus_get_devinfo);
	return ((ofw_bus_get_devinfo_t *) _m)(bus, dev);
}

/** @brief Unique descriptor for the OFW_BUS_GET_COMPAT() method */
extern struct kobjop_desc ofw_bus_get_compat_desc;
/** @brief A function implementing the OFW_BUS_GET_COMPAT() method */
typedef const char * ofw_bus_get_compat_t(device_t bus, device_t dev);

static __inline const char * OFW_BUS_GET_COMPAT(device_t bus, device_t dev)
{
	kobjop_t _m;
	KOBJOPLOOKUP(((kobj_t)bus)->ops,ofw_bus_get_compat);
	return ((ofw_bus_get_compat_t *) _m)(bus, dev);
}

/** @brief Unique descriptor for the OFW_BUS_GET_MODEL() method */
extern struct kobjop_desc ofw_bus_get_model_desc;
/** @brief A function implementing the OFW_BUS_GET_MODEL() method */
typedef const char * ofw_bus_get_model_t(device_t bus, device_t dev);

static __inline const char * OFW_BUS_GET_MODEL(device_t bus, device_t dev)
{
	kobjop_t _m;
	KOBJOPLOOKUP(((kobj_t)bus)->ops,ofw_bus_get_model);
	return ((ofw_bus_get_model_t *) _m)(bus, dev);
}

/** @brief Unique descriptor for the OFW_BUS_GET_NAME() method */
extern struct kobjop_desc ofw_bus_get_name_desc;
/** @brief A function implementing the OFW_BUS_GET_NAME() method */
typedef const char * ofw_bus_get_name_t(device_t bus, device_t dev);

static __inline const char * OFW_BUS_GET_NAME(device_t bus, device_t dev)
{
	kobjop_t _m;
	KOBJOPLOOKUP(((kobj_t)bus)->ops,ofw_bus_get_name);
	return ((ofw_bus_get_name_t *) _m)(bus, dev);
}

/** @brief Unique descriptor for the OFW_BUS_GET_NODE() method */
extern struct kobjop_desc ofw_bus_get_node_desc;
/** @brief A function implementing the OFW_BUS_GET_NODE() method */
typedef phandle_t ofw_bus_get_node_t(device_t bus, device_t dev);

static __inline phandle_t OFW_BUS_GET_NODE(device_t bus, device_t dev)
{
	kobjop_t _m;
	KOBJOPLOOKUP(((kobj_t)bus)->ops,ofw_bus_get_node);
	return ((ofw_bus_get_node_t *) _m)(bus, dev);
}

/** @brief Unique descriptor for the OFW_BUS_GET_TYPE() method */
extern struct kobjop_desc ofw_bus_get_type_desc;
/** @brief A function implementing the OFW_BUS_GET_TYPE() method */
typedef const char * ofw_bus_get_type_t(device_t bus, device_t dev);

static __inline const char * OFW_BUS_GET_TYPE(device_t bus, device_t dev)
{
	kobjop_t _m;
	KOBJOPLOOKUP(((kobj_t)bus)->ops,ofw_bus_get_type);
	return ((ofw_bus_get_type_t *) _m)(bus, dev);
}

/** @brief Unique descriptor for the OFW_BUS_MAP_INTR() method */
extern struct kobjop_desc ofw_bus_map_intr_desc;
/** @brief A function implementing the OFW_BUS_MAP_INTR() method */
typedef int ofw_bus_map_intr_t(device_t bus, device_t dev, phandle_t iparent,
                               int icells, pcell_t *interrupt);

static __inline int OFW_BUS_MAP_INTR(device_t bus, device_t dev,
                                     phandle_t iparent, int icells,
                                     pcell_t *interrupt)
{
	kobjop_t _m;
	KOBJOPLOOKUP(((kobj_t)bus)->ops,ofw_bus_map_intr);
	return ((ofw_bus_map_intr_t *) _m)(bus, dev, iparent, icells, interrupt);
}

#endif /* _ofw_bus_if_h_ */