[PATCH 0/8] arm: ep93xx: CCF conversion

This series series of patches converts ep93xx to Common Clock Framework.
It consists of preparation patches to use clk_prepare_enable where it is needed, instead of clk_enable used in ep93xx drivers prior to CCF and a patch converting mach-ep93xx/clock.c to CCF.
Link: https://lore.kernel.org/patchwork/cover/1445563/ Link: https://lore.kernel.org/patchwork/patch/1435884/
Alexander Sverdlin (7): iio: ep93xx: Prepare clock before using it spi: spi-ep93xx: Prepare clock before using it Input: ep93xx_keypad: Prepare clock before using it video: ep93xx: Prepare clock before using it dmaengine: ep93xx: Prepare clock before using it ASoC: cirrus: i2s: Prepare clock before using it pwm: ep93xx: Prepare clock before using it
Nikita Shubin (1): ep93xx: clock: convert in-place to COMMON_CLK
arch/arm/Kconfig | 2 +- arch/arm/mach-ep93xx/clock.c | 975 ++++++++++++++----------- arch/arm/mach-ep93xx/core.c | 2 +- arch/arm/mach-ep93xx/soc.h | 42 +- drivers/dma/ep93xx_dma.c | 6 +- drivers/iio/adc/ep93xx_adc.c | 6 +- drivers/input/keyboard/ep93xx_keypad.c | 4 +- drivers/pwm/pwm-ep93xx.c | 12 +- drivers/spi/spi-ep93xx.c | 4 +- drivers/video/fbdev/ep93xx-fb.c | 4 +- sound/soc/cirrus/ep93xx-i2s.c | 12 +- 11 files changed, 605 insertions(+), 464 deletions(-)
base-commit: 64376a981a0e2e57c46efa63197c2ebb7dab35df

From: Alexander Sverdlin alexander.sverdlin@gmail.com
Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework, otherwise the following is visible:
WARNING: CPU: 0 PID: 97 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc Enabling unprepared mclk ... Hardware name: Cirrus Logic EDB9302 Evaluation Board ... clk_core_enable clk_core_enable_lock ep93xx_i2s_hw_params snd_soc_dai_hw_params soc_pcm_hw_params snd_pcm_hw_params snd_pcm_ioctl ...
Signed-off-by: Alexander Sverdlin alexander.sverdlin@gmail.com --- sound/soc/cirrus/ep93xx-i2s.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 0d26550d0df8..4d3179f03202 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -111,9 +111,9 @@ static void ep93xx_i2s_enable(struct ep93xx_i2s_info *info, int stream) if ((ep93xx_i2s_read_reg(info, EP93XX_I2S_TX0EN) & 0x1) == 0 && (ep93xx_i2s_read_reg(info, EP93XX_I2S_RX0EN) & 0x1) == 0) { /* Enable clocks */ - clk_enable(info->mclk); - clk_enable(info->sclk); - clk_enable(info->lrclk); + clk_prepare_enable(info->mclk); + clk_prepare_enable(info->sclk); + clk_prepare_enable(info->lrclk);
/* Enable i2s */ ep93xx_i2s_write_reg(info, EP93XX_I2S_GLCTRL, 1); @@ -156,9 +156,9 @@ static void ep93xx_i2s_disable(struct ep93xx_i2s_info *info, int stream) ep93xx_i2s_write_reg(info, EP93XX_I2S_GLCTRL, 0);
/* Disable clocks */ - clk_disable(info->lrclk); - clk_disable(info->sclk); - clk_disable(info->mclk); + clk_disable_unprepare(info->lrclk); + clk_disable_unprepare(info->sclk); + clk_disable_unprepare(info->mclk); } }

This series series of patches converts ep93xx to Common Clock Framework.
It consists of preparation patches to use clk_prepare_enable where it is needed, instead of clk_enable used in ep93xx drivers prior to CCF and a patch converting mach-ep93xx/clock.c to CCF.
Link: https://lore.kernel.org/patchwork/cover/1445563/ Link: https://lore.kernel.org/patchwork/patch/1435884/
v1->v2: - added SoB
Alexander Sverdlin (7): iio: ep93xx: Prepare clock before using it spi: spi-ep93xx: Prepare clock before using it Input: ep93xx_keypad: Prepare clock before using it video: ep93xx: Prepare clock before using it dmaengine: ep93xx: Prepare clock before using it ASoC: cirrus: i2s: Prepare clock before using it pwm: ep93xx: Prepare clock before using it
Nikita Shubin (1): ep93xx: clock: convert in-place to COMMON_CLK
arch/arm/Kconfig | 2 +- arch/arm/mach-ep93xx/clock.c | 975 ++++++++++++++----------- arch/arm/mach-ep93xx/core.c | 2 +- arch/arm/mach-ep93xx/soc.h | 42 +- drivers/dma/ep93xx_dma.c | 6 +- drivers/iio/adc/ep93xx_adc.c | 6 +- drivers/input/keyboard/ep93xx_keypad.c | 4 +- drivers/pwm/pwm-ep93xx.c | 12 +- drivers/spi/spi-ep93xx.c | 4 +- drivers/video/fbdev/ep93xx-fb.c | 4 +- sound/soc/cirrus/ep93xx-i2s.c | 12 +- 11 files changed, 605 insertions(+), 464 deletions(-)
base-commit: 64376a981a0e2e57c46efa63197c2ebb7dab35df

From: Alexander Sverdlin alexander.sverdlin@gmail.com
Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework, otherwise the following is visible:
WARNING: CPU: 0 PID: 97 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc Enabling unprepared mclk ... Hardware name: Cirrus Logic EDB9302 Evaluation Board ... clk_core_enable clk_core_enable_lock ep93xx_i2s_hw_params snd_soc_dai_hw_params soc_pcm_hw_params snd_pcm_hw_params snd_pcm_ioctl ...
Signed-off-by: Alexander Sverdlin alexander.sverdlin@gmail.com Signed-off-by: Nikita Shubin nikita.shubin@maquefel.me --- sound/soc/cirrus/ep93xx-i2s.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 0d26550d0df8..4d3179f03202 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -111,9 +111,9 @@ static void ep93xx_i2s_enable(struct ep93xx_i2s_info *info, int stream) if ((ep93xx_i2s_read_reg(info, EP93XX_I2S_TX0EN) & 0x1) == 0 && (ep93xx_i2s_read_reg(info, EP93XX_I2S_RX0EN) & 0x1) == 0) { /* Enable clocks */ - clk_enable(info->mclk); - clk_enable(info->sclk); - clk_enable(info->lrclk); + clk_prepare_enable(info->mclk); + clk_prepare_enable(info->sclk); + clk_prepare_enable(info->lrclk);
/* Enable i2s */ ep93xx_i2s_write_reg(info, EP93XX_I2S_GLCTRL, 1); @@ -156,9 +156,9 @@ static void ep93xx_i2s_disable(struct ep93xx_i2s_info *info, int stream) ep93xx_i2s_write_reg(info, EP93XX_I2S_GLCTRL, 0);
/* Disable clocks */ - clk_disable(info->lrclk); - clk_disable(info->sclk); - clk_disable(info->mclk); + clk_disable_unprepare(info->lrclk); + clk_disable_unprepare(info->sclk); + clk_disable_unprepare(info->mclk); } }

On Mon, Jul 26, 2021 at 04:59:54PM +0300, Nikita Shubin wrote:
From: Alexander Sverdlin alexander.sverdlin@gmail.com
Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework, otherwise the following is visible:
Acked-by: Mark Brown broonie@kernel.org

Hello Mark,
On Mon, 2021-07-26 at 17:51 +0100, Mark Brown wrote:
On Mon, Jul 26, 2021 at 04:59:54PM +0300, Nikita Shubin wrote:
From: Alexander Sverdlin alexander.sverdlin@gmail.com
Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework, otherwise the following is visible:
Acked-by: Mark Brown broonie@kernel.org
would you take the patch to a tree of yours, please?

Hello Mark,
On Mon, 2021-09-13 at 23:43 +0200, Alexander Sverdlin wrote:
On Mon, 2021-07-26 at 17:51 +0100, Mark Brown wrote:
On Mon, Jul 26, 2021 at 04:59:54PM +0300, Nikita Shubin wrote:
From: Alexander Sverdlin alexander.sverdlin@gmail.com
Use clk_prepare_enable()/clk_disable_unprepare() in preparation for switch to Common Clock Framework, otherwise the following is visible:
Acked-by: Mark Brown broonie@kernel.org
would you take the patch to a tree of yours, please?
I still cannot find this patch in any of your trees, but I've found this one:
commit 726e6f31b1026f62206f1d32b5cbb7e9582c4d03 Merge: b09bff2676be 7c72dc56a631 Author: Mark Brown broonie@kernel.org Date: Tue Aug 3 23:27:27 2021 +0100
Merge series "arm: ep93xx: CCF conversion" from Nikita Shubin nikita.shubin@maquefel.me:
This series series of patches converts ep93xx to Common Clock Framework.
It consists of preparation patches to use clk_prepare_enable where it is needed, instead of clk_enable used in ep93xx drivers prior to CCF and a patch converting mach-ep93xx/clock.c to CCF.
Link: https://lore.kernel.org/patchwork/cover/1445563/ Link: https://lore.kernel.org/patchwork/patch/1435884/
v1->v2: - added SoB
Alexander Sverdlin (7): iio: ep93xx: Prepare clock before using it spi: spi-ep93xx: Prepare clock before using it Input: ep93xx_keypad: Prepare clock before using it video: ep93xx: Prepare clock before using it dmaengine: ep93xx: Prepare clock before using it ASoC: cirrus: i2s: Prepare clock before using it pwm: ep93xx: Prepare clock before using it
Nikita Shubin (1): ep93xx: clock: convert in-place to COMMON_CLK
... which claims to merge both "ASoC: cirrus: i2s: Prepare clock before using it" and "ep93xx: clock: convert in-place to COMMON_CLK", but they are actually not merged.
Could you please consider ASoC patch, while I will resubmit the final clock conversion?

On Tue, Oct 12, 2021 at 09:25:15AM +0200, Alexander Sverdlin wrote:
On Mon, 2021-09-13 at 23:43 +0200, Alexander Sverdlin wrote:
would you take the patch to a tree of yours, please?
I still cannot find this patch in any of your trees, but I've found this one:
You ignored my question about dependencies:
https://lore.kernel.org/all/20210914103212.GB4434@sirena.org.uk/
so I've no idea if it's safe to apply or if other people might need this one patch from the middle of the series.
video: ep93xx: Prepare clock before using it dmaengine: ep93xx: Prepare clock before using it ASoC: cirrus: i2s: Prepare clock before using it pwm: ep93xx: Prepare clock before using it Nikita Shubin (1): ep93xx: clock: convert in-place to COMMON_CLK
... which claims to merge both "ASoC: cirrus: i2s: Prepare clock before using it" and "ep93xx: clock: convert in-place to COMMON_CLK", but they are actually not merged.
No, it doesn't - that's the cover letter from your series.
Could you please consider ASoC patch, while I will resubmit the final clock conversion?
So please answer my question then: what's the story with dependencies?

On Mon, 26 Jul 2021 16:59:48 +0300, Nikita Shubin wrote:
This series series of patches converts ep93xx to Common Clock Framework.
It consists of preparation patches to use clk_prepare_enable where it is needed, instead of clk_enable used in ep93xx drivers prior to CCF and a patch converting mach-ep93xx/clock.c to CCF.
Link: https://lore.kernel.org/patchwork/cover/1445563/ Link: https://lore.kernel.org/patchwork/patch/1435884/
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[2/8] spi: spi-ep93xx: Prepare clock before using it commit: 7c72dc56a631b87043e3c5838f5094db30d8c58d
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

On Mon, Jul 26, 2021 at 1:51 PM Nikita Shubin nikita.shubin@maquefel.me wrote:
This series series of patches converts ep93xx to Common Clock Framework.
It consists of preparation patches to use clk_prepare_enable where it is needed, instead of clk_enable used in ep93xx drivers prior to CCF and a patch converting mach-ep93xx/clock.c to CCF.
Link: https://lore.kernel.org/patchwork/cover/1445563/ Link: https://lore.kernel.org/patchwork/patch/1435884/
Alexander Sverdlin (7): iio: ep93xx: Prepare clock before using it spi: spi-ep93xx: Prepare clock before using it Input: ep93xx_keypad: Prepare clock before using it video: ep93xx: Prepare clock before using it dmaengine: ep93xx: Prepare clock before using it ASoC: cirrus: i2s: Prepare clock before using it pwm: ep93xx: Prepare clock before using it
Nikita Shubin (1): ep93xx: clock: convert in-place to COMMON_CLK
This series is looking very good. Reviewed-by: Linus Walleij linus.walleij@linaro.org
I suppose the per-subsystem patches can be picked up by each subsystem maintainer and then you can send the "big patch" to the SoC tree.
Yours, Linus Walleij
participants (4)
-
Alexander Sverdlin
-
Linus Walleij
-
Mark Brown
-
Nikita Shubin