linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update
@ 2019-06-17 10:00 Magnus Damm
  2019-06-17 10:00 ` [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0 Magnus Damm
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Magnus Damm @ 2019-06-17 10:00 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Magnus Damm

clocksource/drivers/sh_cmt: Minor DT compat string update

[PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0
[PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support
[PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated

Move over to new CMT1 bindings on r8a7740 and sh73a0 and get rid of old
stale stuff such as "cmt-48-gen2" while keeping "cmt-48" around but document
it as deprecated.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

Patch 1 and patch 3 depend on updated SoC-specific DT bindings in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740

 drivers/clocksource/sh_cmt.c |   19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

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

* [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0
  2019-06-17 10:00 [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Magnus Damm
@ 2019-06-17 10:00 ` Magnus Damm
  2019-06-17 10:00 ` [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support Magnus Damm
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2019-06-17 10:00 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Magnus Damm

From: Magnus Damm <damm+renesas@opensource.se>

Add SoC-specific matching for CMT1 on r8a7740 and sh73a0.

This allows us to move away from the old DT bindings such as
 - "renesas,cmt-48-sh73a0"
 - "renesas,cmt-48-r8a7740"
 - "renesas,cmt-48"
in favour for the now commonly used format "renesas,<soc>-<device>"

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

The updated SoC-specific DT bindings are documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740

 drivers/clocksource/sh_cmt.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- 0001/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c	2019-06-17 14:42:26.019448534 +0900
@@ -928,6 +928,14 @@ static const struct of_device_id sh_cmt_
 		.data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
 	},
 	{
+		.compatible = "renesas,r8a7740-cmt1",
+		.data = &sh_cmt_info[SH_CMT_48BIT]
+	},
+	{
+		.compatible = "renesas,sh73a0-cmt1",
+		.data = &sh_cmt_info[SH_CMT_48BIT]
+	},
+	{
 		.compatible = "renesas,rcar-gen2-cmt0",
 		.data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
 	},

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

* [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support
  2019-06-17 10:00 [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Magnus Damm
  2019-06-17 10:00 ` [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0 Magnus Damm
@ 2019-06-17 10:00 ` Magnus Damm
  2019-06-18 14:01   ` Geert Uytterhoeven
  2019-06-17 10:00 ` [PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated Magnus Damm
  2019-06-18 10:31 ` [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Simon Horman
  3 siblings, 1 reply; 9+ messages in thread
From: Magnus Damm @ 2019-06-17 10:00 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Magnus Damm

From: Magnus Damm <damm+renesas@opensource.se>

Since late 2017 the DT compat string "renesas,cmt-48-gen2" has not been in
use in the upstream kernel. SoC-specific strings and the fallback string
"rcar-gen2-cmt1" are now used in the DTSI instead.

Remove "renesas,cmt-48-gen2" from the CMT driver.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 drivers/clocksource/sh_cmt.c |    5 -----
 1 file changed, 5 deletions(-)

--- 0027/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c	2019-06-17 14:44:52.819144991 +0900
@@ -923,11 +923,6 @@ MODULE_DEVICE_TABLE(platform, sh_cmt_id_
 static const struct of_device_id sh_cmt_of_table[] __maybe_unused = {
 	{ .compatible = "renesas,cmt-48", .data = &sh_cmt_info[SH_CMT_48BIT] },
 	{
-		/* deprecated, preserved for backward compatibility */
-		.compatible = "renesas,cmt-48-gen2",
-		.data = &sh_cmt_info[SH_CMT0_RCAR_GEN2]
-	},
-	{
 		.compatible = "renesas,r8a7740-cmt1",
 		.data = &sh_cmt_info[SH_CMT_48BIT]
 	},

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

* [PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated
  2019-06-17 10:00 [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Magnus Damm
  2019-06-17 10:00 ` [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0 Magnus Damm
  2019-06-17 10:00 ` [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support Magnus Damm
@ 2019-06-17 10:00 ` Magnus Damm
  2019-06-18 10:31 ` [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Simon Horman
  3 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2019-06-17 10:00 UTC (permalink / raw)
  To: linux-renesas-soc; +Cc: Magnus Damm

From: Magnus Damm <damm+renesas@opensource.se>

Update the CMT driver to mark "renesas,cmt-48" as deprecated.

Instead of documenting a theoretical hardware device based on current software
support level, define DT bindings top-down based on available data sheet
information and make use of part numbers in the DT compat string.

In case of the only in-tree users r8a7740 and sh73a0 the compat strings
"renesas,r8a7740-cmt1" and "renesas,sh73a0-cmt1" may be used instead.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

The updated SoC-specific DT bindings are documented in:
[PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740

 drivers/clocksource/sh_cmt.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

--- 0029/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c	2019-06-17 14:47:46.179233988 +0900
@@ -921,7 +921,11 @@ static const struct platform_device_id s
 MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
 
 static const struct of_device_id sh_cmt_of_table[] __maybe_unused = {
-	{ .compatible = "renesas,cmt-48", .data = &sh_cmt_info[SH_CMT_48BIT] },
+	{
+		/* deprecated, preserved for backward compatibility */
+		.compatible = "renesas,cmt-48",
+		.data = &sh_cmt_info[SH_CMT_48BIT]
+	},
 	{
 		.compatible = "renesas,r8a7740-cmt1",
 		.data = &sh_cmt_info[SH_CMT_48BIT]

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

* Re: [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update
  2019-06-17 10:00 [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Magnus Damm
                   ` (2 preceding siblings ...)
  2019-06-17 10:00 ` [PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated Magnus Damm
@ 2019-06-18 10:31 ` Simon Horman
  2019-06-18 12:14   ` Magnus Damm
  3 siblings, 1 reply; 9+ messages in thread
From: Simon Horman @ 2019-06-18 10:31 UTC (permalink / raw)
  To: Magnus Damm; +Cc: linux-renesas-soc

On Mon, Jun 17, 2019 at 07:00:06PM +0900, Magnus Damm wrote:
> clocksource/drivers/sh_cmt: Minor DT compat string update
> 
> [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0
> [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support
> [PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated
> 
> Move over to new CMT1 bindings on r8a7740 and sh73a0 and get rid of old
> stale stuff such as "cmt-48-gen2" while keeping "cmt-48" around but document
> it as deprecated.
> 
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>


Hi Magnus,

I think this series should include the Clocksource maintainers as
recipients:

Daniel Lezcano <daniel.lezcano@linaro.org>
Thomas Gleixner <tglx@linutronix.de>

And LKML for good measure.

> ---
> 
> Patch 1 and patch 3 depend on updated SoC-specific DT bindings in:
> [PATCH 2/8] dt-bindings: timer: renesas, cmt: Update CMT1 on sh73a0 and r8a7740
> 
>  drivers/clocksource/sh_cmt.c |   19 +++++++++++++------
>  1 file changed, 13 insertions(+), 6 deletions(-)
> 

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

* Re: [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update
  2019-06-18 10:31 ` [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Simon Horman
@ 2019-06-18 12:14   ` Magnus Damm
  2019-06-18 12:24     ` Simon Horman
  0 siblings, 1 reply; 9+ messages in thread
From: Magnus Damm @ 2019-06-18 12:14 UTC (permalink / raw)
  To: Simon Horman; +Cc: Linux-Renesas

On Tue, Jun 18, 2019 at 7:31 PM Simon Horman <horms@verge.net.au> wrote:
>
> On Mon, Jun 17, 2019 at 07:00:06PM +0900, Magnus Damm wrote:
> > clocksource/drivers/sh_cmt: Minor DT compat string update
> >
> > [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0
> > [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support
> > [PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated
> >
> > Move over to new CMT1 bindings on r8a7740 and sh73a0 and get rid of old
> > stale stuff such as "cmt-48-gen2" while keeping "cmt-48" around but document
> > it as deprecated.
> >
> > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
>
> Hi Magnus,
>
> I think this series should include the Clocksource maintainers as
> recipients:
>
> Daniel Lezcano <daniel.lezcano@linaro.org>
> Thomas Gleixner <tglx@linutronix.de>
>
> And LKML for good measure.

Hi Simon,

I totally agree. I was suspecting some opinions might come out about
the CMT compat string changes in the DT binding document. I'll repost
this series and include the above folks/ML once the CMT compat string
changes in DT binding document are agreed.

Cheers,

/ magnus

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

* Re: [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update
  2019-06-18 12:14   ` Magnus Damm
@ 2019-06-18 12:24     ` Simon Horman
  0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2019-06-18 12:24 UTC (permalink / raw)
  To: Magnus Damm; +Cc: Linux-Renesas

On Tue, Jun 18, 2019 at 09:14:51PM +0900, Magnus Damm wrote:
> On Tue, Jun 18, 2019 at 7:31 PM Simon Horman <horms@verge.net.au> wrote:
> >
> > On Mon, Jun 17, 2019 at 07:00:06PM +0900, Magnus Damm wrote:
> > > clocksource/drivers/sh_cmt: Minor DT compat string update
> > >
> > > [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0
> > > [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support
> > > [PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated
> > >
> > > Move over to new CMT1 bindings on r8a7740 and sh73a0 and get rid of old
> > > stale stuff such as "cmt-48-gen2" while keeping "cmt-48" around but document
> > > it as deprecated.
> > >
> > > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
> >
> >
> > Hi Magnus,
> >
> > I think this series should include the Clocksource maintainers as
> > recipients:
> >
> > Daniel Lezcano <daniel.lezcano@linaro.org>
> > Thomas Gleixner <tglx@linutronix.de>
> >
> > And LKML for good measure.
> 
> Hi Simon,
> 
> I totally agree. I was suspecting some opinions might come out about
> the CMT compat string changes in the DT binding document. I'll repost
> this series and include the above folks/ML once the CMT compat string
> changes in DT binding document are agreed.

Great, thanks!

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

* Re: [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support
  2019-06-17 10:00 ` [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support Magnus Damm
@ 2019-06-18 14:01   ` Geert Uytterhoeven
  2019-06-18 14:54     ` Magnus Damm
  0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2019-06-18 14:01 UTC (permalink / raw)
  To: Magnus Damm; +Cc: Linux-Renesas

Hi Magnus,

On Mon, Jun 17, 2019 at 11:59 AM Magnus Damm <magnus.damm@gmail.com> wrote:
> From: Magnus Damm <damm+renesas@opensource.se>
>
> Since late 2017 the DT compat string "renesas,cmt-48-gen2" has not been in
> use in the upstream kernel. SoC-specific strings and the fallback string
> "rcar-gen2-cmt1" are now used in the DTSI instead.

Not really: since v4.16, which was released on Apr 1, 2018, i.e. after v4.14,
the base for the latest LTSI kernel.

Note that the removal commits were backported to v4.14-ltsi, but not to
v4.14.y.

> Remove "renesas,cmt-48-gen2" from the CMT driver.
>
> Signed-off-by: Magnus Damm <damm+renesas@opensource.se>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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 Torvalds

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

* Re: [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support
  2019-06-18 14:01   ` Geert Uytterhoeven
@ 2019-06-18 14:54     ` Magnus Damm
  0 siblings, 0 replies; 9+ messages in thread
From: Magnus Damm @ 2019-06-18 14:54 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux-Renesas

Hi Geert,

On Tue, Jun 18, 2019 at 11:01 PM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Magnus,
>
> On Mon, Jun 17, 2019 at 11:59 AM Magnus Damm <magnus.damm@gmail.com> wrote:
> > From: Magnus Damm <damm+renesas@opensource.se>
> >
> > Since late 2017 the DT compat string "renesas,cmt-48-gen2" has not been in
> > use in the upstream kernel. SoC-specific strings and the fallback string
> > "rcar-gen2-cmt1" are now used in the DTSI instead.
>
> Not really: since v4.16, which was released on Apr 1, 2018, i.e. after v4.14,
> the base for the latest LTSI kernel.
>
> Note that the removal commits were backported to v4.14-ltsi, but not to
> v4.14.y.

You are right. I was looking at the commit date in git of:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=98b6b8b493a99d828e6665e6e67d6ca077c1aee0

Actually the first version of the series  "[PATCH 00/08] clocksource:
sh_cmt: DT binding rework" was posted in mid-2015, but I guess I lost
interest at some point. =)

Thanks for your help!

/ magnus

> > Remove "renesas,cmt-48-gen2" from the CMT driver.
> >
> > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> 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 Torvalds

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

end of thread, other threads:[~2019-06-18 14:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 10:00 [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Magnus Damm
2019-06-17 10:00 ` [PATCH 1/3] clocksource/drivers/sh_cmt: SoC-specific match for CMT1 on r8a7740 and sh73a0 Magnus Damm
2019-06-17 10:00 ` [PATCH 2/3] clocksource/drivers/sh_cmt: Remove "cmt-48-gen2" support Magnus Damm
2019-06-18 14:01   ` Geert Uytterhoeven
2019-06-18 14:54     ` Magnus Damm
2019-06-17 10:00 ` [PATCH 3/3] clocksource/drivers/sh_cmt: Document "cmt-48" as deprecated Magnus Damm
2019-06-18 10:31 ` [PATCH 0/3] clocksource/drivers/sh_cmt: Minor DT compat string update Simon Horman
2019-06-18 12:14   ` Magnus Damm
2019-06-18 12:24     ` Simon Horman

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).