Skip to content

Commit c88c323

Browse files
quic-varadaandersson
authored andcommitted
soc: qcom: llcc: Update configuration data for IPQ5424
The 'broadcast' register space is present only in chipsets that have multiple instances of LLCC IP. Since IPQ5424 has only one instance, both the LLCC and LLCC_BROADCAST points to the same register space. Signed-off-by: Varadarajan Narayanan <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent f35a439 commit c88c323

File tree

1 file changed

+55
-2
lines changed

1 file changed

+55
-2
lines changed

drivers/soc/qcom/llcc-qcom.c

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ struct qcom_llcc_config {
142142
bool skip_llcc_cfg;
143143
bool no_edac;
144144
bool irq_configured;
145+
bool no_broadcast_register;
145146
};
146147

147148
struct qcom_sct_config {
@@ -154,6 +155,38 @@ enum llcc_reg_offset {
154155
LLCC_COMMON_STATUS0,
155156
};
156157

158+
static const struct llcc_slice_config ipq5424_data[] = {
159+
{
160+
.usecase_id = LLCC_CPUSS,
161+
.slice_id = 1,
162+
.max_cap = 768,
163+
.priority = 1,
164+
.bonus_ways = 0xFFFF,
165+
.retain_on_pc = true,
166+
.activate_on_init = true,
167+
.write_scid_cacheable_en = true,
168+
.stale_en = true,
169+
.stale_cap_en = true,
170+
.alloc_oneway_en = true,
171+
.ovcap_en = true,
172+
.ovcap_prio = true,
173+
.vict_prio = true,
174+
},
175+
{
176+
.usecase_id = LLCC_VIDSC0,
177+
.slice_id = 2,
178+
.max_cap = 256,
179+
.priority = 2,
180+
.fixed_size = true,
181+
.bonus_ways = 0xF000,
182+
.retain_on_pc = true,
183+
.activate_on_init = true,
184+
.write_scid_cacheable_en = true,
185+
.stale_en = true,
186+
.stale_cap_en = true,
187+
},
188+
};
189+
157190
static const struct llcc_slice_config sa8775p_data[] = {
158191
{
159192
.usecase_id = LLCC_CPUSS,
@@ -3186,6 +3219,16 @@ static const struct qcom_llcc_config qdu1000_cfg[] = {
31863219
},
31873220
};
31883221

3222+
static const struct qcom_llcc_config ipq5424_cfg[] = {
3223+
{
3224+
.sct_data = ipq5424_data,
3225+
.size = ARRAY_SIZE(ipq5424_data),
3226+
.reg_offset = llcc_v2_1_reg_offset,
3227+
.edac_reg_offset = &llcc_v2_1_edac_reg_offset,
3228+
.no_broadcast_register = true,
3229+
},
3230+
};
3231+
31893232
static const struct qcom_llcc_config sa8775p_cfg[] = {
31903233
{
31913234
.sct_data = sa8775p_data,
@@ -3361,6 +3404,11 @@ static const struct qcom_sct_config qdu1000_cfgs = {
33613404
.num_config = ARRAY_SIZE(qdu1000_cfg),
33623405
};
33633406

3407+
static const struct qcom_sct_config ipq5424_cfgs = {
3408+
.llcc_config = ipq5424_cfg,
3409+
.num_config = ARRAY_SIZE(ipq5424_cfg),
3410+
};
3411+
33643412
static const struct qcom_sct_config sa8775p_cfgs = {
33653413
.llcc_config = sa8775p_cfg,
33663414
.num_config = ARRAY_SIZE(sa8775p_cfg),
@@ -3958,8 +4006,12 @@ static int qcom_llcc_probe(struct platform_device *pdev)
39584006

39594007
drv_data->bcast_regmap = qcom_llcc_init_mmio(pdev, i, "llcc_broadcast_base");
39604008
if (IS_ERR(drv_data->bcast_regmap)) {
3961-
ret = PTR_ERR(drv_data->bcast_regmap);
3962-
goto err;
4009+
if (cfg->no_broadcast_register) {
4010+
drv_data->bcast_regmap = regmap;
4011+
} else {
4012+
ret = PTR_ERR(drv_data->bcast_regmap);
4013+
goto err;
4014+
}
39634015
}
39644016

39654017
/* Extract version of the IP */
@@ -4030,6 +4082,7 @@ static int qcom_llcc_probe(struct platform_device *pdev)
40304082
}
40314083

40324084
static const struct of_device_id qcom_llcc_of_match[] = {
4085+
{ .compatible = "qcom,ipq5424-llcc", .data = &ipq5424_cfgs},
40334086
{ .compatible = "qcom,qcs615-llcc", .data = &qcs615_cfgs},
40344087
{ .compatible = "qcom,qcs8300-llcc", .data = &qcs8300_cfgs},
40354088
{ .compatible = "qcom,qdu1000-llcc", .data = &qdu1000_cfgs},

0 commit comments

Comments
 (0)