Lines Matching full:node
28 static int imx_icc_node_set(struct icc_node *node) in imx_icc_node_set() argument
30 struct device *dev = node->provider->dev; in imx_icc_node_set()
31 struct imx_icc_node *node_data = node->data; in imx_icc_node_set()
37 freq = (node->avg_bw + node->peak_bw) * node_data->desc->adj->bw_mul; in imx_icc_node_set()
39 dev_dbg(dev, "node %s device %s avg_bw %ukBps peak_bw %ukBps min_freq %llukHz\n", in imx_icc_node_set()
40 node->name, dev_name(node_data->qos_dev), in imx_icc_node_set()
41 node->avg_bw, node->peak_bw, freq); in imx_icc_node_set()
45 node->name); in imx_icc_node_set()
60 static void imx_icc_node_destroy(struct icc_node *node) in imx_icc_node_destroy() argument
62 struct imx_icc_node *node_data = node->data; in imx_icc_node_destroy()
68 dev_warn(node->provider->dev, in imx_icc_node_destroy()
74 icc_node_del(node); in imx_icc_node_destroy()
75 icc_node_destroy(node->id); in imx_icc_node_destroy()
79 struct icc_node *node) in imx_icc_node_init_qos() argument
81 struct imx_icc_node *node_data = node->data; in imx_icc_node_init_qos()
89 dev_dbg(dev, "icc node %s[%d] is main noc itself\n", in imx_icc_node_init_qos()
90 node->name, node->id); in imx_icc_node_init_qos()
98 /* Allow scaling to be disabled on a per-node basis */ in imx_icc_node_init_qos()
101 adj->phandle_name, node->name); in imx_icc_node_init_qos()
108 dev_warn(dev, "node %s[%d] missing device for %pOF\n", in imx_icc_node_init_qos()
109 node->name, node->id, dn); in imx_icc_node_init_qos()
113 dev_dbg(dev, "node %s[%d] has device node %pOF\n", in imx_icc_node_init_qos()
114 node->name, node->id, dn); in imx_icc_node_init_qos()
127 struct icc_node *node; in imx_icc_node_add() local
130 node = icc_node_create(node_desc->id); in imx_icc_node_add()
131 if (IS_ERR(node)) { in imx_icc_node_add()
132 dev_err(dev, "failed to create node %d\n", node_desc->id); in imx_icc_node_add()
133 return node; in imx_icc_node_add()
136 if (node->data) { in imx_icc_node_add()
137 dev_err(dev, "already created node %s id=%d\n", in imx_icc_node_add()
144 icc_node_destroy(node->id); in imx_icc_node_add()
148 node->name = node_desc->name; in imx_icc_node_add()
149 node->data = node_data; in imx_icc_node_add()
151 icc_node_add(node, provider); in imx_icc_node_add()
154 ret = imx_icc_node_init_qos(provider, node); in imx_icc_node_add()
156 imx_icc_node_destroy(node); in imx_icc_node_add()
161 return node; in imx_icc_node_add()
166 struct icc_node *node, *tmp; in imx_icc_unregister_nodes() local
168 list_for_each_entry_safe(node, tmp, &provider->nodes, node_list) in imx_icc_unregister_nodes()
169 imx_icc_node_destroy(node); in imx_icc_unregister_nodes()
181 struct icc_node *node; in imx_icc_register_nodes() local
185 node = imx_icc_node_add(provider, node_desc); in imx_icc_register_nodes()
186 if (IS_ERR(node)) { in imx_icc_register_nodes()
187 ret = dev_err_probe(provider->dev, PTR_ERR(node), in imx_icc_register_nodes()
191 provider_data->nodes[node->id] = node; in imx_icc_register_nodes()
194 ret = icc_link_create(node, node_desc->links[j]); in imx_icc_register_nodes()
196 dev_err(provider->dev, "failed to link node %d to %d: %d\n", in imx_icc_register_nodes()
197 node->id, node_desc->links[j], ret); in imx_icc_register_nodes()