[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b96beb22-88ab-35ce-0c7f-6abf4c196c74@linaro.org>
Date: Fri, 31 Mar 2023 01:03:12 +0200
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Dylan Van Assche <me@...anvanassche.be>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc: Manivannan Sadhasivam <mani@...nel.org>,
linux-arm-msm@...r.kernel.org, linux-remoteproc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org
Subject: Re: [PATCH v3 2/3] remoteproc: qcom: pas: refactor SLPI remoteproc
init
On 30.03.2023 18:46, Dylan Van Assche wrote:
> 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 <me@...anvanassche.be>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@...aro.org>
Konrad
> drivers/remoteproc/qcom_q6v5_pas.c | 48 +++++-------------------------
> 1 file changed, 8 insertions(+), 40 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index c99a20542685..b96020c93e58 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -1014,7 +1014,7 @@ static const struct adsp_data sc8180x_mpss_resource = {
> .ssctl_id = 0x12,
> };
>
> -static const struct adsp_data slpi_resource_init = {
> +static const struct adsp_data msm8996_slpi_resource_init = {
> .crash_reason_smem = 424,
> .firmware_name = "slpi.mdt",
> .pas_id = 12,
> @@ -1028,7 +1028,7 @@ static const struct adsp_data slpi_resource_init = {
> .ssctl_id = 0x16,
> };
>
> -static const struct adsp_data sm8150_slpi_resource = {
> +static const struct adsp_data sdm845_slpi_resource_init = {
> .crash_reason_smem = 424,
> .firmware_name = "slpi.mdt",
> .pas_id = 12,
> @@ -1044,38 +1044,6 @@ static const struct adsp_data sm8150_slpi_resource = {
> .ssctl_id = 0x16,
> };
>
> -static const struct adsp_data sm8250_slpi_resource = {
> - .crash_reason_smem = 424,
> - .firmware_name = "slpi.mdt",
> - .pas_id = 12,
> - .auto_boot = true,
> - .proxy_pd_names = (char*[]){
> - "lcx",
> - "lmx",
> - NULL
> - },
> - .load_state = "slpi",
> - .ssr_name = "dsps",
> - .sysmon_name = "slpi",
> - .ssctl_id = 0x16,
> -};
> -
> -static const struct adsp_data sm8350_slpi_resource = {
> - .crash_reason_smem = 424,
> - .firmware_name = "slpi.mdt",
> - .pas_id = 12,
> - .auto_boot = true,
> - .proxy_pd_names = (char*[]){
> - "lcx",
> - "lmx",
> - NULL
> - },
> - .load_state = "slpi",
> - .ssr_name = "dsps",
> - .sysmon_name = "slpi",
> - .ssctl_id = 0x16,
> -};
> -
> static const struct adsp_data wcss_resource_init = {
> .crash_reason_smem = 421,
> .firmware_name = "wcnss.mdt",
> @@ -1184,9 +1152,9 @@ static const struct of_device_id adsp_of_match[] = {
> { .compatible = "qcom,msm8953-adsp-pil", .data = &msm8996_adsp_resource},
> { .compatible = "qcom,msm8974-adsp-pil", .data = &adsp_resource_init},
> { .compatible = "qcom,msm8996-adsp-pil", .data = &msm8996_adsp_resource},
> - { .compatible = "qcom,msm8996-slpi-pil", .data = &slpi_resource_init},
> + { .compatible = "qcom,msm8996-slpi-pil", .data = &msm8996_slpi_resource_init},
> { .compatible = "qcom,msm8998-adsp-pas", .data = &msm8996_adsp_resource},
> - { .compatible = "qcom,msm8998-slpi-pas", .data = &slpi_resource_init},
> + { .compatible = "qcom,msm8998-slpi-pas", .data = &msm8996_slpi_resource_init},
> { .compatible = "qcom,qcs404-adsp-pas", .data = &adsp_resource_init },
> { .compatible = "qcom,qcs404-cdsp-pas", .data = &cdsp_resource_init },
> { .compatible = "qcom,qcs404-wcss-pas", .data = &wcss_resource_init },
> @@ -1211,17 +1179,17 @@ static const struct of_device_id adsp_of_match[] = {
> { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource},
> { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource},
> { .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init},
> - { .compatible = "qcom,sm8150-slpi-pas", .data = &sm8150_slpi_resource},
> + { .compatible = "qcom,sm8150-slpi-pas", .data = &sdm845_slpi_resource_init},
> { .compatible = "qcom,sm8250-adsp-pas", .data = &sm8250_adsp_resource},
> { .compatible = "qcom,sm8250-cdsp-pas", .data = &sm8250_cdsp_resource},
> - { .compatible = "qcom,sm8250-slpi-pas", .data = &sm8250_slpi_resource},
> + { .compatible = "qcom,sm8250-slpi-pas", .data = &sdm845_slpi_resource_init},
> { .compatible = "qcom,sm8350-adsp-pas", .data = &sm8350_adsp_resource},
> { .compatible = "qcom,sm8350-cdsp-pas", .data = &sm8350_cdsp_resource},
> - { .compatible = "qcom,sm8350-slpi-pas", .data = &sm8350_slpi_resource},
> + { .compatible = "qcom,sm8350-slpi-pas", .data = &sdm845_slpi_resource_init},
> { .compatible = "qcom,sm8350-mpss-pas", .data = &mpss_resource_init},
> { .compatible = "qcom,sm8450-adsp-pas", .data = &sm8350_adsp_resource},
> { .compatible = "qcom,sm8450-cdsp-pas", .data = &sm8350_cdsp_resource},
> - { .compatible = "qcom,sm8450-slpi-pas", .data = &sm8350_slpi_resource},
> + { .compatible = "qcom,sm8450-slpi-pas", .data = &sdm845_slpi_resource_init},
> { .compatible = "qcom,sm8450-mpss-pas", .data = &sm8450_mpss_resource},
> { .compatible = "qcom,sm8550-adsp-pas", .data = &sm8550_adsp_resource},
> { .compatible = "qcom,sm8550-cdsp-pas", .data = &sm8550_cdsp_resource},
Powered by blists - more mailing lists