int i;
struct coresight_connection *conn;
- for (i = 0; i < parent->pdata->nr_outport; i++) {
+ for (i = 0; i < parent->pdata->nr_outconns; i++) {
conn = &parent->pdata->out_conns[i];
if (conn->child_dev == csdev)
return conn->child_port;
int i;
struct coresight_connection *conn;
- for (i = 0; i < csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < csdev->pdata->nr_outconns; i++) {
conn = &csdev->pdata->out_conns[i];
if (conn->child_dev == child)
return conn->outport;
link_subtype = csdev->subtype.link_subtype;
if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_MERG) {
- nr_conns = csdev->pdata->nr_inport;
+ nr_conns = csdev->pdata->nr_inconns;
} else if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_SPLIT) {
- nr_conns = csdev->pdata->nr_outport;
+ nr_conns = csdev->pdata->nr_outconns;
} else {
nr_conns = 1;
}
/*
* Recursively explore each port found on this element.
*/
- for (i = 0; i < csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < csdev->pdata->nr_outconns; i++) {
struct coresight_device *child_dev;
child_dev = csdev->pdata->out_conns[i].child_dev;
{
int i;
- for (i = 0; i < csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < csdev->pdata->nr_outconns; i++) {
struct coresight_device *child;
child = csdev->pdata->out_conns[i].child_dev;
int i;
coresight_put_ref(csdev);
- for (i = 0; i < csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < csdev->pdata->nr_outconns; i++) {
struct coresight_device *child;
child = csdev->pdata->out_conns[i].child_dev;
}
/* Not a sink - recursively explore each port found on this element */
- for (i = 0; i < csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < csdev->pdata->nr_outconns; i++) {
struct coresight_device *child_dev;
child_dev = csdev->pdata->out_conns[i].child_dev;
* Not a sink we want - or possible child sink may be better.
* recursively explore each port found on this element.
*/
- for (i = 0; i < csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < csdev->pdata->nr_outconns; i++) {
struct coresight_device *child_dev, *sink = NULL;
int child_depth = curr_depth;
* Circle throuch all the connection of that component. If we find
* an orphan connection whose name matches @csdev, link it.
*/
- for (i = 0; i < i_csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < i_csdev->pdata->nr_outconns; i++) {
conn = &i_csdev->pdata->out_conns[i];
/* Skip the port if FW doesn't describe it */
{
int i, ret = 0;
- for (i = 0; i < csdev->pdata->nr_outport; i++) {
+ for (i = 0; i < csdev->pdata->nr_outconns; i++) {
struct coresight_connection *conn = &csdev->pdata->out_conns[i];
if (!conn->child_fwnode)
* Circle throuch all the connection of that component. If we find
* a connection whose name matches @csdev, remove it.
*/
- for (i = 0; i < iterator->pdata->nr_outport; i++) {
+ for (i = 0; i < iterator->pdata->nr_outconns; i++) {
conn = &iterator->pdata->out_conns[i];
if (conn->child_dev == NULL || conn->child_fwnode == NULL)
* doesn't have at least one input port, there is no point
* in searching all the devices.
*/
- if (csdev->pdata->nr_inport)
+ if (csdev->pdata->nr_inconns)
bus_for_each_dev(&coresight_bustype, NULL,
csdev, coresight_remove_match);
}
int i;
struct coresight_connection *conns = pdata->out_conns;
- for (i = 0; i < pdata->nr_outport; i++) {
+ for (i = 0; i < pdata->nr_outconns; i++) {
/* If we have made the links, remove them now */
if (csdev && conns[i].child_dev)
coresight_remove_links(csdev, &conns[i]);
link_subtype = desc->subtype.link_subtype;
if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_MERG)
- nr_refcnts = desc->pdata->nr_inport;
+ nr_refcnts = desc->pdata->nr_inconns;
else if (link_subtype == CORESIGHT_DEV_SUBTYPE_LINK_SPLIT)
- nr_refcnts = desc->pdata->nr_outport;
+ nr_refcnts = desc->pdata->nr_outconns;
}
refcnts = kcalloc(nr_refcnts, sizeof(*refcnts), GFP_KERNEL);
static int coresight_alloc_conns(struct device *dev,
struct coresight_platform_data *pdata)
{
- if (pdata->nr_outport) {
- pdata->out_conns = devm_kcalloc(dev, pdata->nr_outport,
+ if (pdata->nr_outconns) {
+ pdata->out_conns = devm_kcalloc(dev, pdata->nr_outconns,
sizeof(*pdata->out_conns), GFP_KERNEL);
if (!pdata->out_conns)
return -ENOMEM;
}
static void of_coresight_get_ports_legacy(const struct device_node *node,
- int *nr_inport, int *nr_outport)
+ int *nr_inconns, int *nr_outconns)
{
struct device_node *ep = NULL;
struct of_endpoint endpoint;
} while (ep);
- *nr_inport = in;
- *nr_outport = out;
+ *nr_inconns = in;
+ *nr_outconns = out;
}
static struct device_node *of_coresight_get_port_parent(struct device_node *ep)
}
static void of_coresight_get_ports(const struct device_node *node,
- int *nr_inport, int *nr_outport)
+ int *nr_inconns, int *nr_outconns)
{
struct device_node *input_ports = NULL, *output_ports = NULL;
if (input_ports || output_ports) {
if (input_ports) {
- *nr_inport = of_coresight_count_ports(input_ports);
+ *nr_inconns = of_coresight_count_ports(input_ports);
of_node_put(input_ports);
}
if (output_ports) {
- *nr_outport = of_coresight_count_ports(output_ports);
+ *nr_outconns = of_coresight_count_ports(output_ports);
of_node_put(output_ports);
}
} else {
/* Fall back to legacy DT bindings parsing */
- of_coresight_get_ports_legacy(node, nr_inport, nr_outport);
+ of_coresight_get_ports_legacy(node, nr_inconns, nr_outconns);
}
}
struct device_node *node = dev->of_node;
/* Get the number of input and output port for this component */
- of_coresight_get_ports(node, &pdata->nr_inport, &pdata->nr_outport);
+ of_coresight_get_ports(node, &pdata->nr_inconns, &pdata->nr_outconns);
/* If there are no output connections, we are done */
- if (!pdata->nr_outport)
+ if (!pdata->nr_outconns)
return 0;
ret = coresight_alloc_conns(dev, pdata);
const union acpi_object *graph;
struct coresight_connection *conns, *ptr;
- pdata->nr_inport = pdata->nr_outport = 0;
+ pdata->nr_inconns = pdata->nr_outconns = 0;
graph = acpi_get_coresight_graph(adev);
if (!graph)
return -ENOENT;
return dir;
if (dir == ACPI_CORESIGHT_LINK_MASTER) {
- if (ptr->outport >= pdata->nr_outport)
- pdata->nr_outport = ptr->outport + 1;
+ if (ptr->outport >= pdata->nr_outconns)
+ pdata->nr_outconns = ptr->outport + 1;
ptr++;
} else {
- WARN_ON(pdata->nr_inport == ptr->child_port + 1);
+ WARN_ON(pdata->nr_inconns == ptr->child_port + 1);
/*
* We do not track input port connections for a device.
* However we need the highest port number described,
* record for an output connection. Hence, do not move
* the ptr for input connections
*/
- if (ptr->child_port >= pdata->nr_inport)
- pdata->nr_inport = ptr->child_port + 1;
+ if (ptr->child_port >= pdata->nr_inconns)
+ pdata->nr_inconns = ptr->child_port + 1;
}
}