From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Mike Turquette <mturquette@baylibre.com>,
linux-clk <linux-clk@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 7/7] clk: sunxi: Add a simple gates driver
Date: Thu, 30 Jul 2015 12:17:23 +0200 [thread overview]
Message-ID: <20150730101723.GL2564@lukather> (raw)
In-Reply-To: <CAGb2v6517qCXmNkYihnfBmc5fL7bqTDOQwedNYjq+p2Mg45+gQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2375 bytes --]
On Thu, Jul 30, 2015 at 03:55:17PM +0800, Chen-Yu Tsai wrote:
> On Tue, Jul 28, 2015 at 4:26 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 07/26, Maxime Ripard wrote:
> >> diff --git a/drivers/clk/sunxi/clk-simple-gates.c b/drivers/clk/sunxi/clk-simple-gates.c
> >> new file mode 100644
> >> index 000000000000..1a3963a8a686
> >> --- /dev/null
> >> +++ b/drivers/clk/sunxi/clk-simple-gates.c
> >> @@ -0,0 +1,159 @@
> >> +/*
> >> + * Copyright 2015 Maxime Ripard
> >> + *
> >> + * Maxime Ripard <maxime.ripard@free-electrons.com>
> >> + *
> >> + * This program is free software; you can redistribute it and/or modify
> >> + * it under the terms of the GNU General Public License as published by
> >> + * the Free Software Foundation; either version 2 of the License, or
> >> + * (at your option) any later version.
> >> + *
> >> + * This program is distributed in the hope that it will be useful,
> >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> >> + * GNU General Public License for more details.
> >> + */
> >> +
>
> I'm guessing the following were copied from clk-sunxi.c.
>
> >> +#include <linux/clk-provider.h>
> >> +#include <linux/clkdev.h>
> >
> > Is this used?
>
> clk_register_clkdev() is not used in this file, so not needed.
>
> >> +#include <linux/of.h>
> >> +#include <linux/of_address.h>
> >> +#include <linux/reset-controller.h>
> >
> > Is this used?
>
> A remnant of the USB clocks, which has been moved to clk-usb.c.
>
> Not needed here nor in clk-sunxi.c.
>
> >> +#include <linux/spinlock.h>
> >> +#include <linux/log2.h>
> >
> > Is this used?
>
> This is only used for clock factor calculation. Not applicable in
> clk-simple-gates.c, so no.
You're right, we don't need any of these...
> >> +static DEFINE_SPINLOCK(gates_lock);
> >> +
> > [...]
> >> +
> >> +static const int sun4i_a10_ahb_critical_clocks[] __initdata = {
> >
> > Shouldn't it be __initconst ?
>
> Not sure why our critical clocks lists are __initdata...
Why shouldn't it be?
CLK_OF_DECLARE callbacks only run at of_clk_init time, which is way
before the init memory is discarded.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/7] clk: sunxi: Add a simple gates driver
Date: Thu, 30 Jul 2015 12:17:23 +0200 [thread overview]
Message-ID: <20150730101723.GL2564@lukather> (raw)
In-Reply-To: <CAGb2v6517qCXmNkYihnfBmc5fL7bqTDOQwedNYjq+p2Mg45+gQ@mail.gmail.com>
On Thu, Jul 30, 2015 at 03:55:17PM +0800, Chen-Yu Tsai wrote:
> On Tue, Jul 28, 2015 at 4:26 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> > On 07/26, Maxime Ripard wrote:
> >> diff --git a/drivers/clk/sunxi/clk-simple-gates.c b/drivers/clk/sunxi/clk-simple-gates.c
> >> new file mode 100644
> >> index 000000000000..1a3963a8a686
> >> --- /dev/null
> >> +++ b/drivers/clk/sunxi/clk-simple-gates.c
> >> @@ -0,0 +1,159 @@
> >> +/*
> >> + * Copyright 2015 Maxime Ripard
> >> + *
> >> + * Maxime Ripard <maxime.ripard@free-electrons.com>
> >> + *
> >> + * This program is free software; you can redistribute it and/or modify
> >> + * it under the terms of the GNU General Public License as published by
> >> + * the Free Software Foundation; either version 2 of the License, or
> >> + * (at your option) any later version.
> >> + *
> >> + * This program is distributed in the hope that it will be useful,
> >> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> >> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> >> + * GNU General Public License for more details.
> >> + */
> >> +
>
> I'm guessing the following were copied from clk-sunxi.c.
>
> >> +#include <linux/clk-provider.h>
> >> +#include <linux/clkdev.h>
> >
> > Is this used?
>
> clk_register_clkdev() is not used in this file, so not needed.
>
> >> +#include <linux/of.h>
> >> +#include <linux/of_address.h>
> >> +#include <linux/reset-controller.h>
> >
> > Is this used?
>
> A remnant of the USB clocks, which has been moved to clk-usb.c.
>
> Not needed here nor in clk-sunxi.c.
>
> >> +#include <linux/spinlock.h>
> >> +#include <linux/log2.h>
> >
> > Is this used?
>
> This is only used for clock factor calculation. Not applicable in
> clk-simple-gates.c, so no.
You're right, we don't need any of these...
> >> +static DEFINE_SPINLOCK(gates_lock);
> >> +
> > [...]
> >> +
> >> +static const int sun4i_a10_ahb_critical_clocks[] __initdata = {
> >
> > Shouldn't it be __initconst ?
>
> Not sure why our critical clocks lists are __initdata...
Why shouldn't it be?
CLK_OF_DECLARE callbacks only run at of_clk_init time, which is way
before the init memory is discarded.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150730/f0ffccd0/attachment-0001.sig>
next prev parent reply other threads:[~2015-07-30 10:17 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-26 21:14 [PATCH 0/7] ARM: sunxi: Switch to clock indices Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-26 21:14 ` [PATCH 1/7] ARM: sun4i: Add " Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-26 21:14 ` [PATCH 2/7] ARM: sun5i: " Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-26 21:14 ` [PATCH 3/7] ARM: sun6i: " Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-26 21:14 ` [PATCH 4/7] ARM: sun7i: " Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-26 21:14 ` [PATCH 5/7] ARM: sun8i: " Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-26 21:14 ` [PATCH 6/7] ARM: sun9i: " Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-30 7:44 ` Chen-Yu Tsai
2015-07-30 7:44 ` Chen-Yu Tsai
2015-07-30 10:12 ` Maxime Ripard
2015-07-30 10:12 ` Maxime Ripard
2015-07-26 21:14 ` [PATCH 7/7] clk: sunxi: Add a simple gates driver Maxime Ripard
2015-07-26 21:14 ` Maxime Ripard
2015-07-27 20:26 ` Stephen Boyd
2015-07-27 20:26 ` Stephen Boyd
2015-07-30 7:55 ` Chen-Yu Tsai
2015-07-30 7:55 ` Chen-Yu Tsai
2015-07-30 10:17 ` Maxime Ripard [this message]
2015-07-30 10:17 ` Maxime Ripard
2015-07-30 14:34 ` Chen-Yu Tsai
2015-07-30 14:34 ` Chen-Yu Tsai
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=20150730101723.GL2564@lukather \
--to=maxime.ripard@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
--cc=wens@csie.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.