* [PATCH v5 0/2] Add software clock gating requirement check
@ 2022-06-10 12:23 Srinivasa Rao Mandadapu
2022-06-10 12:23 ` [PATCH v5 1/2] soundwire: qcom: Add flag for software clock gating check Srinivasa Rao Mandadapu
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Srinivasa Rao Mandadapu @ 2022-06-10 12:23 UTC (permalink / raw)
To: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, quic_plai,
bgoswami, perex, tiwai, srinivas.kandagatla, quic_rohkumar,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd,
judyhsiao, vkoul
Cc: Srinivasa Rao Mandadapu
This patch set is to add software clock gating requirement check
Changes Since V4:
-- Fix error check, after a reset control get api return
-- Fix typo in commit message
Changes Since V3:
-- Remove redundant check before reset control call
-- Reorganiaze patches.
-- Fix typos.
Changes Since V2:
-- Fix if check before reset control call
Changes Since V1:
-- Use boolean flag for bool variable initialization
instead of hard coding.
Srinivasa Rao Mandadapu (2):
soundwire: qcom: Add flag for software clock gating check
ASoC: qcom: soundwire: Enable software clock gating requirement flag
drivers/soundwire/qcom.c | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v5 1/2] soundwire: qcom: Add flag for software clock gating check
2022-06-10 12:23 [PATCH v5 0/2] Add software clock gating requirement check Srinivasa Rao Mandadapu
@ 2022-06-10 12:23 ` Srinivasa Rao Mandadapu
2022-06-10 12:23 ` [PATCH v5 2/2] ASoC: qcom: soundwire: Enable software clock gating requirement flag Srinivasa Rao Mandadapu
2022-06-23 8:09 ` [PATCH v5 0/2] Add software clock gating requirement check Vinod Koul
2 siblings, 0 replies; 7+ messages in thread
From: Srinivasa Rao Mandadapu @ 2022-06-10 12:23 UTC (permalink / raw)
To: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, quic_plai,
bgoswami, perex, tiwai, srinivas.kandagatla, quic_rohkumar,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd,
judyhsiao, vkoul
Cc: Srinivasa Rao Mandadapu
Validate software clock gating required or not and do software
clock gating on hclk if soundwire is operational and keep it
running by adding flag in private data structure.
This is to avoid conflict between older architectures,
where software clock gating is not required and on latest
architectures, where software clock gating is mandatory.
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/soundwire/qcom.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index a3fccf0..eb3c66e 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -181,6 +181,7 @@ struct qcom_swrm_ctrl {
struct qcom_swrm_data {
u32 default_cols;
u32 default_rows;
+ bool sw_clk_gate_required;
};
static const struct qcom_swrm_data swrm_v1_3_data = {
@@ -1311,6 +1312,15 @@ static int qcom_swrm_probe(struct platform_device *pdev)
return PTR_ERR(ctrl->mmio);
}
+ if (data->sw_clk_gate_required) {
+ ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");
+ if (IS_ERR_OR_NULL(ctrl->audio_cgcr)) {
+ dev_err(dev, "Failed to get cgcr reset ctrl required for SW gating\n");
+ ret = PTR_ERR(ctrl->audio_cgcr);
+ goto err_init;
+ }
+ }
+
ctrl->irq = of_irq_get(dev->of_node, 0);
if (ctrl->irq < 0) {
ret = ctrl->irq;
@@ -1336,10 +1346,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.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v5 2/2] ASoC: qcom: soundwire: Enable software clock gating requirement flag
2022-06-10 12:23 [PATCH v5 0/2] Add software clock gating requirement check Srinivasa Rao Mandadapu
2022-06-10 12:23 ` [PATCH v5 1/2] soundwire: qcom: Add flag for software clock gating check Srinivasa Rao Mandadapu
@ 2022-06-10 12:23 ` Srinivasa Rao Mandadapu
2022-06-23 8:09 ` [PATCH v5 0/2] Add software clock gating requirement check Vinod Koul
2 siblings, 0 replies; 7+ messages in thread
From: Srinivasa Rao Mandadapu @ 2022-06-10 12:23 UTC (permalink / raw)
To: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, quic_plai,
bgoswami, perex, tiwai, srinivas.kandagatla, quic_rohkumar,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd,
judyhsiao, vkoul
Cc: Srinivasa Rao Mandadapu
Enable software clock gating flag in private data for SC7280
based platforms, which are soundwire 1.6.0 version based.
Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/soundwire/qcom.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index eb3c66e..441fbe8 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -194,6 +194,12 @@ static const struct qcom_swrm_data swrm_v1_5_data = {
.default_cols = 16,
};
+static const struct qcom_swrm_data swrm_v1_6_data = {
+ .default_rows = 50,
+ .default_cols = 16,
+ .sw_clk_gate_required = true,
+};
+
#define to_qcom_sdw(b) container_of(b, struct qcom_swrm_ctrl, bus)
static int qcom_swrm_ahb_reg_read(struct qcom_swrm_ctrl *ctrl, int reg,
@@ -1564,7 +1570,7 @@ static const struct dev_pm_ops swrm_dev_pm_ops = {
static const struct of_device_id qcom_swrm_of_match[] = {
{ .compatible = "qcom,soundwire-v1.3.0", .data = &swrm_v1_3_data },
{ .compatible = "qcom,soundwire-v1.5.1", .data = &swrm_v1_5_data },
- { .compatible = "qcom,soundwire-v1.6.0", .data = &swrm_v1_5_data },
+ { .compatible = "qcom,soundwire-v1.6.0", .data = &swrm_v1_6_data },
{/* sentinel */},
};
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/2] Add software clock gating requirement check
2022-06-10 12:23 [PATCH v5 0/2] Add software clock gating requirement check Srinivasa Rao Mandadapu
2022-06-10 12:23 ` [PATCH v5 1/2] soundwire: qcom: Add flag for software clock gating check Srinivasa Rao Mandadapu
2022-06-10 12:23 ` [PATCH v5 2/2] ASoC: qcom: soundwire: Enable software clock gating requirement flag Srinivasa Rao Mandadapu
@ 2022-06-23 8:09 ` Vinod Koul
2022-06-27 12:31 ` Srinivasa Rao Mandadapu
2 siblings, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2022-06-23 8:09 UTC (permalink / raw)
To: Srinivasa Rao Mandadapu
Cc: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, quic_plai,
bgoswami, perex, tiwai, srinivas.kandagatla, quic_rohkumar,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd,
judyhsiao
On 10-06-22, 17:53, Srinivasa Rao Mandadapu wrote:
> This patch set is to add software clock gating requirement check
This fails to apply for me, please rebase on sdw-next and resend
Thanks
--
~Vinod
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/2] Add software clock gating requirement check
2022-06-23 8:09 ` [PATCH v5 0/2] Add software clock gating requirement check Vinod Koul
@ 2022-06-27 12:31 ` Srinivasa Rao Mandadapu
2022-06-29 5:00 ` Vinod Koul
0 siblings, 1 reply; 7+ messages in thread
From: Srinivasa Rao Mandadapu @ 2022-06-27 12:31 UTC (permalink / raw)
To: Vinod Koul
Cc: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, quic_plai,
bgoswami, perex, tiwai, srinivas.kandagatla, quic_rohkumar,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd,
judyhsiao
On 6/23/2022 1:39 PM, Vinod Koul wrote:
Thanks for your time Vinod!!!
> On 10-06-22, 17:53, Srinivasa Rao Mandadapu wrote:
>> This patch set is to add software clock gating requirement check
> This fails to apply for me, please rebase on sdw-next and resend
>
> Thanks
It seems one patch is missing in your branch, which accepted by Mark brown.
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?id=32882881078bd8f8fae47ff69c102d9e691f5bb9
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/2] Add software clock gating requirement check
2022-06-27 12:31 ` Srinivasa Rao Mandadapu
@ 2022-06-29 5:00 ` Vinod Koul
2022-06-29 5:03 ` Srinivasa Rao Mandadapu
0 siblings, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2022-06-29 5:00 UTC (permalink / raw)
To: Srinivasa Rao Mandadapu
Cc: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, quic_plai,
bgoswami, perex, tiwai, srinivas.kandagatla, quic_rohkumar,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd,
judyhsiao
On 27-06-22, 18:01, Srinivasa Rao Mandadapu wrote:
>
> On 6/23/2022 1:39 PM, Vinod Koul wrote:
> Thanks for your time Vinod!!!
> > On 10-06-22, 17:53, Srinivasa Rao Mandadapu wrote:
> > > This patch set is to add software clock gating requirement check
> > This fails to apply for me, please rebase on sdw-next and resend
> >
> > Thanks
>
> It seems one patch is missing in your branch, which accepted by Mark brown.
Ok. Pls send on -next and if there are conflicts we can coordinate with
Mark.
--
~Vinod
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/2] Add software clock gating requirement check
2022-06-29 5:00 ` Vinod Koul
@ 2022-06-29 5:03 ` Srinivasa Rao Mandadapu
0 siblings, 0 replies; 7+ messages in thread
From: Srinivasa Rao Mandadapu @ 2022-06-29 5:03 UTC (permalink / raw)
To: Vinod Koul
Cc: agross, bjorn.andersson, lgirdwood, broonie, robh+dt, quic_plai,
bgoswami, perex, tiwai, srinivas.kandagatla, quic_rohkumar,
linux-arm-msm, alsa-devel, devicetree, linux-kernel, swboyd,
judyhsiao
On 6/29/2022 10:30 AM, Vinod Koul wrote:
> On 27-06-22, 18:01, Srinivasa Rao Mandadapu wrote:
>> On 6/23/2022 1:39 PM, Vinod Koul wrote:
>> Thanks for your time Vinod!!!
>>> On 10-06-22, 17:53, Srinivasa Rao Mandadapu wrote:
>>>> This patch set is to add software clock gating requirement check
>>> This fails to apply for me, please rebase on sdw-next and resend
>>>
>>> Thanks
>> It seems one patch is missing in your branch, which accepted by Mark brown.
> Ok. Pls send on -next and if there are conflicts we can coordinate with
> Mark.
The same patches were sent on -next branch. If the previous applied,
it's being applied directly.
Please correct me If my understanding is wrong.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-06-29 5:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-10 12:23 [PATCH v5 0/2] Add software clock gating requirement check Srinivasa Rao Mandadapu
2022-06-10 12:23 ` [PATCH v5 1/2] soundwire: qcom: Add flag for software clock gating check Srinivasa Rao Mandadapu
2022-06-10 12:23 ` [PATCH v5 2/2] ASoC: qcom: soundwire: Enable software clock gating requirement flag Srinivasa Rao Mandadapu
2022-06-23 8:09 ` [PATCH v5 0/2] Add software clock gating requirement check Vinod Koul
2022-06-27 12:31 ` Srinivasa Rao Mandadapu
2022-06-29 5:00 ` Vinod Koul
2022-06-29 5:03 ` Srinivasa Rao Mandadapu
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).