osm-l3.c (50501936288d6a29d7ef78f25d00e33240fad45f) | osm-l3.c (dd4904f3b924b489a0adbd88768fadaadab94156) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. 4 */ 5 6#include <linux/bitfield.h> 7#include <linux/clk.h> 8#include <linux/interconnect-provider.h> 9#include <linux/io.h> 10#include <linux/kernel.h> 11#include <linux/module.h> | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. 4 */ 5 6#include <linux/bitfield.h> 7#include <linux/clk.h> 8#include <linux/interconnect-provider.h> 9#include <linux/io.h> 10#include <linux/kernel.h> 11#include <linux/module.h> |
12#include <linux/of_device.h> | 12#include <linux/of.h> |
13#include <linux/platform_device.h> 14 15#include <dt-bindings/interconnect/qcom,osm-l3.h> 16 17#define LUT_MAX_ENTRIES 40U 18#define LUT_SRC GENMASK(31, 30) 19#define LUT_L_VAL GENMASK(7, 0) 20#define CLK_HW_DIV 2 --- 206 unchanged lines hidden (view full) --- 227 qp->max_state = i; 228 229 qnodes = desc->nodes; 230 num_nodes = desc->num_nodes; 231 232 data = devm_kzalloc(&pdev->dev, struct_size(data, nodes, num_nodes), GFP_KERNEL); 233 if (!data) 234 return -ENOMEM; | 13#include <linux/platform_device.h> 14 15#include <dt-bindings/interconnect/qcom,osm-l3.h> 16 17#define LUT_MAX_ENTRIES 40U 18#define LUT_SRC GENMASK(31, 30) 19#define LUT_L_VAL GENMASK(7, 0) 20#define CLK_HW_DIV 2 --- 206 unchanged lines hidden (view full) --- 227 qp->max_state = i; 228 229 qnodes = desc->nodes; 230 num_nodes = desc->num_nodes; 231 232 data = devm_kzalloc(&pdev->dev, struct_size(data, nodes, num_nodes), GFP_KERNEL); 233 if (!data) 234 return -ENOMEM; |
235 data->num_nodes = num_nodes; |
|
235 236 provider = &qp->provider; 237 provider->dev = &pdev->dev; 238 provider->set = qcom_osm_l3_set; 239 provider->aggregate = icc_std_aggregate; 240 provider->xlate = of_icc_xlate_onecell; 241 provider->data = data; 242 --- 13 unchanged lines hidden (view full) --- 256 node->data = (void *)qnodes[i]; 257 icc_node_add(node, provider); 258 259 for (j = 0; j < qnodes[i]->num_links; j++) 260 icc_link_create(node, qnodes[i]->links[j]); 261 262 data->nodes[i] = node; 263 } | 236 237 provider = &qp->provider; 238 provider->dev = &pdev->dev; 239 provider->set = qcom_osm_l3_set; 240 provider->aggregate = icc_std_aggregate; 241 provider->xlate = of_icc_xlate_onecell; 242 provider->data = data; 243 --- 13 unchanged lines hidden (view full) --- 257 node->data = (void *)qnodes[i]; 258 icc_node_add(node, provider); 259 260 for (j = 0; j < qnodes[i]->num_links; j++) 261 icc_link_create(node, qnodes[i]->links[j]); 262 263 data->nodes[i] = node; 264 } |
264 data->num_nodes = num_nodes; | |
265 266 ret = icc_provider_register(provider); 267 if (ret) 268 goto err; 269 270 platform_set_drvdata(pdev, qp); 271 272 return 0; --- 32 unchanged lines hidden --- | 265 266 ret = icc_provider_register(provider); 267 if (ret) 268 goto err; 269 270 platform_set_drvdata(pdev, qp); 271 272 return 0; --- 32 unchanged lines hidden --- |