@@ -139,7 +139,7 @@ struct qcom_llcc_config {
139
139
u32 max_cap_shift ; /* instead of ATTR1_MAX_CAP_SHIFT */
140
140
u32 num_banks ;
141
141
int size ;
142
- bool need_llcc_cfg ;
142
+ bool skip_llcc_cfg ;
143
143
bool no_edac ;
144
144
};
145
145
@@ -3142,7 +3142,6 @@ static const struct qcom_llcc_config qcs615_cfg[] = {
3142
3142
{
3143
3143
.sct_data = qcs615_data ,
3144
3144
.size = ARRAY_SIZE (qcs615_data ),
3145
- .need_llcc_cfg = true,
3146
3145
.reg_offset = llcc_v1_reg_offset ,
3147
3146
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3148
3147
},
@@ -3152,7 +3151,6 @@ static const struct qcom_llcc_config qcs8300_cfg[] = {
3152
3151
{
3153
3152
.sct_data = qcs8300_data ,
3154
3153
.size = ARRAY_SIZE (qcs8300_data ),
3155
- .need_llcc_cfg = true,
3156
3154
.reg_offset = llcc_v2_1_reg_offset ,
3157
3155
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3158
3156
.num_banks = 4 ,
@@ -3163,28 +3161,24 @@ static const struct qcom_llcc_config qdu1000_cfg[] = {
3163
3161
{
3164
3162
.sct_data = qdu1000_data_8ch ,
3165
3163
.size = ARRAY_SIZE (qdu1000_data_8ch ),
3166
- .need_llcc_cfg = true,
3167
3164
.reg_offset = llcc_v2_1_reg_offset ,
3168
3165
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3169
3166
},
3170
3167
{
3171
3168
.sct_data = qdu1000_data_4ch ,
3172
3169
.size = ARRAY_SIZE (qdu1000_data_4ch ),
3173
- .need_llcc_cfg = true,
3174
3170
.reg_offset = llcc_v2_1_reg_offset ,
3175
3171
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3176
3172
},
3177
3173
{
3178
3174
.sct_data = qdu1000_data_4ch ,
3179
3175
.size = ARRAY_SIZE (qdu1000_data_4ch ),
3180
- .need_llcc_cfg = true,
3181
3176
.reg_offset = llcc_v2_1_reg_offset ,
3182
3177
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3183
3178
},
3184
3179
{
3185
3180
.sct_data = qdu1000_data_2ch ,
3186
3181
.size = ARRAY_SIZE (qdu1000_data_2ch ),
3187
- .need_llcc_cfg = true,
3188
3182
.reg_offset = llcc_v2_1_reg_offset ,
3189
3183
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3190
3184
},
@@ -3194,7 +3188,6 @@ static const struct qcom_llcc_config sa8775p_cfg[] = {
3194
3188
{
3195
3189
.sct_data = sa8775p_data ,
3196
3190
.size = ARRAY_SIZE (sa8775p_data ),
3197
- .need_llcc_cfg = true,
3198
3191
.reg_offset = llcc_v2_1_reg_offset ,
3199
3192
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3200
3193
},
@@ -3204,7 +3197,6 @@ static const struct qcom_llcc_config sar1130p_cfg[] = {
3204
3197
{
3205
3198
.sct_data = sar1130p_data ,
3206
3199
.size = ARRAY_SIZE (sar1130p_data ),
3207
- .need_llcc_cfg = true,
3208
3200
.reg_offset = llcc_v2_1_reg_offset ,
3209
3201
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3210
3202
.max_cap_shift = 14 ,
@@ -3216,7 +3208,6 @@ static const struct qcom_llcc_config sar2130p_cfg[] = {
3216
3208
{
3217
3209
.sct_data = sar2130p_data ,
3218
3210
.size = ARRAY_SIZE (sar2130p_data ),
3219
- .need_llcc_cfg = true,
3220
3211
.reg_offset = llcc_v2_1_reg_offset ,
3221
3212
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3222
3213
.max_cap_shift = 14 ,
@@ -3228,7 +3219,6 @@ static const struct qcom_llcc_config sc7180_cfg[] = {
3228
3219
{
3229
3220
.sct_data = sc7180_data ,
3230
3221
.size = ARRAY_SIZE (sc7180_data ),
3231
- .need_llcc_cfg = true,
3232
3222
.reg_offset = llcc_v1_reg_offset ,
3233
3223
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3234
3224
},
@@ -3238,7 +3228,6 @@ static const struct qcom_llcc_config sc7280_cfg[] = {
3238
3228
{
3239
3229
.sct_data = sc7280_data ,
3240
3230
.size = ARRAY_SIZE (sc7280_data ),
3241
- .need_llcc_cfg = true,
3242
3231
.reg_offset = llcc_v1_reg_offset ,
3243
3232
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3244
3233
},
@@ -3248,7 +3237,6 @@ static const struct qcom_llcc_config sc8180x_cfg[] = {
3248
3237
{
3249
3238
.sct_data = sc8180x_data ,
3250
3239
.size = ARRAY_SIZE (sc8180x_data ),
3251
- .need_llcc_cfg = true,
3252
3240
.reg_offset = llcc_v1_reg_offset ,
3253
3241
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3254
3242
},
@@ -3258,7 +3246,6 @@ static const struct qcom_llcc_config sc8280xp_cfg[] = {
3258
3246
{
3259
3247
.sct_data = sc8280xp_data ,
3260
3248
.size = ARRAY_SIZE (sc8280xp_data ),
3261
- .need_llcc_cfg = true,
3262
3249
.reg_offset = llcc_v1_reg_offset ,
3263
3250
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3264
3251
},
@@ -3268,7 +3255,7 @@ static const struct qcom_llcc_config sdm845_cfg[] = {
3268
3255
{
3269
3256
.sct_data = sdm845_data ,
3270
3257
.size = ARRAY_SIZE (sdm845_data ),
3271
- .need_llcc_cfg = false ,
3258
+ .skip_llcc_cfg = true ,
3272
3259
.reg_offset = llcc_v1_reg_offset ,
3273
3260
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3274
3261
.no_edac = true,
@@ -3279,7 +3266,6 @@ static const struct qcom_llcc_config sm6350_cfg[] = {
3279
3266
{
3280
3267
.sct_data = sm6350_data ,
3281
3268
.size = ARRAY_SIZE (sm6350_data ),
3282
- .need_llcc_cfg = true,
3283
3269
.reg_offset = llcc_v1_reg_offset ,
3284
3270
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3285
3271
},
@@ -3289,7 +3275,6 @@ static const struct qcom_llcc_config sm7150_cfg[] = {
3289
3275
{
3290
3276
.sct_data = sm7150_data ,
3291
3277
.size = ARRAY_SIZE (sm7150_data ),
3292
- .need_llcc_cfg = true,
3293
3278
.reg_offset = llcc_v1_reg_offset ,
3294
3279
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3295
3280
},
@@ -3299,7 +3284,6 @@ static const struct qcom_llcc_config sm8150_cfg[] = {
3299
3284
{
3300
3285
.sct_data = sm8150_data ,
3301
3286
.size = ARRAY_SIZE (sm8150_data ),
3302
- .need_llcc_cfg = true,
3303
3287
.reg_offset = llcc_v1_reg_offset ,
3304
3288
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3305
3289
},
@@ -3309,7 +3293,6 @@ static const struct qcom_llcc_config sm8250_cfg[] = {
3309
3293
{
3310
3294
.sct_data = sm8250_data ,
3311
3295
.size = ARRAY_SIZE (sm8250_data ),
3312
- .need_llcc_cfg = true,
3313
3296
.reg_offset = llcc_v1_reg_offset ,
3314
3297
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3315
3298
},
@@ -3319,7 +3302,6 @@ static const struct qcom_llcc_config sm8350_cfg[] = {
3319
3302
{
3320
3303
.sct_data = sm8350_data ,
3321
3304
.size = ARRAY_SIZE (sm8350_data ),
3322
- .need_llcc_cfg = true,
3323
3305
.reg_offset = llcc_v1_reg_offset ,
3324
3306
.edac_reg_offset = & llcc_v1_edac_reg_offset ,
3325
3307
},
@@ -3329,7 +3311,6 @@ static const struct qcom_llcc_config sm8450_cfg[] = {
3329
3311
{
3330
3312
.sct_data = sm8450_data ,
3331
3313
.size = ARRAY_SIZE (sm8450_data ),
3332
- .need_llcc_cfg = true,
3333
3314
.reg_offset = llcc_v2_1_reg_offset ,
3334
3315
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3335
3316
},
@@ -3339,7 +3320,6 @@ static const struct qcom_llcc_config sm8550_cfg[] = {
3339
3320
{
3340
3321
.sct_data = sm8550_data ,
3341
3322
.size = ARRAY_SIZE (sm8550_data ),
3342
- .need_llcc_cfg = true,
3343
3323
.reg_offset = llcc_v2_1_reg_offset ,
3344
3324
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3345
3325
},
@@ -3349,7 +3329,6 @@ static const struct qcom_llcc_config sm8650_cfg[] = {
3349
3329
{
3350
3330
.sct_data = sm8650_data ,
3351
3331
.size = ARRAY_SIZE (sm8650_data ),
3352
- .need_llcc_cfg = true,
3353
3332
.reg_offset = llcc_v2_1_reg_offset ,
3354
3333
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3355
3334
},
@@ -3359,7 +3338,6 @@ static const struct qcom_llcc_config x1e80100_cfg[] = {
3359
3338
{
3360
3339
.sct_data = x1e80100_data ,
3361
3340
.size = ARRAY_SIZE (x1e80100_data ),
3362
- .need_llcc_cfg = true,
3363
3341
.reg_offset = llcc_v2_1_reg_offset ,
3364
3342
.edac_reg_offset = & llcc_v2_1_edac_reg_offset ,
3365
3343
},
@@ -3734,7 +3712,8 @@ static int _qcom_llcc_cfg_program(const struct llcc_slice_config *config,
3734
3712
return ret ;
3735
3713
}
3736
3714
3737
- if (cfg -> need_llcc_cfg ) {
3715
+ /* At least SDM845 disallows non-secure writes to these registers */
3716
+ if (!cfg -> skip_llcc_cfg ) {
3738
3717
u32 disable_cap_alloc , retain_pc ;
3739
3718
3740
3719
disable_cap_alloc = config -> dis_cap_alloc << config -> slice_id ;
0 commit comments