2024-03-28 22:21:54

by Laurentiu Mihalcea

[permalink] [raw]
Subject: [PATCH 0/2] ASoC: SOF: imx: stop using the imx8_*_clocks API

From: Laurentiu Mihalcea <[email protected]>

The imx8_*_clocks API requires keeping track of all of the clocks used
by the IMX SOF driver via an array. This is unnecessary and doesn't
scale well. As such, remove it altogether and replace it with
devm_clk_bulk_get_all() and friends.

Laurentiu Mihalcea (2):
ASoC: SOF: imx: drop usage of the imx8_*_clocks API
ASoC: SOF: imx: remove imx8_*_clocks API

sound/soc/sof/imx/imx-common.c | 24 -------------------
sound/soc/sof/imx/imx-common.h | 9 --------
sound/soc/sof/imx/imx8.c | 41 ++++++++++++++-------------------
sound/soc/sof/imx/imx8m.c | 40 ++++++++++++++------------------
sound/soc/sof/imx/imx8ulp.c | 42 +++++++++++++++-------------------
5 files changed, 53 insertions(+), 103 deletions(-)

--
2.34.1



2024-03-28 22:22:04

by Laurentiu Mihalcea

[permalink] [raw]
Subject: [PATCH 2/2] ASoC: SOF: imx: remove imx8_*_clocks API

From: Laurentiu Mihalcea <[email protected]>

Since the i.MX drivers no longer use the imx8_*_clocks API
this can be removed.

Signed-off-by: Laurentiu Mihalcea <[email protected]>
Reviewed-by: Iuliana Prodan <[email protected]>
Reviewed-by: Pierre-Louis Bossart <[email protected]>
Reviewed-by: Daniel Baluta <[email protected]>
---
sound/soc/sof/imx/imx-common.c | 24 ------------------------
sound/soc/sof/imx/imx-common.h | 9 ---------
2 files changed, 33 deletions(-)

diff --git a/sound/soc/sof/imx/imx-common.c b/sound/soc/sof/imx/imx-common.c
index 36e3d414a18f..2981aea123d9 100644
--- a/sound/soc/sof/imx/imx-common.c
+++ b/sound/soc/sof/imx/imx-common.c
@@ -74,28 +74,4 @@ void imx8_dump(struct snd_sof_dev *sdev, u32 flags)
}
EXPORT_SYMBOL(imx8_dump);

-int imx8_parse_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks)
-{
- int ret;
-
- ret = devm_clk_bulk_get(sdev->dev, clks->num_dsp_clks, clks->dsp_clks);
- if (ret)
- dev_err(sdev->dev, "Failed to request DSP clocks\n");
-
- return ret;
-}
-EXPORT_SYMBOL(imx8_parse_clocks);
-
-int imx8_enable_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks)
-{
- return clk_bulk_prepare_enable(clks->num_dsp_clks, clks->dsp_clks);
-}
-EXPORT_SYMBOL(imx8_enable_clocks);
-
-void imx8_disable_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks)
-{
- clk_bulk_disable_unprepare(clks->num_dsp_clks, clks->dsp_clks);
-}
-EXPORT_SYMBOL(imx8_disable_clocks);
-
MODULE_LICENSE("Dual BSD/GPL");
diff --git a/sound/soc/sof/imx/imx-common.h b/sound/soc/sof/imx/imx-common.h
index ec4b3a5c7496..13d7f3ef675e 100644
--- a/sound/soc/sof/imx/imx-common.h
+++ b/sound/soc/sof/imx/imx-common.h
@@ -15,13 +15,4 @@ void imx8_get_registers(struct snd_sof_dev *sdev,

void imx8_dump(struct snd_sof_dev *sdev, u32 flags);

-struct imx_clocks {
- struct clk_bulk_data *dsp_clks;
- int num_dsp_clks;
-};
-
-int imx8_parse_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks);
-int imx8_enable_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks);
-void imx8_disable_clocks(struct snd_sof_dev *sdev, struct imx_clocks *clks);
-
#endif
--
2.34.1


2024-04-04 16:03:59

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH 0/2] ASoC: SOF: imx: stop using the imx8_*_clocks API

On Fri, 29 Mar 2024 00:11:59 +0200, Laurentiu Mihalcea wrote:
> The imx8_*_clocks API requires keeping track of all of the clocks used
> by the IMX SOF driver via an array. This is unnecessary and doesn't
> scale well. As such, remove it altogether and replace it with
> devm_clk_bulk_get_all() and friends.
>
> Laurentiu Mihalcea (2):
> ASoC: SOF: imx: drop usage of the imx8_*_clocks API
> ASoC: SOF: imx: remove imx8_*_clocks API
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: SOF: imx: drop usage of the imx8_*_clocks API
commit: a358f67d16942f3bbc4d6b0e4b65efd5dda1c304
[2/2] ASoC: SOF: imx: remove imx8_*_clocks API
commit: e618b8b37aa1dac42f50c87373d71ecc68ead97d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark