35#include "opt_platform.h"
46#include "ofw_bus_if.h"
48#define PORT_MAX_NAME 8
58 snprintf(portnode,
sizeof(portnode),
"port@%d", idx);
65 snprintf(portnode,
sizeof(portnode),
"port");
100 if (strcmp(name,
"endpoint") == 0)
102 else if (strncmp(name,
"endpoint@", 9) == 0)
104 free(name, M_OFWPROP);
163 printf(
"%s: Node %x don't have a name, abort\n", __func__, node);
167 if (strcmp(
"ports", name) == 0)
171 free(name, M_OFWPROP);
178 phandle_t outport, port, endpoint, remote;
METHOD phandle_t child
Return first child of node.
phandle_t ofw_bus_find_child(phandle_t start, const char *child_name)
phandle_t ofw_graph_get_remote_endpoint(phandle_t endpoint)
phandle_t ofw_graph_get_remote_parent(phandle_t remote)
size_t ofw_graph_port_get_num_endpoints(phandle_t port)
phandle_t ofw_graph_get_port_by_idx(phandle_t node, uint32_t idx)
device_t ofw_graph_get_device_by_port_ep(phandle_t node, uint32_t port_id, uint32_t ep_id)
phandle_t ofw_graph_get_endpoint_by_idx(phandle_t port, uint32_t idx)
phandle_t OF_node_from_xref(phandle_t xref)
phandle_t OF_peer(phandle_t node)
phandle_t OF_xref_from_node(phandle_t node)
device_t OF_device_from_xref(phandle_t xref)
phandle_t OF_parent(phandle_t node)
ssize_t OF_getencprop(phandle_t node, const char *propname, pcell_t *buf, size_t len)
ssize_t OF_getprop_alloc(phandle_t package, const char *propname, void **buf)
phandle_t OF_child(phandle_t node)