Linux-m68k Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH for-next] m68k: coldfire/clk.c: move m5441x specific code
@ 2020-05-25 10:23 Angelo Dureghello
  2020-05-25 11:12 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Angelo Dureghello @ 2020-05-25 10:23 UTC (permalink / raw)
  To: gerg; +Cc: linux-m68k, adrian.hunter, ulf.hansson, linux-mmc, Angelo Dureghello

Moving specific m5441x clk-related code in more appropriate location,
since breaking compilation for other targets.

Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>
---
 arch/m68k/coldfire/clk.c    | 15 ---------------
 arch/m68k/coldfire/m5441x.c | 15 +++++++++++++++
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c
index 75a057445472..7bc666e482eb 100644
--- a/arch/m68k/coldfire/clk.c
+++ b/arch/m68k/coldfire/clk.c
@@ -73,21 +73,6 @@ struct clk_ops clk_ops1 = {
 #endif /* MCFPM_PPMCR1 */
 #endif /* MCFPM_PPMCR0 */
 
-static void __clk_enable2(struct clk *clk)
-{
-	__raw_writel(__raw_readl(MCFSDHC_CLK) | (1 << clk->slot), MCFSDHC_CLK);
-}
-
-static void __clk_disable2(struct clk *clk)
-{
-	__raw_writel(__raw_readl(MCFSDHC_CLK) & ~(1 << clk->slot), MCFSDHC_CLK);
-}
-
-struct clk_ops clk_ops2 = {
-	.enable		= __clk_enable2,
-	.disable	= __clk_disable2,
-};
-
 struct clk *clk_get(struct device *dev, const char *id)
 {
 	const char *clk_name = dev ? dev_name(dev) : id ? id : NULL;
diff --git a/arch/m68k/coldfire/m5441x.c b/arch/m68k/coldfire/m5441x.c
index ffa02de1a3fb..1e5259a652d1 100644
--- a/arch/m68k/coldfire/m5441x.c
+++ b/arch/m68k/coldfire/m5441x.c
@@ -204,6 +204,21 @@ static struct clk * const disable_clks[] __initconst = {
 	&__clk_1_29, /* uart 9 */
 };
 
+static void __clk_enable2(struct clk *clk)
+{
+	__raw_writel(__raw_readl(MCFSDHC_CLK) | (1 << clk->slot), MCFSDHC_CLK);
+}
+
+static void __clk_disable2(struct clk *clk)
+{
+	__raw_writel(__raw_readl(MCFSDHC_CLK) & ~(1 << clk->slot), MCFSDHC_CLK);
+}
+
+struct clk_ops clk_ops2 = {
+	.enable		= __clk_enable2,
+	.disable	= __clk_disable2,
+};
+
 static void __init m5441x_clk_init(void)
 {
 	unsigned i;
-- 
2.26.2


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

* Re: [PATCH for-next] m68k: coldfire/clk.c: move m5441x specific code
  2020-05-25 10:23 [PATCH for-next] m68k: coldfire/clk.c: move m5441x specific code Angelo Dureghello
@ 2020-05-25 11:12 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2020-05-25 11:12 UTC (permalink / raw)
  To: Angelo Dureghello; +Cc: Greg Ungerer, linux-m68k, Adrian Hunter, linux-mmc

On Mon, 25 May 2020 at 12:17, Angelo Dureghello
<angelo.dureghello@timesys.com> wrote:
>
> Moving specific m5441x clk-related code in more appropriate location,
> since breaking compilation for other targets.
>
> Signed-off-by: Angelo Dureghello <angelo.dureghello@timesys.com>

Applied for next, to get this tested asap, thanks!

Kind regards
Uffe

> ---
>  arch/m68k/coldfire/clk.c    | 15 ---------------
>  arch/m68k/coldfire/m5441x.c | 15 +++++++++++++++
>  2 files changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/arch/m68k/coldfire/clk.c b/arch/m68k/coldfire/clk.c
> index 75a057445472..7bc666e482eb 100644
> --- a/arch/m68k/coldfire/clk.c
> +++ b/arch/m68k/coldfire/clk.c
> @@ -73,21 +73,6 @@ struct clk_ops clk_ops1 = {
>  #endif /* MCFPM_PPMCR1 */
>  #endif /* MCFPM_PPMCR0 */
>
> -static void __clk_enable2(struct clk *clk)
> -{
> -       __raw_writel(__raw_readl(MCFSDHC_CLK) | (1 << clk->slot), MCFSDHC_CLK);
> -}
> -
> -static void __clk_disable2(struct clk *clk)
> -{
> -       __raw_writel(__raw_readl(MCFSDHC_CLK) & ~(1 << clk->slot), MCFSDHC_CLK);
> -}
> -
> -struct clk_ops clk_ops2 = {
> -       .enable         = __clk_enable2,
> -       .disable        = __clk_disable2,
> -};
> -
>  struct clk *clk_get(struct device *dev, const char *id)
>  {
>         const char *clk_name = dev ? dev_name(dev) : id ? id : NULL;
> diff --git a/arch/m68k/coldfire/m5441x.c b/arch/m68k/coldfire/m5441x.c
> index ffa02de1a3fb..1e5259a652d1 100644
> --- a/arch/m68k/coldfire/m5441x.c
> +++ b/arch/m68k/coldfire/m5441x.c
> @@ -204,6 +204,21 @@ static struct clk * const disable_clks[] __initconst = {
>         &__clk_1_29, /* uart 9 */
>  };
>
> +static void __clk_enable2(struct clk *clk)
> +{
> +       __raw_writel(__raw_readl(MCFSDHC_CLK) | (1 << clk->slot), MCFSDHC_CLK);
> +}
> +
> +static void __clk_disable2(struct clk *clk)
> +{
> +       __raw_writel(__raw_readl(MCFSDHC_CLK) & ~(1 << clk->slot), MCFSDHC_CLK);
> +}
> +
> +struct clk_ops clk_ops2 = {
> +       .enable         = __clk_enable2,
> +       .disable        = __clk_disable2,
> +};
> +
>  static void __init m5441x_clk_init(void)
>  {
>         unsigned i;
> --
> 2.26.2
>

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25 10:23 [PATCH for-next] m68k: coldfire/clk.c: move m5441x specific code Angelo Dureghello
2020-05-25 11:12 ` Ulf Hansson

Linux-m68k Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-m68k/0 linux-m68k/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-m68k linux-m68k/ https://lore.kernel.org/linux-m68k \
		linux-m68k@vger.kernel.org linux-m68k@lists.linux-m68k.org
	public-inbox-index linux-m68k

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-m68k


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git