1 | #include <machine/rtems-bsd-kernel-space.h> |
---|
2 | |
---|
3 | /* |
---|
4 | * This file is produced automatically. |
---|
5 | * Do not modify anything in here by hand. |
---|
6 | * |
---|
7 | * Created from source file |
---|
8 | * freebsd-org/sys/dev/ofw/ofw_bus_if.m |
---|
9 | * with |
---|
10 | * makeobjops.awk |
---|
11 | * |
---|
12 | * See the source file for legal information |
---|
13 | */ |
---|
14 | |
---|
15 | #include <sys/param.h> |
---|
16 | #include <sys/queue.h> |
---|
17 | #include <sys/kernel.h> |
---|
18 | #include <sys/kobj.h> |
---|
19 | #include <sys/bus.h> |
---|
20 | #include <dev/ofw/openfirm.h> |
---|
21 | #include <rtems/bsd/local/ofw_bus_if.h> |
---|
22 | |
---|
23 | |
---|
24 | static ofw_bus_get_devinfo_t ofw_bus_default_get_devinfo; |
---|
25 | static ofw_bus_get_compat_t ofw_bus_default_get_compat; |
---|
26 | static ofw_bus_get_model_t ofw_bus_default_get_model; |
---|
27 | static ofw_bus_get_name_t ofw_bus_default_get_name; |
---|
28 | static ofw_bus_get_node_t ofw_bus_default_get_node; |
---|
29 | static ofw_bus_get_type_t ofw_bus_default_get_type; |
---|
30 | static ofw_bus_map_intr_t ofw_bus_default_map_intr; |
---|
31 | |
---|
32 | static const struct ofw_bus_devinfo * |
---|
33 | ofw_bus_default_get_devinfo(device_t bus, device_t dev) |
---|
34 | { |
---|
35 | |
---|
36 | return (NULL); |
---|
37 | } |
---|
38 | |
---|
39 | static const char * |
---|
40 | ofw_bus_default_get_compat(device_t bus, device_t dev) |
---|
41 | { |
---|
42 | |
---|
43 | return (NULL); |
---|
44 | } |
---|
45 | |
---|
46 | static const char * |
---|
47 | ofw_bus_default_get_model(device_t bus, device_t dev) |
---|
48 | { |
---|
49 | |
---|
50 | return (NULL); |
---|
51 | } |
---|
52 | |
---|
53 | static const char * |
---|
54 | ofw_bus_default_get_name(device_t bus, device_t dev) |
---|
55 | { |
---|
56 | |
---|
57 | return (NULL); |
---|
58 | } |
---|
59 | |
---|
60 | static phandle_t |
---|
61 | ofw_bus_default_get_node(device_t bus, device_t dev) |
---|
62 | { |
---|
63 | |
---|
64 | return (-1); |
---|
65 | } |
---|
66 | |
---|
67 | static const char * |
---|
68 | ofw_bus_default_get_type(device_t bus, device_t dev) |
---|
69 | { |
---|
70 | |
---|
71 | return (NULL); |
---|
72 | } |
---|
73 | |
---|
74 | int |
---|
75 | ofw_bus_default_map_intr(device_t bus, device_t dev, phandle_t iparent, |
---|
76 | int icells, pcell_t *interrupt) |
---|
77 | { |
---|
78 | /* Propagate up the bus hierarchy until someone handles it. */ |
---|
79 | if (device_get_parent(bus) != NULL) |
---|
80 | return OFW_BUS_MAP_INTR(device_get_parent(bus), dev, |
---|
81 | iparent, icells, interrupt); |
---|
82 | |
---|
83 | /* If that fails, then assume a one-domain system */ |
---|
84 | return (interrupt[0]); |
---|
85 | } |
---|
86 | |
---|
87 | struct kobjop_desc ofw_bus_get_devinfo_desc = { |
---|
88 | 0, { &ofw_bus_get_devinfo_desc, (kobjop_t)ofw_bus_default_get_devinfo } |
---|
89 | }; |
---|
90 | |
---|
91 | struct kobjop_desc ofw_bus_get_compat_desc = { |
---|
92 | 0, { &ofw_bus_get_compat_desc, (kobjop_t)ofw_bus_default_get_compat } |
---|
93 | }; |
---|
94 | |
---|
95 | struct kobjop_desc ofw_bus_get_model_desc = { |
---|
96 | 0, { &ofw_bus_get_model_desc, (kobjop_t)ofw_bus_default_get_model } |
---|
97 | }; |
---|
98 | |
---|
99 | struct kobjop_desc ofw_bus_get_name_desc = { |
---|
100 | 0, { &ofw_bus_get_name_desc, (kobjop_t)ofw_bus_default_get_name } |
---|
101 | }; |
---|
102 | |
---|
103 | struct kobjop_desc ofw_bus_get_node_desc = { |
---|
104 | 0, { &ofw_bus_get_node_desc, (kobjop_t)ofw_bus_default_get_node } |
---|
105 | }; |
---|
106 | |
---|
107 | struct kobjop_desc ofw_bus_get_type_desc = { |
---|
108 | 0, { &ofw_bus_get_type_desc, (kobjop_t)ofw_bus_default_get_type } |
---|
109 | }; |
---|
110 | |
---|
111 | struct kobjop_desc ofw_bus_map_intr_desc = { |
---|
112 | 0, { &ofw_bus_map_intr_desc, (kobjop_t)ofw_bus_default_map_intr } |
---|
113 | }; |
---|
114 | |
---|