| Main index | Section 9 | Options |
#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_graph.h>
ofw_graph_get_port_by_idx() return the port with id idx. It will first check node named port@idx and then fallback on checking the ports child for a child node matching the id. If no ports matching idx is found the function return 0.
ofw_graph_port_get_num_endpoints() returns the number of endpoints a port node have.
ofw_graph_get_endpoint_by_idx() return the endpoint with id idx. It will first check if there is a single child named endpoint and returns it if there is. If there is multiple endpoints it will check the reg property and returns the correct phandle_t or 0 if none match.
ofw_graph_get_remote_endpoint() returns the remote-endpoint property if it exists or 0.
ofw_graph_get_remote_parent() returns the device node corresponding to the remote-endpoint phandle or 0 if none. ofw_graph_get_device_by_port_ep() returns the device associated with the port and endpoint or NULL if none. The device driver should have called OF_device_register_xref() before.
| ofw_graph (9) | April 10, 2019 |
| Main index | Section 9 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | The most horrifying thing about Unix is that, no matter how many times you hit yourself over the head with it, you never quite manage to lose consciousness. It just goes on and on. | ” |
| — Patrick Sobalvarro | ||