All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Burton <paul.burton@imgtec.com>
To: Michael Turquette <mturquette@linaro.org>
Cc: <linux-mips@linux-mips.org>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	"Mark Rutland" <mark.rutland@arm.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Rob Herring <robh+dt@kernel.org>,
	Stephen Boyd <sboyd@codeaurora.org>, <devicetree@vger.kernel.org>,
	<linux-clk@vger.kernel.org>
Subject: Re: [PATCH v4 26/37] MIPS,clk: migrate JZ4740 to common clock framework
Date: Sun, 24 May 2015 16:01:04 +0100	[thread overview]
Message-ID: <20150524150104.GP13811@NP-P-BURTON> (raw)
In-Reply-To: <20150513025204.20636.10155@quantum>

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

On Tue, May 12, 2015 at 07:52:04PM -0700, Michael Turquette wrote:
> Hi Paul,
> 
> Quoting Paul Burton (2015-04-24 06:17:26)
> > +static void __init jz4740_cgu_init(struct device_node *np)
> > +{
> > +       int retval;
> > +
> > +       cgu = ingenic_cgu_new(jz4740_cgu_clocks,
> > +                             ARRAY_SIZE(jz4740_cgu_clocks), np);
> > +       if (!cgu) {
> > +               pr_err("%s: failed to initialise CGU\n", __func__);
> > +               return;
> > +       }
> > +
> > +       retval = ingenic_cgu_register_clocks(cgu);
> > +       if (retval)
> > +               pr_err("%s: failed to register CGU Clocks\n", __func__);
> > +}
> > +CLK_OF_DECLARE(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);
> > -- 
> > 2.3.5
> > 
> 
> Patch looks good to me, but I have one question. Is it possible for you
> to have a proper platform_device for the cgu instead of relying on
> CLK_OF_DECLARE?
> 
> For an example of a clock driver that does this, check out the bottom of
> drivers/clk/qcom/gcc-msm8660.c.
> 
> Regards,
> Mike

Hi Mike,

Thanks for your review. I gave that a try but unfortunately it didn't
work out because the code in plat_time_init (arch/mips/jz4740/time.c)
needs to obtain the rate of the ext clock at a point before any
initcalls have been run, and therefore before the platform device has
been registered.

Thanks,
    Paul

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Paul Burton <paul.burton@imgtec.com>
To: Michael Turquette <mturquette@linaro.org>
Cc: linux-mips@linux-mips.org,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Mark Rutland <mark.rutland@arm.com>,
	Pawel Moll <pawel.moll@arm.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	Rob Herring <robh+dt@kernel.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	devicetree@vger.kernel.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v4 26/37] MIPS,clk: migrate JZ4740 to common clock framework
Date: Sun, 24 May 2015 16:01:04 +0100	[thread overview]
Message-ID: <20150524150104.GP13811@NP-P-BURTON> (raw)
Message-ID: <20150524150104.M_t3vC8etEA1B-KGKN2DWZ-9SLFqa_vo7SOTuQrn4ZE@z> (raw)
In-Reply-To: <20150513025204.20636.10155@quantum>

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

On Tue, May 12, 2015 at 07:52:04PM -0700, Michael Turquette wrote:
> Hi Paul,
> 
> Quoting Paul Burton (2015-04-24 06:17:26)
> > +static void __init jz4740_cgu_init(struct device_node *np)
> > +{
> > +       int retval;
> > +
> > +       cgu = ingenic_cgu_new(jz4740_cgu_clocks,
> > +                             ARRAY_SIZE(jz4740_cgu_clocks), np);
> > +       if (!cgu) {
> > +               pr_err("%s: failed to initialise CGU\n", __func__);
> > +               return;
> > +       }
> > +
> > +       retval = ingenic_cgu_register_clocks(cgu);
> > +       if (retval)
> > +               pr_err("%s: failed to register CGU Clocks\n", __func__);
> > +}
> > +CLK_OF_DECLARE(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);
> > -- 
> > 2.3.5
> > 
> 
> Patch looks good to me, but I have one question. Is it possible for you
> to have a proper platform_device for the cgu instead of relying on
> CLK_OF_DECLARE?
> 
> For an example of a clock driver that does this, check out the bottom of
> drivers/clk/qcom/gcc-msm8660.c.
> 
> Regards,
> Mike

Hi Mike,

Thanks for your review. I gave that a try but unfortunately it didn't
work out because the code in plat_time_init (arch/mips/jz4740/time.c)
needs to obtain the rate of the ext clock at a point before any
initcalls have been run, and therefore before the platform device has
been registered.

Thanks,
    Paul

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Paul Burton <paul.burton-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org>
To: Michael Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Ralf Baechle <ralf-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v4 26/37] MIPS,clk: migrate JZ4740 to common clock framework
Date: Sun, 24 May 2015 16:01:04 +0100	[thread overview]
Message-ID: <20150524150104.GP13811@NP-P-BURTON> (raw)
In-Reply-To: <20150513025204.20636.10155@quantum>

[-- Attachment #1: Type: text/plain, Size: 1412 bytes --]

On Tue, May 12, 2015 at 07:52:04PM -0700, Michael Turquette wrote:
> Hi Paul,
> 
> Quoting Paul Burton (2015-04-24 06:17:26)
> > +static void __init jz4740_cgu_init(struct device_node *np)
> > +{
> > +       int retval;
> > +
> > +       cgu = ingenic_cgu_new(jz4740_cgu_clocks,
> > +                             ARRAY_SIZE(jz4740_cgu_clocks), np);
> > +       if (!cgu) {
> > +               pr_err("%s: failed to initialise CGU\n", __func__);
> > +               return;
> > +       }
> > +
> > +       retval = ingenic_cgu_register_clocks(cgu);
> > +       if (retval)
> > +               pr_err("%s: failed to register CGU Clocks\n", __func__);
> > +}
> > +CLK_OF_DECLARE(jz4740_cgu, "ingenic,jz4740-cgu", jz4740_cgu_init);
> > -- 
> > 2.3.5
> > 
> 
> Patch looks good to me, but I have one question. Is it possible for you
> to have a proper platform_device for the cgu instead of relying on
> CLK_OF_DECLARE?
> 
> For an example of a clock driver that does this, check out the bottom of
> drivers/clk/qcom/gcc-msm8660.c.
> 
> Regards,
> Mike

Hi Mike,

Thanks for your review. I gave that a try but unfortunately it didn't
work out because the code in plat_time_init (arch/mips/jz4740/time.c)
needs to obtain the rate of the ext clock at a point before any
initcalls have been run, and therefore before the platform device has
been registered.

Thanks,
    Paul

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-05-24 15:01 UTC|newest]

Thread overview: 119+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 13:17 [PATCH v4 00/37] JZ4780 & CI20 support Paul Burton
2015-04-24 13:17 ` Paul Burton
2015-04-24 13:17 ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 01/37] devicetree/bindings: add Ingenic Semiconductor vendor prefix Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 02/37] devicetree/bindings: add Qi Hardware " Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 03/37] MIPS: JZ4740: introduce CONFIG_MACH_INGENIC Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 04/37] MIPS: ingenic: add newer vendor IDs Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 05/37] MIPS: JZ4740: require & include DT Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 06/37] MIPS: irq_cpu: declare irqchip table entry Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 07/37] MIPS: JZ4740: probe CPU interrupt controller via DT Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 08/37] MIPS: JZ4740: use generic plat_irq_dispatch Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 09/37] MIPS: JZ4740: move arch_init_irq out of arch/mips/jz4740/irq.c Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 10/37] devicetree: document Ingenic SoC interrupt controller binding Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 11/37] MIPS: JZ4740: probe interrupt controller via DT Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 12/37] MIPS: JZ4740: parse SoC interrupt controller parent IRQ from DT Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 13/37] MIPS: JZ4740: register an irq_domain for the interrupt controller Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-28 10:46   ` James Hogan
2015-04-28 10:46     ` James Hogan
2015-04-24 13:17 ` [PATCH v4 14/37] MIPS: JZ4740: drop intc debugfs code Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-28  7:20   ` Lars-Peter Clausen
2015-04-24 13:17 ` [PATCH v4 15/37] MIPS: JZ4740: remove jz_intc_base global Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-27 22:35   ` James Hogan
2015-04-27 22:35     ` James Hogan
2015-04-24 13:17 ` [PATCH v4 16/37] MIPS: JZ4740: support >32 interrupts Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 17/37] MIPS: JZ4740: define IRQ numbers based on number of intc IRQs Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 18/37] MIPS: JZ4740: read intc base address from DT Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 19/37] MIPS: JZ4740: avoid JZ4740-specific naming Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 20/37] MIPS: JZ4740: support newer SoC interrupt controllers Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-28 11:03   ` James Hogan
2015-04-28 11:03     ` James Hogan
2015-04-24 13:17 ` [PATCH v4 21/37] irqchip: move Ingenic SoC intc driver to drivers/irqchip Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 22/37] MIPS: JZ4740: call jz4740_clock_init earlier Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 23/37] MIPS: JZ4740: replace use of jz4740_clock_bdata Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 24/37] devicetree: add Ingenic CGU binding documentation Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 25/37] clk: ingenic: add driver for Ingenic SoC CGU clocks Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-27 23:00   ` James Hogan
2015-04-27 23:00     ` James Hogan
2015-04-28 10:17   ` James Hogan
2015-04-28 10:17     ` James Hogan
2015-05-20 23:16   ` Stephen Boyd
2015-04-24 13:17 ` [PATCH v4 26/37] MIPS,clk: migrate JZ4740 to common clock framework Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-05-13  2:52   ` Michael Turquette
2015-05-13  2:52     ` Michael Turquette
2015-05-13  2:52     ` Michael Turquette
2015-05-13  2:52     ` Michael Turquette
2015-05-24 15:01     ` Paul Burton [this message]
2015-05-24 15:01       ` Paul Burton
2015-05-24 15:01       ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 27/37] MIPS,clk: move jz4740_clock_set_wait_mode to jz4740-cgu Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-05-13  2:56   ` [PATCH v4 27/37] MIPS, clk: " Michael Turquette
2015-05-13  2:56     ` Michael Turquette
2015-05-13  2:56     ` Michael Turquette
2015-04-24 13:17 ` [PATCH v4 28/37] MIPS,clk: move jz4740 UDC auto suspend functions " Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-05-13  3:06   ` [PATCH v4 28/37] MIPS, clk: " Michael Turquette
2015-05-13  3:06     ` Michael Turquette
2015-05-24 15:02     ` Paul Burton
2015-05-24 15:02       ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 29/37] MIPS,clk: move jz4740 clock suspend,resume " Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 30/37] clk: ingenic: add JZ4780 CGU support Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-05-20 23:07   ` Stephen Boyd
2015-04-24 13:17 ` [PATCH v4 31/37] MIPS: JZ4740: remove clock.h Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 32/37] MIPS: JZ4740: only detect RAM size if not specified in DT Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 33/37] devicetree: document Ingenic SoC UART binding Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 34/37] serial: 8250_ingenic: support for Ingenic SoC UARTs Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 35/37] MIPS: JZ4740: use Ingenic SoC UART driver Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17 ` [PATCH v4 36/37] MIPS: ingenic: initial JZ4780 support Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-28 10:36   ` James Hogan
2015-04-28 10:36     ` James Hogan
2015-04-28 10:36     ` James Hogan
2015-04-24 13:17 ` [PATCH v4 37/37] MIPS: ingenic: initial MIPS Creator CI20 support Paul Burton
2015-04-24 13:17   ` Paul Burton
2015-04-24 13:17   ` Paul Burton

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=20150524150104.GP13811@NP-P-BURTON \
    --to=paul.burton@imgtec.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=lars@metafoo.de \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@linaro.org \
    --cc=pawel.moll@arm.com \
    --cc=ralf@linux-mips.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.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.