Skip to content

Commit 637e98b

Browse files
DylanVanAsscheandersson
authored andcommitted
remoteproc: qcom: pas: refactor SLPI remoteproc init
SLPI remoteproc initialization is the same for SDM845, SM8150, SM8250, SM8350 but is duplicated for each compatible. Refactor initialization structs for these 4 compatibles as a single struct. Signed-off-by: Dylan Van Assche <[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 242a626 commit 637e98b

File tree

1 file changed

+8
-40
lines changed

1 file changed

+8
-40
lines changed

drivers/remoteproc/qcom_q6v5_pas.c

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,7 @@ static const struct adsp_data sc8180x_mpss_resource = {
10171017
.ssctl_id = 0x12,
10181018
};
10191019

1020-
static const struct adsp_data slpi_resource_init = {
1020+
static const struct adsp_data msm8996_slpi_resource_init = {
10211021
.crash_reason_smem = 424,
10221022
.firmware_name = "slpi.mdt",
10231023
.pas_id = 12,
@@ -1031,7 +1031,7 @@ static const struct adsp_data slpi_resource_init = {
10311031
.ssctl_id = 0x16,
10321032
};
10331033

1034-
static const struct adsp_data sm8150_slpi_resource = {
1034+
static const struct adsp_data sdm845_slpi_resource_init = {
10351035
.crash_reason_smem = 424,
10361036
.firmware_name = "slpi.mdt",
10371037
.pas_id = 12,
@@ -1047,38 +1047,6 @@ static const struct adsp_data sm8150_slpi_resource = {
10471047
.ssctl_id = 0x16,
10481048
};
10491049

1050-
static const struct adsp_data sm8250_slpi_resource = {
1051-
.crash_reason_smem = 424,
1052-
.firmware_name = "slpi.mdt",
1053-
.pas_id = 12,
1054-
.auto_boot = true,
1055-
.proxy_pd_names = (char*[]){
1056-
"lcx",
1057-
"lmx",
1058-
NULL
1059-
},
1060-
.load_state = "slpi",
1061-
.ssr_name = "dsps",
1062-
.sysmon_name = "slpi",
1063-
.ssctl_id = 0x16,
1064-
};
1065-
1066-
static const struct adsp_data sm8350_slpi_resource = {
1067-
.crash_reason_smem = 424,
1068-
.firmware_name = "slpi.mdt",
1069-
.pas_id = 12,
1070-
.auto_boot = true,
1071-
.proxy_pd_names = (char*[]){
1072-
"lcx",
1073-
"lmx",
1074-
NULL
1075-
},
1076-
.load_state = "slpi",
1077-
.ssr_name = "dsps",
1078-
.sysmon_name = "slpi",
1079-
.ssctl_id = 0x16,
1080-
};
1081-
10821050
static const struct adsp_data wcss_resource_init = {
10831051
.crash_reason_smem = 421,
10841052
.firmware_name = "wcnss.mdt",
@@ -1187,9 +1155,9 @@ static const struct of_device_id adsp_of_match[] = {
11871155
{ .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource},
11881156
{ .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
11891157
{ .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
1190-
{ .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init},
1158+
{ .compatible = "qcom,msm8996-slpi-pil", .data = &msm8996_slpi_resource_init},
11911159
{ .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource},
1192-
{ .compatible = "qcom,msm8998-slpi-pas", .data = &slpi_resource_init},
1160+
{ .compatible = "qcom,msm8998-slpi-pas", .data = &msm8996_slpi_resource_init},
11931161
{ .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
11941162
{ .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
11951163
{ .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
@@ -1214,17 +1182,17 @@ static const struct of_device_id adsp_of_match[] = {
12141182
{ .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource},
12151183
{ .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource},
12161184
{ .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init},
1217-
{ .compatible = "qcom,sm8150-slpi-pas", .data = &sm8150_slpi_resource},
1185+
{ .compatible = "qcom,sm8150-slpi-pas", .data = &sdm845_slpi_resource_init},
12181186
{ .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource},
12191187
{ .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource},
1220-
{ .compatible = "qcom,sm8250-slpi-pas", .data = &sm8250_slpi_resource},
1188+
{ .compatible = "qcom,sm8250-slpi-pas", .data = &sdm845_slpi_resource_init},
12211189
{ .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource},
12221190
{ .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource},
1223-
{ .compatible = "qcom,sm8350-slpi-pas", .data = &sm8350_slpi_resource},
1191+
{ .compatible = "qcom,sm8350-slpi-pas", .data = &sdm845_slpi_resource_init},
12241192
{ .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init},
12251193
{ .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource},
12261194
{ .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource},
1227-
{ .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource},
1195+
{ .compatible = "qcom,sm8450-slpi-pas", .data = &sdm845_slpi_resource_init},
12281196
{ .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource},
12291197
{ .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource},
12301198
{ .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource},

0 commit comments

Comments
 (0)