38
38
39
39
#define OSM_L3_MAX_LINKS 1
40
40
41
- #define to_qcom_provider (_provider ) \
41
+ #define to_osm_l3_provider (_provider ) \
42
42
container_of(_provider, struct qcom_osm_l3_icc_provider, provider)
43
43
44
44
struct qcom_osm_l3_icc_provider {
@@ -50,31 +50,31 @@ struct qcom_osm_l3_icc_provider {
50
50
};
51
51
52
52
/**
53
- * struct qcom_icc_node - Qualcomm specific interconnect nodes
53
+ * struct qcom_osm_l3_node - Qualcomm specific interconnect nodes
54
54
* @name: the node name used in debugfs
55
55
* @links: an array of nodes where we can go next while traversing
56
56
* @id: a unique node identifier
57
57
* @num_links: the total number of @links
58
58
* @buswidth: width of the interconnect between a node and the bus
59
59
*/
60
- struct qcom_icc_node {
60
+ struct qcom_osm_l3_node {
61
61
const char * name ;
62
62
u16 links [OSM_L3_MAX_LINKS ];
63
63
u16 id ;
64
64
u16 num_links ;
65
65
u16 buswidth ;
66
66
};
67
67
68
- struct qcom_icc_desc {
69
- const struct qcom_icc_node * * nodes ;
68
+ struct qcom_osm_l3_desc {
69
+ const struct qcom_osm_l3_node * * nodes ;
70
70
size_t num_nodes ;
71
71
unsigned int lut_row_size ;
72
72
unsigned int reg_freq_lut ;
73
73
unsigned int reg_perf_state ;
74
74
};
75
75
76
76
#define DEFINE_QNODE (_name , _id , _buswidth , ...) \
77
- static const struct qcom_icc_node _name = { \
77
+ static const struct qcom_osm_l3_node _name = { \
78
78
.name = #_name, \
79
79
.id = _id, \
80
80
.buswidth = _buswidth, \
@@ -85,12 +85,12 @@ struct qcom_icc_desc {
85
85
DEFINE_QNODE (sdm845_osm_apps_l3 , SDM845_MASTER_OSM_L3_APPS , 16 , SDM845_SLAVE_OSM_L3 );
86
86
DEFINE_QNODE (sdm845_osm_l3 , SDM845_SLAVE_OSM_L3 , 16 );
87
87
88
- static const struct qcom_icc_node * sdm845_osm_l3_nodes [] = {
88
+ static const struct qcom_osm_l3_node * sdm845_osm_l3_nodes [] = {
89
89
[MASTER_OSM_L3_APPS ] = & sdm845_osm_apps_l3 ,
90
90
[SLAVE_OSM_L3 ] = & sdm845_osm_l3 ,
91
91
};
92
92
93
- static const struct qcom_icc_desc sdm845_icc_osm_l3 = {
93
+ static const struct qcom_osm_l3_desc sdm845_icc_osm_l3 = {
94
94
.nodes = sdm845_osm_l3_nodes ,
95
95
.num_nodes = ARRAY_SIZE (sdm845_osm_l3_nodes ),
96
96
.lut_row_size = OSM_LUT_ROW_SIZE ,
@@ -101,12 +101,12 @@ static const struct qcom_icc_desc sdm845_icc_osm_l3 = {
101
101
DEFINE_QNODE (sc7180_osm_apps_l3 , SC7180_MASTER_OSM_L3_APPS , 16 , SC7180_SLAVE_OSM_L3 );
102
102
DEFINE_QNODE (sc7180_osm_l3 , SC7180_SLAVE_OSM_L3 , 16 );
103
103
104
- static const struct qcom_icc_node * sc7180_osm_l3_nodes [] = {
104
+ static const struct qcom_osm_l3_node * sc7180_osm_l3_nodes [] = {
105
105
[MASTER_OSM_L3_APPS ] = & sc7180_osm_apps_l3 ,
106
106
[SLAVE_OSM_L3 ] = & sc7180_osm_l3 ,
107
107
};
108
108
109
- static const struct qcom_icc_desc sc7180_icc_osm_l3 = {
109
+ static const struct qcom_osm_l3_desc sc7180_icc_osm_l3 = {
110
110
.nodes = sc7180_osm_l3_nodes ,
111
111
.num_nodes = ARRAY_SIZE (sc7180_osm_l3_nodes ),
112
112
.lut_row_size = OSM_LUT_ROW_SIZE ,
@@ -117,12 +117,12 @@ static const struct qcom_icc_desc sc7180_icc_osm_l3 = {
117
117
DEFINE_QNODE (sc8180x_osm_apps_l3 , SC8180X_MASTER_OSM_L3_APPS , 32 , SC8180X_SLAVE_OSM_L3 );
118
118
DEFINE_QNODE (sc8180x_osm_l3 , SC8180X_SLAVE_OSM_L3 , 32 );
119
119
120
- static const struct qcom_icc_node * sc8180x_osm_l3_nodes [] = {
120
+ static const struct qcom_osm_l3_node * sc8180x_osm_l3_nodes [] = {
121
121
[MASTER_OSM_L3_APPS ] = & sc8180x_osm_apps_l3 ,
122
122
[SLAVE_OSM_L3 ] = & sc8180x_osm_l3 ,
123
123
};
124
124
125
- static const struct qcom_icc_desc sc8180x_icc_osm_l3 = {
125
+ static const struct qcom_osm_l3_desc sc8180x_icc_osm_l3 = {
126
126
.nodes = sc8180x_osm_l3_nodes ,
127
127
.num_nodes = ARRAY_SIZE (sc8180x_osm_l3_nodes ),
128
128
.lut_row_size = OSM_LUT_ROW_SIZE ,
@@ -133,12 +133,12 @@ static const struct qcom_icc_desc sc8180x_icc_osm_l3 = {
133
133
DEFINE_QNODE (sm8150_osm_apps_l3 , SM8150_MASTER_OSM_L3_APPS , 32 , SM8150_SLAVE_OSM_L3 );
134
134
DEFINE_QNODE (sm8150_osm_l3 , SM8150_SLAVE_OSM_L3 , 32 );
135
135
136
- static const struct qcom_icc_node * sm8150_osm_l3_nodes [] = {
136
+ static const struct qcom_osm_l3_node * sm8150_osm_l3_nodes [] = {
137
137
[MASTER_OSM_L3_APPS ] = & sm8150_osm_apps_l3 ,
138
138
[SLAVE_OSM_L3 ] = & sm8150_osm_l3 ,
139
139
};
140
140
141
- static const struct qcom_icc_desc sm8150_icc_osm_l3 = {
141
+ static const struct qcom_osm_l3_desc sm8150_icc_osm_l3 = {
142
142
.nodes = sm8150_osm_l3_nodes ,
143
143
.num_nodes = ARRAY_SIZE (sm8150_osm_l3_nodes ),
144
144
.lut_row_size = OSM_LUT_ROW_SIZE ,
@@ -149,24 +149,24 @@ static const struct qcom_icc_desc sm8150_icc_osm_l3 = {
149
149
DEFINE_QNODE (sm8250_epss_apps_l3 , SM8250_MASTER_EPSS_L3_APPS , 32 , SM8250_SLAVE_EPSS_L3 );
150
150
DEFINE_QNODE (sm8250_epss_l3 , SM8250_SLAVE_EPSS_L3 , 32 );
151
151
152
- static const struct qcom_icc_node * sm8250_epss_l3_nodes [] = {
152
+ static const struct qcom_osm_l3_node * sm8250_epss_l3_nodes [] = {
153
153
[MASTER_EPSS_L3_APPS ] = & sm8250_epss_apps_l3 ,
154
154
[SLAVE_EPSS_L3_SHARED ] = & sm8250_epss_l3 ,
155
155
};
156
156
157
- static const struct qcom_icc_desc sm8250_icc_epss_l3 = {
157
+ static const struct qcom_osm_l3_desc sm8250_icc_epss_l3 = {
158
158
.nodes = sm8250_epss_l3_nodes ,
159
159
.num_nodes = ARRAY_SIZE (sm8250_epss_l3_nodes ),
160
160
.lut_row_size = EPSS_LUT_ROW_SIZE ,
161
161
.reg_freq_lut = EPSS_REG_FREQ_LUT ,
162
162
.reg_perf_state = EPSS_REG_PERF_STATE ,
163
163
};
164
164
165
- static int qcom_icc_set (struct icc_node * src , struct icc_node * dst )
165
+ static int qcom_osm_l3_set (struct icc_node * src , struct icc_node * dst )
166
166
{
167
167
struct qcom_osm_l3_icc_provider * qp ;
168
168
struct icc_provider * provider ;
169
- const struct qcom_icc_node * qn ;
169
+ const struct qcom_osm_l3_node * qn ;
170
170
struct icc_node * n ;
171
171
unsigned int index ;
172
172
u32 agg_peak = 0 ;
@@ -175,7 +175,7 @@ static int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
175
175
176
176
qn = src -> data ;
177
177
provider = src -> provider ;
178
- qp = to_qcom_provider (provider );
178
+ qp = to_osm_l3_provider (provider );
179
179
180
180
list_for_each_entry (n , & provider -> nodes , node_list )
181
181
provider -> aggregate (n , 0 , n -> avg_bw , n -> peak_bw ,
@@ -208,10 +208,10 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
208
208
u32 info , src , lval , i , prev_freq = 0 , freq ;
209
209
static unsigned long hw_rate , xo_rate ;
210
210
struct qcom_osm_l3_icc_provider * qp ;
211
- const struct qcom_icc_desc * desc ;
211
+ const struct qcom_osm_l3_desc * desc ;
212
212
struct icc_onecell_data * data ;
213
213
struct icc_provider * provider ;
214
- const struct qcom_icc_node * * qnodes ;
214
+ const struct qcom_osm_l3_node * * qnodes ;
215
215
struct icc_node * node ;
216
216
size_t num_nodes ;
217
217
struct clk * clk ;
@@ -281,7 +281,7 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
281
281
282
282
provider = & qp -> provider ;
283
283
provider -> dev = & pdev -> dev ;
284
- provider -> set = qcom_icc_set ;
284
+ provider -> set = qcom_osm_l3_set ;
285
285
provider -> aggregate = icc_std_aggregate ;
286
286
provider -> xlate = of_icc_xlate_onecell ;
287
287
INIT_LIST_HEAD (& provider -> nodes );
@@ -303,7 +303,7 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
303
303
}
304
304
305
305
node -> name = qnodes [i ]-> name ;
306
- /* Cast away const and add it back in qcom_icc_set () */
306
+ /* Cast away const and add it back in qcom_osm_l3_set () */
307
307
node -> data = (void * )qnodes [i ];
308
308
icc_node_add (node , provider );
309
309
0 commit comments