Skip to content

Commit d623264

Browse files
quic-bjorandeGeorgi Djakov
authored andcommitted
interconnect: qcom: osm-l3: Squash common descriptors
Each platform defines their own OSM L3 descriptor, but in practice there's only two: one for OSM and one for EPSS. Remove the duplicated definitions. Signed-off-by: Bjorn Andersson <[email protected]> Tested-by: Steev Klimaszewski <[email protected]> Reviewed-by: Sibi Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Georgi Djakov <[email protected]>
1 parent 4529992 commit d623264

File tree

1 file changed

+8
-40
lines changed

1 file changed

+8
-40
lines changed

drivers/interconnect/qcom/osm-l3.c

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -104,47 +104,15 @@ static const struct qcom_osm_l3_node * const epss_l3_nodes[] = {
104104
[SLAVE_EPSS_L3_SHARED] = &epss_l3_slave,
105105
};
106106

107-
static const struct qcom_osm_l3_desc sdm845_icc_osm_l3 = {
107+
static const struct qcom_osm_l3_desc osm_l3 = {
108108
.nodes = osm_l3_nodes,
109109
.num_nodes = ARRAY_SIZE(osm_l3_nodes),
110110
.lut_row_size = OSM_LUT_ROW_SIZE,
111111
.reg_freq_lut = OSM_REG_FREQ_LUT,
112112
.reg_perf_state = OSM_REG_PERF_STATE,
113113
};
114114

115-
static const struct qcom_osm_l3_desc sc7180_icc_osm_l3 = {
116-
.nodes = osm_l3_nodes,
117-
.num_nodes = ARRAY_SIZE(osm_l3_nodes),
118-
.lut_row_size = OSM_LUT_ROW_SIZE,
119-
.reg_freq_lut = OSM_REG_FREQ_LUT,
120-
.reg_perf_state = OSM_REG_PERF_STATE,
121-
};
122-
123-
static const struct qcom_osm_l3_desc sc7280_icc_epss_l3 = {
124-
.nodes = epss_l3_nodes,
125-
.num_nodes = ARRAY_SIZE(epss_l3_nodes),
126-
.lut_row_size = EPSS_LUT_ROW_SIZE,
127-
.reg_freq_lut = EPSS_REG_FREQ_LUT,
128-
.reg_perf_state = EPSS_REG_PERF_STATE,
129-
};
130-
131-
static const struct qcom_osm_l3_desc sc8180x_icc_osm_l3 = {
132-
.nodes = osm_l3_nodes,
133-
.num_nodes = ARRAY_SIZE(osm_l3_nodes),
134-
.lut_row_size = OSM_LUT_ROW_SIZE,
135-
.reg_freq_lut = OSM_REG_FREQ_LUT,
136-
.reg_perf_state = OSM_REG_PERF_STATE,
137-
};
138-
139-
static const struct qcom_osm_l3_desc sm8150_icc_osm_l3 = {
140-
.nodes = osm_l3_nodes,
141-
.num_nodes = ARRAY_SIZE(osm_l3_nodes),
142-
.lut_row_size = OSM_LUT_ROW_SIZE,
143-
.reg_freq_lut = OSM_REG_FREQ_LUT,
144-
.reg_perf_state = OSM_REG_PERF_STATE,
145-
};
146-
147-
static const struct qcom_osm_l3_desc sm8250_icc_epss_l3 = {
115+
static const struct qcom_osm_l3_desc epss_l3 = {
148116
.nodes = epss_l3_nodes,
149117
.num_nodes = ARRAY_SIZE(epss_l3_nodes),
150118
.lut_row_size = EPSS_LUT_ROW_SIZE,
@@ -317,12 +285,12 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
317285
}
318286

319287
static const struct of_device_id osm_l3_of_match[] = {
320-
{ .compatible = "qcom,sc7180-osm-l3", .data = &sc7180_icc_osm_l3 },
321-
{ .compatible = "qcom,sc7280-epss-l3", .data = &sc7280_icc_epss_l3 },
322-
{ .compatible = "qcom,sdm845-osm-l3", .data = &sdm845_icc_osm_l3 },
323-
{ .compatible = "qcom,sm8150-osm-l3", .data = &sm8150_icc_osm_l3 },
324-
{ .compatible = "qcom,sc8180x-osm-l3", .data = &sc8180x_icc_osm_l3 },
325-
{ .compatible = "qcom,sm8250-epss-l3", .data = &sm8250_icc_epss_l3 },
288+
{ .compatible = "qcom,sc7180-osm-l3", .data = &osm_l3 },
289+
{ .compatible = "qcom,sc7280-epss-l3", .data = &epss_l3 },
290+
{ .compatible = "qcom,sdm845-osm-l3", .data = &osm_l3 },
291+
{ .compatible = "qcom,sm8150-osm-l3", .data = &osm_l3 },
292+
{ .compatible = "qcom,sc8180x-osm-l3", .data = &osm_l3 },
293+
{ .compatible = "qcom,sm8250-epss-l3", .data = &epss_l3 },
326294
{ }
327295
};
328296
MODULE_DEVICE_TABLE(of, osm_l3_of_match);

0 commit comments

Comments
 (0)