alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] soundwire: qcom: remove duplicate reset control get
@ 2022-08-14 12:38 Srinivas Kandagatla
  2022-08-15 11:28 ` Amit Pundir
  2022-08-23 15:58 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2022-08-14 12:38 UTC (permalink / raw)
  To: amit.pundir, vkoul; +Cc: alsa-devel, Srinivas Kandagatla

Looks like adding clock gate flag patch forgot to remove the old code that
gets reset control.

This causes below crash on platforms that do not need reset.

[   15.653501]  reset_control_reset+0x124/0x170
[   15.653508]  qcom_swrm_init+0x50/0x1a0
[   15.653514]  qcom_swrm_probe+0x320/0x668
[   15.653519]  platform_probe+0x68/0xe0
[   15.653529]  really_probe+0xbc/0x2a8
[   15.653535]  __driver_probe_device+0x7c/0xe8
[   15.653541]  driver_probe_device+0x40/0x110
[   15.653547]  __device_attach_driver+0x98/0xd0
[   15.653553]  bus_for_each_drv+0x68/0xd0
[   15.653559]  __device_attach+0xf4/0x188
[   15.653565]  device_initial_probe+0x14/0x20

Fix this by removing old code.

Reported-by: Amit Pundir <amit.pundir@linaro.org>
Fixes: 1fd0d85affe4 ("soundwire: qcom: Add flag for software clock gating check")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/soundwire/qcom.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 9df970eeca45..a43961ad4614 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1356,10 +1356,6 @@ static int qcom_swrm_probe(struct platform_device *pdev)
 	ctrl->bus.compute_params = &qcom_swrm_compute_params;
 	ctrl->bus.clk_stop_timeout = 300;
 
-	ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");
-	if (IS_ERR(ctrl->audio_cgcr))
-		dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n");
-
 	ret = qcom_swrm_get_port_config(ctrl);
 	if (ret)
 		goto err_clk;
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] soundwire: qcom: remove duplicate reset control get
  2022-08-14 12:38 [PATCH] soundwire: qcom: remove duplicate reset control get Srinivas Kandagatla
@ 2022-08-15 11:28 ` Amit Pundir
  2022-08-23 15:58 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Amit Pundir @ 2022-08-15 11:28 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: vkoul, alsa-devel

On Sun, 14 Aug 2022 at 18:08, Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
>
> Looks like adding clock gate flag patch forgot to remove the old code that
> gets reset control.
>
> This causes below crash on platforms that do not need reset.
>
> [   15.653501]  reset_control_reset+0x124/0x170
> [   15.653508]  qcom_swrm_init+0x50/0x1a0
> [   15.653514]  qcom_swrm_probe+0x320/0x668
> [   15.653519]  platform_probe+0x68/0xe0
> [   15.653529]  really_probe+0xbc/0x2a8
> [   15.653535]  __driver_probe_device+0x7c/0xe8
> [   15.653541]  driver_probe_device+0x40/0x110
> [   15.653547]  __device_attach_driver+0x98/0xd0
> [   15.653553]  bus_for_each_drv+0x68/0xd0
> [   15.653559]  __device_attach+0xf4/0x188
> [   15.653565]  device_initial_probe+0x14/0x20
>
> Fix this by removing old code.
>

Tested-by: Amit Pundir <amit.pundir@linaro.org>

> Reported-by: Amit Pundir <amit.pundir@linaro.org>
> Fixes: 1fd0d85affe4 ("soundwire: qcom: Add flag for software clock gating check")
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  drivers/soundwire/qcom.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index 9df970eeca45..a43961ad4614 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -1356,10 +1356,6 @@ static int qcom_swrm_probe(struct platform_device *pdev)
>         ctrl->bus.compute_params = &qcom_swrm_compute_params;
>         ctrl->bus.clk_stop_timeout = 300;
>
> -       ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");
> -       if (IS_ERR(ctrl->audio_cgcr))
> -               dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n");
> -
>         ret = qcom_swrm_get_port_config(ctrl);
>         if (ret)
>                 goto err_clk;
> --
> 2.21.0
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] soundwire: qcom: remove duplicate reset control get
  2022-08-14 12:38 [PATCH] soundwire: qcom: remove duplicate reset control get Srinivas Kandagatla
  2022-08-15 11:28 ` Amit Pundir
@ 2022-08-23 15:58 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2022-08-23 15:58 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: amit.pundir, alsa-devel

On 14-08-22, 13:38, Srinivas Kandagatla wrote:
> Looks like adding clock gate flag patch forgot to remove the old code that
> gets reset control.
> 
> This causes below crash on platforms that do not need reset.
> 
> [   15.653501]  reset_control_reset+0x124/0x170
> [   15.653508]  qcom_swrm_init+0x50/0x1a0
> [   15.653514]  qcom_swrm_probe+0x320/0x668
> [   15.653519]  platform_probe+0x68/0xe0
> [   15.653529]  really_probe+0xbc/0x2a8
> [   15.653535]  __driver_probe_device+0x7c/0xe8
> [   15.653541]  driver_probe_device+0x40/0x110
> [   15.653547]  __device_attach_driver+0x98/0xd0
> [   15.653553]  bus_for_each_drv+0x68/0xd0
> [   15.653559]  __device_attach+0xf4/0x188
> [   15.653565]  device_initial_probe+0x14/0x20
> 
> Fix this by removing old code.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-23 15:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-14 12:38 [PATCH] soundwire: qcom: remove duplicate reset control get Srinivas Kandagatla
2022-08-15 11:28 ` Amit Pundir
2022-08-23 15:58 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).