endpoint, of_dev_node_match);
}
+static inline bool of_coresight_ep_is_input(struct device_node *ep)
+{
+ return of_property_read_bool(ep, "slave-mode");
+}
+
static void of_coresight_get_ports(const struct device_node *node,
int *nr_inport, int *nr_outport)
{
if (!ep)
break;
- if (of_property_read_bool(ep, "slave-mode"))
+ if (of_coresight_ep_is_input(ep))
in++;
else
out++;
* No need to deal with input ports, as processing the
* output ports connected to them will process the details.
*/
- if (of_find_property(ep, "slave-mode", NULL))
+ if (of_coresight_ep_is_input(ep))
continue;
ret = of_coresight_parse_endpoint(dev, ep, pdata, i);