linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mturquette@baylibre.com (Michael Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 20/20] clk: at91: Revert "keep slow clk enabled to prevent system hang"
Date: Tue, 11 Aug 2015 16:26:49 -0700	[thread overview]
Message-ID: <20150811232649.31346.37488@quantum> (raw)
In-Reply-To: <1438215726-27452-21-git-send-email-alexandre.belloni@free-electrons.com>

Quoting Alexandre Belloni (2015-07-29 17:22:06)
> Commit dca1a4b5ff6e ("clk: at91: keep slow clk enabled to prevent system
> hang") added a workaround for the slow clock as it is not properly handled
> by its users.
> 
> Now that the slow clock is taken properly by the drivers, this workaround
> is not necessary anymore, revert it.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> ---
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Stephen Boyd <sboyd@codeaurora.org>
> Cc: linux-clk at vger.kernel.org
>  drivers/clk/at91/clk-slow.c | 27 ---------------------------
>  1 file changed, 27 deletions(-)
> 
> diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c
> index 98a84a865fe1..2c59d6a64dd5 100644
> --- a/drivers/clk/at91/clk-slow.c
> +++ b/drivers/clk/at91/clk-slow.c
> @@ -70,7 +70,6 @@ struct clk_sam9x5_slow {
>  
>  #define to_clk_sam9x5_slow(hw) container_of(hw, struct clk_sam9x5_slow, hw)
>  
> -static struct clk *slow_clk;
>  

Might want to remove one extra line of white space?

>  static int clk_slow_osc_prepare(struct clk_hw *hw)
>  {
> @@ -358,8 +357,6 @@ at91_clk_register_sam9x5_slow(void __iomem *sckcr,
>         clk = clk_register(NULL, &slowck->hw);
>         if (IS_ERR(clk))
>                 kfree(slowck);
> -       else
> -               slow_clk = clk;
>  
>         return clk;
>  }
> @@ -436,8 +433,6 @@ at91_clk_register_sam9260_slow(struct at91_pmc *pmc,
>         clk = clk_register(NULL, &slowck->hw);
>         if (IS_ERR(clk))
>                 kfree(slowck);
> -       else
> -               slow_clk = clk;
>  
>         return clk;
>  }
> @@ -470,25 +465,3 @@ void __init of_at91sam9260_clk_slow_setup(struct device_node *np,
>  
>         of_clk_add_provider(np, of_clk_src_simple_get, clk);
>  }
> -
> -/*
> - * FIXME: All slow clk users are not properly claiming it (get + prepare +
> - * enable) before using it.
> - * If all users properly claiming this clock decide that they don't need it
> - * anymore (or are removed), it is disabled while faulty users are still
> - * requiring it, and the system hangs.
> - * Prevent this clock from being disabled until all users are properly
> - * requesting it.
> - * Once this is done we should remove this function and the slow_clk variable.
> - */
> -static int __init of_at91_clk_slow_retain(void)
> -{
> -       if (!slow_clk)
> -               return 0;
> -
> -       __clk_get(slow_clk);
> -       clk_prepare_enable(slow_clk);
> -
> -       return 0;
> -}
> -arch_initcall(of_at91_clk_slow_retain);

This is a cool series. Thanks. Feel free to add my Ack, or we can take
this through clk-next once the other patches are applied.

Regards,
Mike

> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2015-08-11 23:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  0:21 [PATCH 00/20] ARM: at91: Properly handle slow clock Alexandre Belloni
2015-07-30  0:21 ` [PATCH 01/20] Documentation: dt: atmel-at91: add clocks to system timer, rstc and shdwc Alexandre Belloni
2015-07-30  0:21 ` [PATCH 02/20] Documentation: watchdog: at91sam9_wdt: add clocks property Alexandre Belloni
2015-07-30  1:02   ` Guenter Roeck
2015-07-30  0:21 ` [PATCH 03/20] Documentation: dt: rtc: at91rm9200: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 04/20] ARM: at91/dt: at91rm9200: use slow clock where necessary Alexandre Belloni
2015-07-30  0:21 ` [PATCH 05/20] ARM: at91/dt: at91sam9260: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 06/20] ARM: at91/dt: at91sam9261: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 07/20] ARM: at91/dt: at91sam9263: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 08/20] ARM: at91/dt: at91sam9g45: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 09/20] ARM: at91/dt: at91sam9n12: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 10/20] ARM: at91/dt: at91sam9rl: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 11/20] ARM: at91/dt: at91sam9x5: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 12/20] ARM: at91/dt: sama5d3: " Alexandre Belloni
2015-07-30  0:21 ` [PATCH 13/20] ARM: at91/dt: sama5d4: " Alexandre Belloni
2015-07-30  0:22 ` [PATCH 14/20] rtc: at91rm9200: get and use slow clock Alexandre Belloni
2015-07-30  0:22 ` [PATCH 15/20] watchdog: at91sam9: " Alexandre Belloni
2015-07-30  1:03   ` Guenter Roeck
2015-07-30  0:22 ` [PATCH 16/20] power/reset: at91-reset: remove useless at91_reset_platform_probe() Alexandre Belloni
2015-07-30  9:40   ` Thomas Petazzoni
2015-07-30  0:22 ` [PATCH 17/20] power/reset: at91-reset: get and use slow clock Alexandre Belloni
2015-07-30  0:22 ` [PATCH 18/20] power/reset: at91-poweroff: " Alexandre Belloni
2015-07-30  0:22 ` [PATCH 19/20] clocksource: atmel-st: " Alexandre Belloni
2015-07-30  9:41   ` Thomas Petazzoni
2015-08-04 10:31   ` Daniel Lezcano
2015-08-04 11:00     ` Alexandre Belloni
2015-07-30  0:22 ` [PATCH 20/20] clk: at91: Revert "keep slow clk enabled to prevent system hang" Alexandre Belloni
2015-08-11 23:26   ` Michael Turquette [this message]

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=20150811232649.31346.37488@quantum \
    --to=mturquette@baylibre.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).