Linux M68K Architecture development
 help / color / mirror / Atom feed
From: Greg Ungerer <gerg@linux-m68k.org>
To: Arnd Bergmann <arnd@kernel.org>, linux-clk@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Dmitry Osipenko <digetx@gmail.com>,
	Florian Fainelli <florian@openwrt.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	John Crispin <john@phrozen.org>,
	Jonas Gorski <jonas.gorski@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Russell King <linux@armlinux.org.uk>,
	Stephen Boyd <sboyd@kernel.org>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org
Subject: Re: [PATCH 4/7] m68k: coldfire: use clkdev_lookup on most coldfire
Date: Tue, 1 Jun 2021 21:54:17 +1000	[thread overview]
Message-ID: <a4547445-7892-d84a-95bd-b43a82103a12@linux-m68k.org> (raw)
In-Reply-To: <20210531184749.2475868-5-arnd@kernel.org>

Hi Arnd,

On 1/6/21 4:47 am, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Coldfire is now the only target that implements the clk_get()/clk_put()
> helpers itself rather than using the common implementation.
> 
> Most coldfire variants only have two distinct clocks and use the clk
> code purely for lookup. Change those over to use clkdev_lookup instead
> but leave the custom clk interface for those two clocks.
> 
> Also leave the four SoCs that have gated clocks.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   arch/m68k/Kconfig.cpu      |  4 ++++
>   arch/m68k/coldfire/clk.c   | 16 ++++++-------
>   arch/m68k/coldfire/m5206.c | 25 +++++++++------------
>   arch/m68k/coldfire/m523x.c | 42 ++++++++++++++--------------------
>   arch/m68k/coldfire/m5249.c | 33 ++++++++++++---------------
>   arch/m68k/coldfire/m525x.c | 33 ++++++++++++---------------
>   arch/m68k/coldfire/m5272.c | 35 ++++++++++++-----------------
>   arch/m68k/coldfire/m527x.c | 46 +++++++++++++++-----------------------
>   arch/m68k/coldfire/m528x.c | 42 ++++++++++++++--------------------
>   arch/m68k/coldfire/m5307.c | 27 ++++++++++------------
>   arch/m68k/coldfire/m5407.c | 25 +++++++++------------
>   arch/m68k/coldfire/m54xx.c | 33 ++++++++++++---------------
>   12 files changed, 154 insertions(+), 207 deletions(-)
> 

snip
   
> diff --git a/arch/m68k/coldfire/m527x.c b/arch/m68k/coldfire/m527x.c
> index cad462df6861..ff29c7a947e2 100644
> --- a/arch/m68k/coldfire/m527x.c
> +++ b/arch/m68k/coldfire/m527x.c
> @@ -13,6 +13,7 @@
>   
>   /***************************************************************************/
>   
> +#include <linux/clkdev.h>
>   #include <linux/kernel.h>
>   #include <linux/param.h>
>   #include <linux/init.h>
> @@ -27,33 +28,21 @@
>   
>   DEFINE_CLK(pll, "pll.0", MCF_CLK);
>   DEFINE_CLK(sys, "sys.0", MCF_BUSCLK);
> -DEFINE_CLK(mcfpit0, "mcfpit.0", MCF_CLK);
> -DEFINE_CLK(mcfpit1, "mcfpit.1", MCF_CLK);
> -DEFINE_CLK(mcfpit2, "mcfpit.2", MCF_CLK);
> -DEFINE_CLK(mcfpit3, "mcfpit.3", MCF_CLK);
> -DEFINE_CLK(mcfuart0, "mcfuart.0", MCF_BUSCLK);
> -DEFINE_CLK(mcfuart1, "mcfuart.1", MCF_BUSCLK);
> -DEFINE_CLK(mcfuart2, "mcfuart.2", MCF_BUSCLK);
> -DEFINE_CLK(mcfqspi0, "mcfqspi.0", MCF_BUSCLK);
> -DEFINE_CLK(fec0, "fec.0", MCF_BUSCLK);
> -DEFINE_CLK(fec1, "fec.1", MCF_BUSCLK);
> -DEFINE_CLK(mcfi2c0, "imx1-i2c.0", MCF_BUSCLK);
> -
> -struct clk *mcf_clks[] = {
> -	&clk_pll,
> -	&clk_sys,
> -	&clk_mcfpit0,
> -	&clk_mcfpit1,
> -	&clk_mcfpit2,
> -	&clk_mcfpit3,
> -	&clk_mcfuart0,
> -	&clk_mcfuart1,
> -	&clk_mcfuart2,
> -	&clk_mcfqspi0,
> -	&clk_fec0,
> -	&clk_fec1,
> -	&clk_mcfi2c0,
> -	NULL
> +
> +static struct clk_lookup m527x_clk_lookup[] = {
> +	CLKDEV_INIT(NULL, "pll.0", &clk_pll),
> +	CLKDEV_INIT(NULL, "sys.0", &clk_sys),
> +	CLKDEV_INIT("mcfpit.0", NULL, &clk_pll),
> +	CLKDEV_INIT("mcfpit.1", NULL, &clk_pll),
> +	CLKDEV_INIT("mcfpit.2", NULL, &clk_pll),
> +	CLKDEV_INIT("mcfpit.3", NULL, &clk_pll),
> +	CLKDEV_INIT("mcfuart.0", NULL, &clk_sys),
> +	CLKDEV_INIT("mcfuart.1", NULL, &clk_sys),
> +	CLKDEV_INIT("mcfuart.2", NULL, &clk_sys),
> +	CLKDEV_INIT("mcfqspi.0", NULL, &clk_sys),
> +	CLKDEV_INIT("fec.0", NULL, &clk_sys),
> +	CLKDEV_INIT("fec.1", NULL, &clk_sys),
> +	CLKDEV_INIT("imx1-i2c.0", NULL, &clk_sys),
>   };
>   
>   /***************************************************************************/
> @@ -97,7 +86,7 @@ static void __init m527x_i2c_init(void)
>   	/*  set PAR_SCL to SCL and PAR_SDA to SDA */
>   	par = readw(MCFGPIO_PAR_FECI2C);
>   	par |= 0x0f;
> -	writew(par, MCFGPIO_PAR_FECI2C);
> +	wm527x_clk_lookupritew(par, MCFGPIO_PAR_FECI2C);

Strange slip of the keyboard there.

Regards
Greg

  parent reply	other threads:[~2021-06-01 11:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-31 18:47 [PATCH 0/7] clk: clean up legacy clock interfaces Arnd Bergmann
2021-05-31 18:47 ` [PATCH 1/7] mips: ar7: convert to clkdev_lookup Arnd Bergmann
2021-06-01 13:23   ` Russell King (Oracle)
2021-06-01 14:41     ` Arnd Bergmann
2021-05-31 18:47 ` [PATCH 2/7] mips: ar7: convert to CONFIG_COMMON_CLK Arnd Bergmann
2021-05-31 18:47 ` [PATCH 3/7] mips: ralink: " Arnd Bergmann
2021-05-31 18:47 ` [PATCH 4/7] m68k: coldfire: use clkdev_lookup on most coldfire Arnd Bergmann
2021-06-01  9:02   ` Geert Uytterhoeven
2021-06-01 12:22     ` Arnd Bergmann
2021-06-01 11:54   ` Greg Ungerer [this message]
2021-05-31 18:47 ` [PATCH 5/7] m68k: coldfire: remove private clk_get/clk_put Arnd Bergmann
2021-05-31 18:47 ` [PATCH 6/7] clkdev: remove CONFIG_CLKDEV_LOOKUP Arnd Bergmann
2021-05-31 18:47 ` [PATCH 7/7] clkdev: remove unused clkdev_alloc() interfaces Arnd Bergmann
2021-06-02  7:54   ` Stephen Boyd
2021-06-01  9:51 ` [PATCH 0/7] clk: clean up legacy clock interfaces Thomas Bogendoerfer
2021-06-01 12:24   ` Arnd Bergmann
2021-06-01 22:05     ` Stephen Boyd
2021-06-02 10:37       ` Arnd Bergmann
2021-06-01 12:02 ` Greg Ungerer

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=a4547445-7892-d84a-95bd-b43a82103a12@linux-m68k.org \
    --to=gerg@linux-m68k.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=digetx@gmail.com \
    --cc=florian@openwrt.org \
    --cc=geert@linux-m68k.org \
    --cc=john@phrozen.org \
    --cc=jonas.gorski@gmail.com \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox