qcom_q6v5_pas fixes for msm8226
Subsystems (2)
cover qcom_q6v5_pas fixes for msm8226
During msm8226 mss bringup it was noticed that the adsp on that SoC is not behaving quite correctly. Correct that and add a patch that improves the single-power-domain handling in the pas driver.
---
Luca Weiss (2):
remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
drivers/remoteproc/qcom_q6v5_pas.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
---
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
change-id: 20250128-pas-singlepd-469aa7ee2ca8
Best regards,
Signature · 1 line
Luca Weiss <[email protected]>
PATCH 1/2 remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
MSM8226 requires the CX power domain, so use the msm8996_adsp_resource which has cx under proxy_pd_names and is otherwise equivalent.
--- drivers/remoteproc/qcom_q6v5_pas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/remoteproc/qcom_q6v5_pas.c +1 -1
@@ -1319,7 +1319,7 @@ static const struct adsp_data sm8650_mpss_resource = { };static const struct of_device_id adsp_of_match[] = { - { .compatible ="qcom,msm8226-adsp-pil" , .data = &adsp_resource_init}, + { .compatible ="qcom,msm8226-adsp-pil" , .data = &msm8996_adsp_resource}, { .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},
Signature · 1 line
2.48.1
Re: [PATCH 1/2] remoteproc: qcom_q6v5_pas: Use resource with CX PD for MSM8226
Quoted 6 lines · Luca Weiss
MSM8226 requires the CX power domain, so use the
msm8996_adsp_resourcewhich has cx underproxy_pd_namesand is otherwise equivalent.Suggested-by Stephan Gerhold <[email protected]>Fixes fb4f07cc9399 ("remoteproc: qcom: pas: Add MSM8226 ADSP support")Signed-off-by Luca Weiss <[email protected]>
Not sure if Reviewed-by makes sense if I already did Suggested-by, but anyway:
Quoted 21 lines
--- drivers/remoteproc/qcom_q6v5_pas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/remoteproc/qcom_q6v5_pas.c +1
-1@@ -1319,7 +1319,7 @@ static const struct adsp_data sm8650_mpss_resource = { };static const struct of_device_id adsp_of_match[] = { - { .compatible ="qcom,msm8226-adsp-pil" , .data = &adsp_resource_init}, + { .compatible ="qcom,msm8226-adsp-pil" , .data = &msm8996_adsp_resource}, { .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},Signature · 2 lines
-- 2.48.1
PATCH 2/2 remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
In reply to Luca WeissOnly go into the if condition for single-PD handling when there's actually just one power domain specified there. Otherwise it'll be an issue in the dts and we should fail in the regular code path.
This also mirrors the latest changes in the qcom_q6v5_mss driver.
--- drivers/remoteproc/qcom_q6v5_pas.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/remoteproc/qcom_q6v5_pas.c +5 -5
@@ -509,16 +509,16 @@ static int adsp_pds_attach(struct device *dev, struct device **devs,if (!pd_names)return 0 ; +while (pd_names[num_pds]) + num_pds++; +/* Handle single power domain */ -if (dev->pm_domain) { +if (num_pds ==1 && dev->pm_domain) { devs[0 ] = dev;pm_runtime_enable (dev);return 1 ; } -while (pd_names[num_pds]) - num_pds++; -for (i =0 ; i < num_pds; i++) { devs[i] =dev_pm_domain_attach_by_name (dev, pd_names[i]);if (IS_ERR_OR_NULL (devs[i])) {
@@ -543,7 +543,7 @@ static void adsp_pds_detach(struct qcom_adsp *adsp, struct device **pds,int i;/* Handle single power domain */ -if (dev->pm_domain && pd_count) { +if (pd_count ==1 && dev->pm_domain) {pm_runtime_disable (dev);return ; }
Signature · 1 line
2.48.1
Re: [PATCH 2/2] remoteproc: qcom_q6v5_pas: Make single-PD handling more robust
Quoted 9 lines · Luca Weiss
Only go into the if condition for single-PD handling when there's actually just one power domain specified there. Otherwise it'll be an issue in the dts and we should fail in the regular code path.
This also mirrors the latest changes in the
qcom_q6v5_mssdriver.Suggested-by Stephan Gerhold <[email protected]>Fixes 17ee2fb4e856 ("remoteproc: qcom: pas: Vote for active/proxy power domains")Signed-off-by Luca Weiss <[email protected]>
Not sure if Reviewed-by makes sense if I already did Suggested-by, but anyway:
Thanks for making these fixes!
Quoted 42 lines
--- drivers/remoteproc/qcom_q6v5_pas.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/remoteproc/qcom_q6v5_pas.c +5
-5@@ -509,16 +509,16 @@ static int adsp_pds_attach(struct device *dev, struct device **devs,if (!pd_names)return 0 ; +while (pd_names[num_pds]) + num_pds++; +/* Handle single power domain */ -if (dev->pm_domain) { +if (num_pds ==1 && dev->pm_domain) { devs[0 ] = dev;pm_runtime_enable (dev);return 1 ; } -while (pd_names[num_pds]) - num_pds++; -for (i =0 ; i < num_pds; i++) { devs[i] =dev_pm_domain_attach_by_name (dev, pd_names[i]);if (IS_ERR_OR_NULL (devs[i])) {@@ -543,7 +543,7 @@ static void adsp_pds_detach(struct qcom_adsp *adsp, struct device **pds,int i;/* Handle single power domain */ -if (dev->pm_domain && pd_count) { +if (pd_count ==1 && dev->pm_domain) {pm_runtime_disable (dev);return ; }Signature · 2 lines
-- 2.48.1