All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/6] clk: emev2: Add support for emev2 SMU clocks with DT
Date: Tue, 01 Oct 2013 12:27:51 +0000	[thread overview]
Message-ID: <690317658.gaTDz3TliP@avalon> (raw)
In-Reply-To: <CANqRtoRD35Ei31PK8a_TOp=2uiYPCoaJuDb6tyZtQL8s0PavNw@mail.gmail.com>

Hi Yoshii-san,

Thank you for the patch.

(CC'ing LAMK as a generic CCF question follows)

On Tuesday 01 October 2013 18:15:26 Magnus Damm wrote:
> On Tue, Sep 24, 2013 at 1:15 PM,  <takasi-y@ops.dti.ne.jp> wrote:
> > Common clock framework version of emev2 clock support.
> > smu_clkdiv and smu_gclk are handled.
> > So far, reparent is not implemented, and is fixed to index #0.
> > SMU and small numbers of clocks are described in emev2.dtsi.
> > 
> > That function and numbers of clocks are equivalent to current
> > sh-clkfwk version. It is just enough to run kzm9d-reference.
> > 
> > Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
> > ---
> > 
> >  arch/arm/boot/dts/emev2.dtsi     |  84 +++++++++++++++++++++++++++++++
> >  drivers/clk/Makefile             |   2 +
> >  drivers/clk/shmobile/Makefile    |   5 ++
> >  drivers/clk/shmobile/clk-emev2.c | 104 ++++++++++++++++++++++++++++++++++
> >  4 files changed, 195 insertions(+)
> >  create mode 100644 drivers/clk/shmobile/Makefile
> >  create mode 100644 drivers/clk/shmobile/clk-emev2.c
> 
> Hi Yoshii-san,
> 
> Thanks for your efforts on this. I'm very pleased to see that you describe
> the clock topology using DT.

What is the generally accepted practice when an IP core provides a large 
number of clocks, with either one register or one register bit dedicated to 
each clock ? Should each clock be described as one DT node, or should the IP 
core be described by a single DT node ?

I also see both platforms using CLK_OF_DECLARE and platforms calling a clock 
init function provided by drivers/clk/<platform>.c in the SoC setup code in 
arch/arm/. What is the preferred practice there ?

> In general I think your patch looks fine, but I have some comment related to
> the multiplatform integration, please see below.
> 
> > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > index 7b11106..3e64ac4 100644
> > --- a/drivers/clk/Makefile
> > +++ b/drivers/clk/Makefile
> > @@ -32,6 +32,8 @@ obj-$(CONFIG_ARCH_VT8500)     += clk-vt8500.o
> > 
> >  obj-$(CONFIG_ARCH_ZYNQ)                += zynq/
> >  obj-$(CONFIG_ARCH_TEGRA)       += tegra/
> >  obj-$(CONFIG_PLAT_SAMSUNG)     += samsung/
> > 
> > +obj-$(CONFIG_ARCH_SHMOBILE)    += shmobile/
> > +obj-$(CONFIG_ARCH_SHMOBILE_MULTI)      += shmobile/
> 
> Here I believe it is enough that you only use
> CONFIG_ARCH_SHMOBILE_MULTI. Building common clocks to coexist with the
> old legacy board code does not make any sense IMO. If you think it
> makes sense for some reason, please explain why. =)
> 
> > diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile
> > new file mode 100644
> > index 0000000..6a26eb6
> > --- /dev/null
> > +++ b/drivers/clk/shmobile/Makefile
> > @@ -0,0 +1,5 @@
> > +ifeq ($(CONFIG_COMMON_CLK), y)
> > +obj-$(CONFIG_ARCH_EMEV2)       += clk-emev2.o
> > +endif
> 
> I don't think you would need the above ifeq/endif wrapper if you only
> used CONFIG_ARCH_SHMOBILE_MULTI above.
> 
> Apart from that it looks good to me. And, yes, I have tested this on
> my KZM9D board together with multiplatform and it works very well!

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: takasi-y@ops.dti.ne.jp, SH-Linux <linux-sh@vger.kernel.org>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>,
	devicetree@vger.kernel.org, linux-serial@vger.kernel.org,
	Simon Horman <horms@verge.net.au>,
	Paul Mundt <lethal@linux-sh.org>,
	Mike Turquette <mturquette@linaro.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/6] clk: emev2: Add support for emev2 SMU clocks with DT
Date: Tue, 01 Oct 2013 14:27:51 +0200	[thread overview]
Message-ID: <690317658.gaTDz3TliP@avalon> (raw)
In-Reply-To: <CANqRtoRD35Ei31PK8a_TOp=2uiYPCoaJuDb6tyZtQL8s0PavNw@mail.gmail.com>

Hi Yoshii-san,

Thank you for the patch.

(CC'ing LAMK as a generic CCF question follows)

On Tuesday 01 October 2013 18:15:26 Magnus Damm wrote:
> On Tue, Sep 24, 2013 at 1:15 PM,  <takasi-y@ops.dti.ne.jp> wrote:
> > Common clock framework version of emev2 clock support.
> > smu_clkdiv and smu_gclk are handled.
> > So far, reparent is not implemented, and is fixed to index #0.
> > SMU and small numbers of clocks are described in emev2.dtsi.
> > 
> > That function and numbers of clocks are equivalent to current
> > sh-clkfwk version. It is just enough to run kzm9d-reference.
> > 
> > Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
> > ---
> > 
> >  arch/arm/boot/dts/emev2.dtsi     |  84 +++++++++++++++++++++++++++++++
> >  drivers/clk/Makefile             |   2 +
> >  drivers/clk/shmobile/Makefile    |   5 ++
> >  drivers/clk/shmobile/clk-emev2.c | 104 ++++++++++++++++++++++++++++++++++
> >  4 files changed, 195 insertions(+)
> >  create mode 100644 drivers/clk/shmobile/Makefile
> >  create mode 100644 drivers/clk/shmobile/clk-emev2.c
> 
> Hi Yoshii-san,
> 
> Thanks for your efforts on this. I'm very pleased to see that you describe
> the clock topology using DT.

What is the generally accepted practice when an IP core provides a large 
number of clocks, with either one register or one register bit dedicated to 
each clock ? Should each clock be described as one DT node, or should the IP 
core be described by a single DT node ?

I also see both platforms using CLK_OF_DECLARE and platforms calling a clock 
init function provided by drivers/clk/<platform>.c in the SoC setup code in 
arch/arm/. What is the preferred practice there ?

> In general I think your patch looks fine, but I have some comment related to
> the multiplatform integration, please see below.
> 
> > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > index 7b11106..3e64ac4 100644
> > --- a/drivers/clk/Makefile
> > +++ b/drivers/clk/Makefile
> > @@ -32,6 +32,8 @@ obj-$(CONFIG_ARCH_VT8500)     += clk-vt8500.o
> > 
> >  obj-$(CONFIG_ARCH_ZYNQ)                += zynq/
> >  obj-$(CONFIG_ARCH_TEGRA)       += tegra/
> >  obj-$(CONFIG_PLAT_SAMSUNG)     += samsung/
> > 
> > +obj-$(CONFIG_ARCH_SHMOBILE)    += shmobile/
> > +obj-$(CONFIG_ARCH_SHMOBILE_MULTI)      += shmobile/
> 
> Here I believe it is enough that you only use
> CONFIG_ARCH_SHMOBILE_MULTI. Building common clocks to coexist with the
> old legacy board code does not make any sense IMO. If you think it
> makes sense for some reason, please explain why. =)
> 
> > diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile
> > new file mode 100644
> > index 0000000..6a26eb6
> > --- /dev/null
> > +++ b/drivers/clk/shmobile/Makefile
> > @@ -0,0 +1,5 @@
> > +ifeq ($(CONFIG_COMMON_CLK), y)
> > +obj-$(CONFIG_ARCH_EMEV2)       += clk-emev2.o
> > +endif
> 
> I don't think you would need the above ifeq/endif wrapper if you only
> used CONFIG_ARCH_SHMOBILE_MULTI above.
> 
> Apart from that it looks good to me. And, yes, I have tested this on
> my KZM9D board together with multiplatform and it works very well!

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] clk: emev2: Add support for emev2 SMU clocks with DT
Date: Tue, 01 Oct 2013 14:27:51 +0200	[thread overview]
Message-ID: <690317658.gaTDz3TliP@avalon> (raw)
In-Reply-To: <CANqRtoRD35Ei31PK8a_TOp=2uiYPCoaJuDb6tyZtQL8s0PavNw@mail.gmail.com>

Hi Yoshii-san,

Thank you for the patch.

(CC'ing LAMK as a generic CCF question follows)

On Tuesday 01 October 2013 18:15:26 Magnus Damm wrote:
> On Tue, Sep 24, 2013 at 1:15 PM,  <takasi-y@ops.dti.ne.jp> wrote:
> > Common clock framework version of emev2 clock support.
> > smu_clkdiv and smu_gclk are handled.
> > So far, reparent is not implemented, and is fixed to index #0.
> > SMU and small numbers of clocks are described in emev2.dtsi.
> > 
> > That function and numbers of clocks are equivalent to current
> > sh-clkfwk version. It is just enough to run kzm9d-reference.
> > 
> > Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
> > ---
> > 
> >  arch/arm/boot/dts/emev2.dtsi     |  84 +++++++++++++++++++++++++++++++
> >  drivers/clk/Makefile             |   2 +
> >  drivers/clk/shmobile/Makefile    |   5 ++
> >  drivers/clk/shmobile/clk-emev2.c | 104 ++++++++++++++++++++++++++++++++++
> >  4 files changed, 195 insertions(+)
> >  create mode 100644 drivers/clk/shmobile/Makefile
> >  create mode 100644 drivers/clk/shmobile/clk-emev2.c
> 
> Hi Yoshii-san,
> 
> Thanks for your efforts on this. I'm very pleased to see that you describe
> the clock topology using DT.

What is the generally accepted practice when an IP core provides a large 
number of clocks, with either one register or one register bit dedicated to 
each clock ? Should each clock be described as one DT node, or should the IP 
core be described by a single DT node ?

I also see both platforms using CLK_OF_DECLARE and platforms calling a clock 
init function provided by drivers/clk/<platform>.c in the SoC setup code in 
arch/arm/. What is the preferred practice there ?

> In general I think your patch looks fine, but I have some comment related to
> the multiplatform integration, please see below.
> 
> > diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> > index 7b11106..3e64ac4 100644
> > --- a/drivers/clk/Makefile
> > +++ b/drivers/clk/Makefile
> > @@ -32,6 +32,8 @@ obj-$(CONFIG_ARCH_VT8500)     += clk-vt8500.o
> > 
> >  obj-$(CONFIG_ARCH_ZYNQ)                += zynq/
> >  obj-$(CONFIG_ARCH_TEGRA)       += tegra/
> >  obj-$(CONFIG_PLAT_SAMSUNG)     += samsung/
> > 
> > +obj-$(CONFIG_ARCH_SHMOBILE)    += shmobile/
> > +obj-$(CONFIG_ARCH_SHMOBILE_MULTI)      += shmobile/
> 
> Here I believe it is enough that you only use
> CONFIG_ARCH_SHMOBILE_MULTI. Building common clocks to coexist with the
> old legacy board code does not make any sense IMO. If you think it
> makes sense for some reason, please explain why. =)
> 
> > diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile
> > new file mode 100644
> > index 0000000..6a26eb6
> > --- /dev/null
> > +++ b/drivers/clk/shmobile/Makefile
> > @@ -0,0 +1,5 @@
> > +ifeq ($(CONFIG_COMMON_CLK), y)
> > +obj-$(CONFIG_ARCH_EMEV2)       += clk-emev2.o
> > +endif
> 
> I don't think you would need the above ifeq/endif wrapper if you only
> used CONFIG_ARCH_SHMOBILE_MULTI above.
> 
> Apart from that it looks good to me. And, yes, I have tested this on
> my KZM9D board together with multiplatform and it works very well!

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2013-10-01 12:27 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-24  4:05 [PATCH 0/6] ARM: shmobile: kzm9d-reference: migrate to common clock framework with DT Takashi Yoshii
2013-09-24  4:05 ` Takashi Yoshii
2013-09-24  4:09 ` [PATCH 1/6] clocksource: em_sti: convert to clk_prepare/unprepare takasi-y
2013-09-24  4:09   ` takasi-y
2013-09-24  4:42   ` Simon Horman
2013-09-24  4:42     ` Simon Horman
2013-09-26 10:18     ` Daniel Lezcano
2013-09-26 10:18       ` Daniel Lezcano
     [not found]   ` <20130924130924.61d4ecedf3d4fca5952d55fc-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-09-30 15:25     ` Laurent Pinchart
2013-09-30 15:25       ` Laurent Pinchart
2013-09-30 15:25       ` Laurent Pinchart
     [not found]       ` <52440A07.4050101-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-10-03  2:30         ` Simon Horman
2013-10-03  2:30           ` Simon Horman
2013-10-03  2:30           ` Simon Horman
2013-10-01  9:05     ` Magnus Damm
2013-10-01  9:05       ` Magnus Damm
2013-10-01  9:05       ` Magnus Damm
2013-09-24  4:10 ` [PATCH 2/6] serial8250-em: " takasi-y
2013-09-24  4:10   ` takasi-y
2013-09-24  4:44   ` Simon Horman
2013-09-24  4:44     ` Simon Horman
2013-09-24 13:41     ` Greg Kroah-Hartman
2013-09-24 13:41       ` Greg Kroah-Hartman
2013-09-30 15:25   ` Laurent Pinchart
2013-09-30 15:25     ` Laurent Pinchart
     [not found]     ` <20130924134113.GA7246-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-10-03  2:30       ` Simon Horman
2013-10-03  2:30         ` Simon Horman
2013-10-03  2:30         ` Simon Horman
     [not found]   ` <20130924131039.3c871cad7acb2a068a988d0f-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-10-01  9:07     ` Magnus Damm
2013-10-01  9:07       ` Magnus Damm
2013-10-01  9:07       ` Magnus Damm
2013-09-24  4:12 ` [PATCH 3/6] sh: clkfwk: Select sh-/common- clkfwk alternatively takasi-y
2013-09-24  4:12   ` takasi-y
2013-09-30 18:40   ` Laurent Pinchart
2013-09-30 18:40     ` Laurent Pinchart
2013-10-04  5:25     ` takasi-y
2013-10-04  5:25       ` takasi-y
2013-10-04  5:25       ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw
2013-10-01  9:30   ` Magnus Damm
2013-10-01  9:30     ` Magnus Damm
2013-09-24  4:13 ` [PATCH 4/6] ARM: shmobile: emev2: Define SMU clock DT bindings takasi-y
2013-09-24  4:13   ` takasi-y
     [not found]   ` <20130924131331.0e9a5f830f531655b2ea0ebe-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-09-24  4:52     ` Simon Horman
2013-09-24  4:52       ` Simon Horman
2013-09-24  4:52       ` Simon Horman
2013-09-24  9:00       ` takashi.yoshii.zj
2013-09-24  9:00         ` takashi.yoshii.zj
     [not found]       ` <20130924045215.GE3619-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
2013-10-01 11:36         ` Laurent Pinchart
2013-10-01 11:36           ` Laurent Pinchart
2013-10-01 11:36           ` Laurent Pinchart
2013-10-02  1:28           ` Simon Horman
2013-10-02  1:28             ` Simon Horman
2013-10-06 17:16           ` Takashi YOSHII
2013-10-06 17:16             ` Takashi YOSHII
2013-10-06 17:16             ` Takashi YOSHII
2013-09-24  4:56 ` [PATCH 0/6] ARM: shmobile: kzm9d-reference: migrate to common clock framework with DT Simon Horman
2013-09-24  4:56   ` Simon Horman
     [not found] ` <52410F86.4040301-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2013-09-24  4:15   ` [PATCH 5/6] clk: emev2: Add support for emev2 SMU clocks " takasi-y
2013-09-24  4:15     ` takasi-y
2013-09-24  4:15     ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw
     [not found]     ` <20130924131542.f865fad4dec98e024c0d4676-nDL5PR/MsHhHfZP73Gtkiw@public.gmane.org>
2013-10-01  9:15       ` Magnus Damm
2013-10-01  9:15         ` Magnus Damm
2013-10-01  9:15         ` Magnus Damm
2013-10-01 12:27         ` Laurent Pinchart [this message]
2013-10-01 12:27           ` Laurent Pinchart
2013-10-01 12:27           ` Laurent Pinchart
     [not found]         ` <CANqRtoRD35Ei31PK8a_TOp=2uiYPCoaJuDb6tyZtQL8s0PavNw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-10-04  5:44           ` takasi-y
2013-10-04  5:44             ` takasi-y
2013-10-04  5:44             ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw
2013-09-24  4:17   ` [PATCH 6/6] ARM: shmobile: kzm9d-reference: Use common clock framework takasi-y
2013-09-24  4:17     ` takasi-y
2013-09-24  4:17     ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw
2013-09-24  4:55     ` Simon Horman
2013-09-24  4:55       ` Simon Horman
2013-10-01  9:23     ` Magnus Damm
2013-10-01  9:23       ` Magnus Damm
2013-09-25  7:17   ` [PATCH 0/6] ARM: shmobile: kzm9d-reference: migrate to common clock framework with DT Kuninori Morimoto
2013-09-25  7:17     ` Kuninori Morimoto
2013-09-25  7:17     ` Kuninori Morimoto
     [not found]     ` <87siwtl69z.wl%kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2013-10-04  1:12       ` takasi-y
2013-10-04  1:12         ` takasi-y
2013-10-04  1:12         ` takasi-y-nDL5PR/MsHhHfZP73Gtkiw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=690317658.gaTDz3TliP@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.