MIPS: TXx9: Common Clock Framework Conversion
Subsystems (3)
v2 cover MIPS: TXx9: Common Clock Framework Conversion
Hi Ralf, Nemoto-san, Wim,
This patch series converts the Toshiba TXx9 platforms from their own custom minimal clock implementation to the Common Clock Framework.
- Patch 1 adds missing clock (un)prepare calls to the TXx9 watchdog driver,
- Patch 2 replaces the custom clock implementation by a CCF-based one, providing a minimal set of clocks.
This has been tested with the watchdog on RBTX4927.
Changes since v1:
- Dropped "spi: spi-txx9: Add missing clock (un)prepare calls for CCF", which has been accepted in spi/for-next,
- Protect the TX4938_REV_PCODE() check by #ifdef CONFIG_CPU_TX49XX,
- Use new clk_hw-centric clock registration API,
- Add Reviewed-by.
Dependencies:
- Patch 1 can be applied independently,
- Patch 2 depends on patch 1 and on "spi: spi-txx9: Add missing clock (un)prepare calls for CCF" in spi/for-next,
- The error path in patch 2 depends on "clkdev: Detect errors in clk_hw_register_clkdev() for mass registration", but this is less critical.
Wim: Can you please appply patch 1 directly, so we can get at least the hard dependencies in v4.9?
Thanks!
Geert Uytterhoeven (2):
watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF
MIPS: TXx9: Convert to Common Clock Framework
arch/mips/txx9/Kconfig | 2 +- arch/mips/txx9/generic/setup.c | 70 +++++++++++++++++++++--------------------- drivers/watchdog/txx9wdt.c | 6 ++-- 3 files changed, 39 insertions(+), 39 deletions(-)
Signature · 12 lines
1.9.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH v2 1/2 watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF
While the custom minimal TXx9 clock implementation doesn't need or use clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE), they are mandatory when using the Common Clock Framework.
Hence add them, to prepare for the advent of CCF.
---
Tested on RBTX4927.
v2:
- Add Reviewed-by.
--- drivers/watchdog/txx9wdt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/watchdog/txx9wdt.c +3 -3
@@ -112,7 +112,7 @@ static int __init txx9wdt_probe(struct platform_device *dev) txx9_imclk =NULL ; goto exit; } - ret =clk_enable (txx9_imclk); + ret =clk_prepare_enable (txx9_imclk);if (ret) {clk_put (txx9_imclk); txx9_imclk =NULL ;
@@ -144,7 +144,7 @@ static int __init txx9wdt_probe(struct platform_device *dev)return 0 ; exit:if (txx9_imclk) { -clk_disable (txx9_imclk); +clk_disable_unprepare (txx9_imclk);clk_put (txx9_imclk); }return ret;
@@ -153,7 +153,7 @@ exit: static int __exit txx9wdt_remove(struct platform_device *dev) {watchdog_unregister_device (&txx9wdt); -clk_disable (txx9_imclk); +clk_disable_unprepare (txx9_imclk);clk_put (txx9_imclk);return 0 ; }
Signature · 1 line
1.9.1
Re: [PATCH v2 1/2] watchdog: txx9wdt: Add missing clock (un)prepare calls for CCF
Hi Geert,
Quoted 8 lines
While the custom minimal TXx9 clock implementation doesn't need or use clock (un)prepare calls (they are dummies if !CONFIG_HAVE_CLK_PREPARE), they are mandatory when using the Common Clock Framework.
Hence add them, to prepare for the advent of CCF.
Signed-off-by Geert Uytterhoeven <[email protected]>Reviewed-by Guenter Roeck <[email protected]>
This patch was added to linux-watchdog-next almost 2 weeks ago.
Kind regards,
Wim.
PATCH v2 2/2 MIPS: TXx9: Convert to Common Clock Framework
In reply to Geert UytterhoevenReplace the custom minimal clock implementation for Toshiba TXx9 by a basic implementation using the Common Clock Framework.
The only clocks that are provided are those needed by TXx9-specific drivers ("imbus" and "spi" (TX4938 only)), and their common parent clock "gbus". Other clocks can be added when needed.
---
Tested on RBTX4927.
v2:
- Protect the TX4938_REV_PCODE() check by #ifdef CONFIG_CPU_TX49XX,
- Use new clk_hw-centric clock registration API.
--- arch/mips/txx9/Kconfig | 2 +- arch/mips/txx9/generic/setup.c | 70 +++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 36 deletions(-)
arch/mips/txx9/Kconfig +1 -1
@@ -20,7 +20,7 @@ config MACH_TXX9 select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_BIG_ENDIAN - select HAVE_CLK + select COMMON_CLK config TOSHIBA_JMR3927 bool "Toshiba JMR-TX3927 board"
arch/mips/txx9/generic/setup.c +35 -35
90 lines not on this page · raw message
Signature · 1 line
1.9.1
Re: [PATCH v2 2/2] MIPS: TXx9: Convert to Common Clock Framework
Quoted 9 lines · Geert Uytterhoeven
Replace the custom minimal clock implementation for Toshiba TXx9 by a basic implementation using the Common Clock Framework.
The only clocks that are provided are those needed by TXx9-specific drivers ("imbus" and "spi" (TX4938 only)), and their common parent clock "gbus". Other clocks can be added when needed.
Signed-off-by Geert Uytterhoeven <[email protected]>---
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Re: [PATCH v2 2/2] MIPS: TXx9: Convert to Common Clock Framework
In reply to Geert UytterhoevenQuoted 7 lines · Geert Uytterhoeven
Replace the custom minimal clock implementation for Toshiba TXx9 by a basic implementation using the Common Clock Framework.
The only clocks that are provided are those needed by TXx9-specific drivers ("imbus" and "spi" (TX4938 only)), and their common parent clock "gbus". Other clocks can be added when needed.
Quoted 7 lines
Signed-off-by Geert Uytterhoeven <[email protected]>---
Tested on RBTX4927.v2:
- Protect theTX4938_REV_PCODE()check by #ifdefCONFIG_CPU_TX49XX,
- Use new clk_hw-centric clock registration API.
Thank you for updated patch.
---
Atsushi Nemoto
Guenter Roeck
maintainerQuoted 27 lines · Geert Uytterhoeven
Hi Ralf, Nemoto-san, Wim,
This patch series converts the Toshiba TXx9 platforms from their own custom minimal clock implementation to the Common Clock Framework.
- Patch 1 adds missing clock (un)prepare calls to the TXx9 watchdog driver,
- Patch 2 replaces the custom clock implementation by a CCF-based one, providing a minimal set of clocks.This has been tested with the watchdog on RBTX4927.
Changes since v1:
- Dropped "spi: spi-txx9: Add missing clock (un)prepare calls for CCF", which has been accepted in spi/for-next,
- Protect theTX4938_REV_PCODE()check by #ifdefCONFIG_CPU_TX49XX,
- Use new clk_hw-centric clock registration API,
- Add Reviewed-by.Dependencies:
- Patch 1 can be applied independently,
- Patch 2 depends on patch 1 and on "spi: spi-txx9: Add missing clock (un)prepare calls for CCF" in spi/for-next,
- The error path in patch 2 depends on "clkdev: Detect errors inclk_hw_register_clkdev()for mass registration", but this is less critical.
Quoted 3 lines
Wim: Can you please appply patch 1 directly, so we can get at least the hard dependencies in v4.9?
It is in my watchdog-next branch, and it has my Reviewed-by:, which normally means that Wim will apply it.
Thanks,
Guenter