Skip to content

Commit 9235253

Browse files
quic-bjorandeGeorgi Djakov
authored andcommitted
interconnect: qcom: osm-l3: Add per-core EPSS L3 support
The EPSS instance in e.g. SM8350 and SC8280XP has per-core L3 voting enabled. In this configuration, the "shared" vote is done using the REG_L3_VOTE register instead of PERF_STATE. Rename epss_l3 to clarify that it's affecting the PERF_STATE register and add a new L3_VOTE description. Given platform lineage it's assumed that the L3_VOTE-based case will be the predominant one, so use this for a new generic qcom,epss-l3 compatible. While adding the EPSS generic, also add qcom,osm-l3. 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 d623264 commit 9235253

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

drivers/interconnect/qcom/osm-l3.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
/* EPSS Register offsets */
3636
#define EPSS_LUT_ROW_SIZE 4
37+
#define EPSS_REG_L3_VOTE 0x90
3738
#define EPSS_REG_FREQ_LUT 0x100
3839
#define EPSS_REG_PERF_STATE 0x320
3940

@@ -112,14 +113,22 @@ static const struct qcom_osm_l3_desc osm_l3 = {
112113
.reg_perf_state = OSM_REG_PERF_STATE,
113114
};
114115

115-
static const struct qcom_osm_l3_desc epss_l3 = {
116+
static const struct qcom_osm_l3_desc epss_l3_perf_state = {
116117
.nodes = epss_l3_nodes,
117118
.num_nodes = ARRAY_SIZE(epss_l3_nodes),
118119
.lut_row_size = EPSS_LUT_ROW_SIZE,
119120
.reg_freq_lut = EPSS_REG_FREQ_LUT,
120121
.reg_perf_state = EPSS_REG_PERF_STATE,
121122
};
122123

124+
static const struct qcom_osm_l3_desc epss_l3_l3_vote = {
125+
.nodes = epss_l3_nodes,
126+
.num_nodes = ARRAY_SIZE(epss_l3_nodes),
127+
.lut_row_size = EPSS_LUT_ROW_SIZE,
128+
.reg_freq_lut = EPSS_REG_FREQ_LUT,
129+
.reg_perf_state = EPSS_REG_L3_VOTE,
130+
};
131+
123132
static int qcom_osm_l3_set(struct icc_node *src, struct icc_node *dst)
124133
{
125134
struct qcom_osm_l3_icc_provider *qp;
@@ -285,12 +294,14 @@ static int qcom_osm_l3_probe(struct platform_device *pdev)
285294
}
286295

287296
static const struct of_device_id osm_l3_of_match[] = {
297+
{ .compatible = "qcom,epss-l3", .data = &epss_l3_l3_vote },
298+
{ .compatible = "qcom,osm-l3", .data = &osm_l3 },
288299
{ .compatible = "qcom,sc7180-osm-l3", .data = &osm_l3 },
289-
{ .compatible = "qcom,sc7280-epss-l3", .data = &epss_l3 },
300+
{ .compatible = "qcom,sc7280-epss-l3", .data = &epss_l3_perf_state },
290301
{ .compatible = "qcom,sdm845-osm-l3", .data = &osm_l3 },
291302
{ .compatible = "qcom,sm8150-osm-l3", .data = &osm_l3 },
292303
{ .compatible = "qcom,sc8180x-osm-l3", .data = &osm_l3 },
293-
{ .compatible = "qcom,sm8250-epss-l3", .data = &epss_l3 },
304+
{ .compatible = "qcom,sm8250-epss-l3", .data = &epss_l3_perf_state },
294305
{ }
295306
};
296307
MODULE_DEVICE_TABLE(of, osm_l3_of_match);

0 commit comments

Comments
 (0)