dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] arm: ep93xx: CCF conversion
@ 2021-07-26 11:50 Nikita Shubin
  2021-07-26 11:50 ` [PATCH 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nikita Shubin @ 2021-07-26 11:50 UTC (permalink / raw)
  To: Alexander Sverdlin, Geert Uytterhoeven
  Cc: Nikita Shubin,
	moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
	Andrew Morton, Andrzej Pietrasiewicz, Anshuman Khandual,
	Ard Biesheuvel, Arnd Bergmann,
	open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM, Dmitry Torokhov,
	open list:FRAMEBUFFER LAYER, Geert Uytterhoeven,
	Jonathan Cameron, Krzysztof Kozlowski, Krzysztof Kozlowski,
	Kuninori Morimoto, Lars-Peter Clausen, Linus Walleij,
	moderated list:ARM PORT, open list:FRAMEBUFFER LAYER,
	open list:IIO SUBSYSTEM AND DRIVERS, open list:INPUT (KEYBOARD,
	MOUSE, JOYSTICK , TOUCHSCREEN)...,
	open list, open list:PWM SUBSYSTEM, open list:SPI SUBSYSTEM,
	Mark Brown, Mike Rapoport, Russell King, Uwe Kleine-König,
	YiFei Zhu

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
-- 
2.26.2


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

* [PATCH 5/8] dmaengine: ep93xx: Prepare clock before using it
  2021-07-26 11:50 [PATCH 0/8] arm: ep93xx: CCF conversion Nikita Shubin
@ 2021-07-26 11:50 ` Nikita Shubin
  2021-07-26 13:59 ` [PATCH v2 0/8] arm: ep93xx: CCF conversion Nikita Shubin
  2021-07-31 22:04 ` [PATCH " Linus Walleij
  2 siblings, 0 replies; 7+ messages in thread
From: Nikita Shubin @ 2021-07-26 11:50 UTC (permalink / raw)
  To: Alexander Sverdlin, Geert Uytterhoeven
  Cc: Vinod Koul, open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM, open list

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: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
Enabling unprepared m2p0
...
Hardware name: Cirrus Logic EDB9302 Evaluation Board
...
clk_core_enable
clk_core_enable_lock
ep93xx_dma_alloc_chan_resources
dma_chan_get
find_candidate
__dma_request_channel
snd_dmaengine_pcm_request_channel
dmaengine_pcm_new
snd_soc_pcm_component_new
soc_new_pcm
snd_soc_bind_card
edb93xx_probe
...
ep93xx-i2s ep93xx-i2s: Missing dma channel for stream: 0
ep93xx-i2s ep93xx-i2s: ASoC: error at snd_soc_pcm_component_new on ep93xx-i2s: -22
edb93xx-audio edb93xx-audio: ASoC: can't create pcm CS4271 HiFi :-22
edb93xx-audio edb93xx-audio: snd_soc_register_card() failed: -22
edb93xx-audio: probe of edb93xx-audio failed with error -22

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
---
 drivers/dma/ep93xx_dma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 01027779beb8..98f9ee70362e 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -897,7 +897,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
 	if (data && data->name)
 		name = data->name;
 
-	ret = clk_enable(edmac->clk);
+	ret = clk_prepare_enable(edmac->clk);
 	if (ret)
 		return ret;
 
@@ -936,7 +936,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
 fail_free_irq:
 	free_irq(edmac->irq, edmac);
 fail_clk_disable:
-	clk_disable(edmac->clk);
+	clk_disable_unprepare(edmac->clk);
 
 	return ret;
 }
@@ -969,7 +969,7 @@ static void ep93xx_dma_free_chan_resources(struct dma_chan *chan)
 	list_for_each_entry_safe(desc, d, &list, node)
 		kfree(desc);
 
-	clk_disable(edmac->clk);
+	clk_disable_unprepare(edmac->clk);
 	free_irq(edmac->irq, edmac);
 }
 
-- 
2.26.2


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

* [PATCH v2 0/8] arm: ep93xx: CCF conversion
  2021-07-26 11:50 [PATCH 0/8] arm: ep93xx: CCF conversion Nikita Shubin
  2021-07-26 11:50 ` [PATCH 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
@ 2021-07-26 13:59 ` Nikita Shubin
  2021-07-26 13:59   ` [PATCH v2 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
  2021-08-03 22:35   ` (subset) [PATCH v2 0/8] arm: ep93xx: CCF conversion Mark Brown
  2021-07-31 22:04 ` [PATCH " Linus Walleij
  2 siblings, 2 replies; 7+ messages in thread
From: Nikita Shubin @ 2021-07-26 13:59 UTC (permalink / raw)
  To: Alexander Sverdlin, Geert Uytterhoeven
  Cc: Nikita Shubin,
	moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
	Andrew Morton, Andrzej Pietrasiewicz, Anshuman Khandual,
	Ard Biesheuvel, Arnd Bergmann,
	open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM, Dmitry Torokhov,
	open list:FRAMEBUFFER LAYER, Geert Uytterhoeven,
	Jonathan Cameron, Krzysztof Kozlowski, Krzysztof Kozlowski,
	Kuninori Morimoto, Lars-Peter Clausen, Linus Walleij,
	moderated list:ARM PORT, open list:FRAMEBUFFER LAYER,
	open list:IIO SUBSYSTEM AND DRIVERS, open list:INPUT (KEYBOARD,
	MOUSE, JOYSTICK , TOUCHSCREEN)...,
	open list, open list:PWM SUBSYSTEM, open list:SPI SUBSYSTEM,
	Mark Brown, Mike Rapoport, Russell King, Uwe Kleine-König,
	YiFei Zhu

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
-- 
2.26.2


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

* [PATCH v2 5/8] dmaengine: ep93xx: Prepare clock before using it
  2021-07-26 13:59 ` [PATCH v2 0/8] arm: ep93xx: CCF conversion Nikita Shubin
@ 2021-07-26 13:59   ` Nikita Shubin
  2021-08-02  6:57     ` Vinod Koul
  2021-08-03 22:35   ` (subset) [PATCH v2 0/8] arm: ep93xx: CCF conversion Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Nikita Shubin @ 2021-07-26 13:59 UTC (permalink / raw)
  To: Alexander Sverdlin, Geert Uytterhoeven
  Cc: Nikita Shubin, Vinod Koul,
	open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM, open list

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: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
Enabling unprepared m2p0
...
Hardware name: Cirrus Logic EDB9302 Evaluation Board
...
clk_core_enable
clk_core_enable_lock
ep93xx_dma_alloc_chan_resources
dma_chan_get
find_candidate
__dma_request_channel
snd_dmaengine_pcm_request_channel
dmaengine_pcm_new
snd_soc_pcm_component_new
soc_new_pcm
snd_soc_bind_card
edb93xx_probe
...
ep93xx-i2s ep93xx-i2s: Missing dma channel for stream: 0
ep93xx-i2s ep93xx-i2s: ASoC: error at snd_soc_pcm_component_new on ep93xx-i2s: -22
edb93xx-audio edb93xx-audio: ASoC: can't create pcm CS4271 HiFi :-22
edb93xx-audio edb93xx-audio: snd_soc_register_card() failed: -22
edb93xx-audio: probe of edb93xx-audio failed with error -22

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>
---
 drivers/dma/ep93xx_dma.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 01027779beb8..98f9ee70362e 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -897,7 +897,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
 	if (data && data->name)
 		name = data->name;
 
-	ret = clk_enable(edmac->clk);
+	ret = clk_prepare_enable(edmac->clk);
 	if (ret)
 		return ret;
 
@@ -936,7 +936,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
 fail_free_irq:
 	free_irq(edmac->irq, edmac);
 fail_clk_disable:
-	clk_disable(edmac->clk);
+	clk_disable_unprepare(edmac->clk);
 
 	return ret;
 }
@@ -969,7 +969,7 @@ static void ep93xx_dma_free_chan_resources(struct dma_chan *chan)
 	list_for_each_entry_safe(desc, d, &list, node)
 		kfree(desc);
 
-	clk_disable(edmac->clk);
+	clk_disable_unprepare(edmac->clk);
 	free_irq(edmac->irq, edmac);
 }
 
-- 
2.26.2


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

* Re: [PATCH 0/8] arm: ep93xx: CCF conversion
  2021-07-26 11:50 [PATCH 0/8] arm: ep93xx: CCF conversion Nikita Shubin
  2021-07-26 11:50 ` [PATCH 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
  2021-07-26 13:59 ` [PATCH v2 0/8] arm: ep93xx: CCF conversion Nikita Shubin
@ 2021-07-31 22:04 ` Linus Walleij
  2 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2021-07-31 22:04 UTC (permalink / raw)
  To: Nikita Shubin
  Cc: Alexander Sverdlin, Geert Uytterhoeven,
	moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
	Andrew Morton, Andrzej Pietrasiewicz, Anshuman Khandual,
	Ard Biesheuvel, Arnd Bergmann,
	open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM, Dmitry Torokhov,
	open list:FRAMEBUFFER LAYER, Geert Uytterhoeven,
	Jonathan Cameron, Krzysztof Kozlowski, Krzysztof Kozlowski,
	Kuninori Morimoto, Lars-Peter Clausen, moderated list:ARM PORT,
	open list:FRAMEBUFFER LAYER, open list:IIO SUBSYSTEM AND DRIVERS,
	open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)...,
	open list, open list:PWM SUBSYSTEM, open list:SPI SUBSYSTEM,
	Mark Brown, Mike Rapoport, Russell King, Uwe Kleine-König,
	YiFei Zhu

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

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

* Re: [PATCH v2 5/8] dmaengine: ep93xx: Prepare clock before using it
  2021-07-26 13:59   ` [PATCH v2 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
@ 2021-08-02  6:57     ` Vinod Koul
  0 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2021-08-02  6:57 UTC (permalink / raw)
  To: Nikita Shubin
  Cc: Alexander Sverdlin, Geert Uytterhoeven,
	open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM, open list

On 26-07-21, 16:59, 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:
> 
> WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:1011 clk_core_enable+0x9c/0xbc
> Enabling unprepared m2p0
> ...
> Hardware name: Cirrus Logic EDB9302 Evaluation Board
> ...
> clk_core_enable
> clk_core_enable_lock
> ep93xx_dma_alloc_chan_resources
> dma_chan_get
> find_candidate
> __dma_request_channel
> snd_dmaengine_pcm_request_channel
> dmaengine_pcm_new
> snd_soc_pcm_component_new
> soc_new_pcm
> snd_soc_bind_card
> edb93xx_probe
> ...
> ep93xx-i2s ep93xx-i2s: Missing dma channel for stream: 0
> ep93xx-i2s ep93xx-i2s: ASoC: error at snd_soc_pcm_component_new on ep93xx-i2s: -22
> edb93xx-audio edb93xx-audio: ASoC: can't create pcm CS4271 HiFi :-22
> edb93xx-audio edb93xx-audio: snd_soc_register_card() failed: -22
> edb93xx-audio: probe of edb93xx-audio failed with error -22

Applied, thanks

-- 
~Vinod

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

* Re: (subset) [PATCH v2 0/8] arm: ep93xx: CCF conversion
  2021-07-26 13:59 ` [PATCH v2 0/8] arm: ep93xx: CCF conversion Nikita Shubin
  2021-07-26 13:59   ` [PATCH v2 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
@ 2021-08-03 22:35   ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2021-08-03 22:35 UTC (permalink / raw)
  To: Alexander Sverdlin, Geert Uytterhoeven, Nikita Shubin
  Cc: Mark Brown, open list:PWM SUBSYSTEM, open list,
	Andrzej Pietrasiewicz, Anshuman Khandual, Russell King,
	moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM...,
	open list:INPUT KEYBOARD, MOUSE, JOYSTICK , TOUCHSCREEN...,
	YiFei Zhu, Geert Uytterhoeven, Lars-Peter Clausen, Linus Walleij,
	Krzysztof Kozlowski, moderated list:ARM PORT, Ard Biesheuvel,
	Arnd Bergmann, Dmitry Torokhov, Kuninori Morimoto,
	open list:FRAMEBUFFER LAYER, Mike Rapoport,
	Uwe Kleine-König, open list:SPI SUBSYSTEM,
	Krzysztof Kozlowski, Andrew Morton, Jonathan Cameron,
	open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM,
	open list:FRAMEBUFFER LAYER, open list:IIO SUBSYSTEM AND DRIVERS

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

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

end of thread, other threads:[~2021-08-03 22:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 11:50 [PATCH 0/8] arm: ep93xx: CCF conversion Nikita Shubin
2021-07-26 11:50 ` [PATCH 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
2021-07-26 13:59 ` [PATCH v2 0/8] arm: ep93xx: CCF conversion Nikita Shubin
2021-07-26 13:59   ` [PATCH v2 5/8] dmaengine: ep93xx: Prepare clock before using it Nikita Shubin
2021-08-02  6:57     ` Vinod Koul
2021-08-03 22:35   ` (subset) [PATCH v2 0/8] arm: ep93xx: CCF conversion Mark Brown
2021-07-31 22:04 ` [PATCH " Linus Walleij

This is a public inbox, see mirroring instructions
on how to clone and mirror all data and code used for this inbox