All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 5/6] clk: tegra114: implement wait_for_reset and disable_clock for tegra_cpu_car_ops
Date: Thu, 16 May 2013 12:17:23 -0700	[thread overview]
Message-ID: <20130516191723.12127.40116@quantum> (raw)
In-Reply-To: <1368613644-11863-6-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Quoting Joseph Lo (2013-05-15 03:27:23)
> The conventional CPU hotplug sequence on the other Tegra chips, we will also
> clock gate the CPU in tegra_cpu_kill() after the CPU was power gated. For
> Tegra114, the flow controller will clock gate the CPU after the power down
> sequence. But we still need to implement a empty function for disable_clock
> to avoid kernel warning message.
> 
> Cc: Mike Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Joseph Lo <josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Acked-by: Mike Turquette <mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

> ---
>  drivers/clk/tegra/clk-tegra114.c | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c
> index d78e16e..40d939d 100644
> --- a/drivers/clk/tegra/clk-tegra114.c
> +++ b/drivers/clk/tegra/clk-tegra114.c
> @@ -250,6 +250,9 @@
>  #define CLK_SOURCE_XUSB_DEV_SRC 0x60c
>  #define CLK_SOURCE_EMC 0x19c
>  
> +/* Tegra CPU clock and reset control regs */
> +#define CLK_RST_CONTROLLER_CPU_CMPLX_STATUS    0x470
> +
>  static int periph_clk_enb_refcnt[CLK_OUT_ENB_NUM * 32];
>  
>  static void __iomem *clk_base;
> @@ -2000,7 +2003,25 @@ static __init void tegra114_periph_clk_init(void __iomem *clk_base)
>         }
>  }
>  
> -static struct tegra_cpu_car_ops tegra114_cpu_car_ops;
> +/* Tegra114 CPU clock and reset control functions */
> +static void tegra114_wait_cpu_in_reset(u32 cpu)
> +{
> +       unsigned int reg;
> +
> +       do {
> +               reg = readl(clk_base + CLK_RST_CONTROLLER_CPU_CMPLX_STATUS);
> +               cpu_relax();
> +       } while (!(reg & (1 << cpu)));  /* check CPU been reset or not */
> +}
> +static void tegra114_disable_cpu_clock(u32 cpu)
> +{
> +       /* flow controller would take care in the power sequence. */
> +}
> +
> +static struct tegra_cpu_car_ops tegra114_cpu_car_ops = {
> +       .wait_for_reset = tegra114_wait_cpu_in_reset,
> +       .disable_clock  = tegra114_disable_cpu_clock,
> +};
>  
>  static const struct of_device_id pmc_match[] __initconst = {
>         { .compatible = "nvidia,tegra114-pmc" },
> -- 
> 1.8.2.2

WARNING: multiple messages have this Message-ID (diff)
From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 5/6] clk: tegra114: implement wait_for_reset and disable_clock for tegra_cpu_car_ops
Date: Thu, 16 May 2013 12:17:23 -0700	[thread overview]
Message-ID: <20130516191723.12127.40116@quantum> (raw)
In-Reply-To: <1368613644-11863-6-git-send-email-josephl@nvidia.com>

Quoting Joseph Lo (2013-05-15 03:27:23)
> The conventional CPU hotplug sequence on the other Tegra chips, we will also
> clock gate the CPU in tegra_cpu_kill() after the CPU was power gated. For
> Tegra114, the flow controller will clock gate the CPU after the power down
> sequence. But we still need to implement a empty function for disable_clock
> to avoid kernel warning message.
> 
> Cc: Mike Turquette <mturquette@linaro.org>
> Signed-off-by: Joseph Lo <josephl@nvidia.com>

Acked-by: Mike Turquette <mturquette@linaro.org>

> ---
>  drivers/clk/tegra/clk-tegra114.c | 23 ++++++++++++++++++++++-
>  1 file changed, 22 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c
> index d78e16e..40d939d 100644
> --- a/drivers/clk/tegra/clk-tegra114.c
> +++ b/drivers/clk/tegra/clk-tegra114.c
> @@ -250,6 +250,9 @@
>  #define CLK_SOURCE_XUSB_DEV_SRC 0x60c
>  #define CLK_SOURCE_EMC 0x19c
>  
> +/* Tegra CPU clock and reset control regs */
> +#define CLK_RST_CONTROLLER_CPU_CMPLX_STATUS    0x470
> +
>  static int periph_clk_enb_refcnt[CLK_OUT_ENB_NUM * 32];
>  
>  static void __iomem *clk_base;
> @@ -2000,7 +2003,25 @@ static __init void tegra114_periph_clk_init(void __iomem *clk_base)
>         }
>  }
>  
> -static struct tegra_cpu_car_ops tegra114_cpu_car_ops;
> +/* Tegra114 CPU clock and reset control functions */
> +static void tegra114_wait_cpu_in_reset(u32 cpu)
> +{
> +       unsigned int reg;
> +
> +       do {
> +               reg = readl(clk_base + CLK_RST_CONTROLLER_CPU_CMPLX_STATUS);
> +               cpu_relax();
> +       } while (!(reg & (1 << cpu)));  /* check CPU been reset or not */
> +}
> +static void tegra114_disable_cpu_clock(u32 cpu)
> +{
> +       /* flow controller would take care in the power sequence. */
> +}
> +
> +static struct tegra_cpu_car_ops tegra114_cpu_car_ops = {
> +       .wait_for_reset = tegra114_wait_cpu_in_reset,
> +       .disable_clock  = tegra114_disable_cpu_clock,
> +};
>  
>  static const struct of_device_id pmc_match[] __initconst = {
>         { .compatible = "nvidia,tegra114-pmc" },
> -- 
> 1.8.2.2

  parent reply	other threads:[~2013-05-16 19:17 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 10:27 [PATCH 0/6] ARM: tegra114: add CPU hotplug support Joseph Lo
2013-05-15 10:27 ` Joseph Lo
     [not found] ` <1368613644-11863-1-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 10:27   ` [PATCH 1/6] ARM: tegra: add an assembly marco to check Tegra SoC ID Joseph Lo
2013-05-15 10:27     ` Joseph Lo
     [not found]     ` <1368613644-11863-2-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 22:43       ` Stephen Warren
2013-05-15 22:43         ` Stephen Warren
     [not found]         ` <51940FA4.6050609-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 10:09           ` Joseph Lo
2013-05-16 10:09             ` Joseph Lo
     [not found]             ` <1368698988.7403.25.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:21               ` Stephen Warren
2013-05-16 18:21                 ` Stephen Warren
2013-05-15 10:27   ` [PATCH 2/6] ARM: tegra: skip SCU and PL310 code when CPU is not Cortex-A9 Joseph Lo
2013-05-15 10:27     ` Joseph Lo
     [not found]     ` <1368613644-11863-3-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 22:48       ` Stephen Warren
2013-05-15 22:48         ` Stephen Warren
     [not found]         ` <519410D7.9060201-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 10:13           ` Joseph Lo
2013-05-16 10:13             ` Joseph Lo
2013-05-15 10:27   ` [PATCH 3/6] ARM: tegra: make tegra_resume can work for Tegra114 Joseph Lo
2013-05-15 10:27     ` Joseph Lo
     [not found]     ` <1368613644-11863-4-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 22:57       ` Stephen Warren
2013-05-15 22:57         ` Stephen Warren
     [not found]         ` <519412E9.2080905-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 10:35           ` Joseph Lo
2013-05-16 10:35             ` Joseph Lo
     [not found]             ` <1368700533.7403.47.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:24               ` Stephen Warren
2013-05-16 18:24                 ` Stephen Warren
2013-05-15 10:27   ` [PATCH 4/6] ARM: tegra114: add power up sequence for warm boot CPU Joseph Lo
2013-05-15 10:27     ` Joseph Lo
2013-05-15 10:27   ` [PATCH 5/6] clk: tegra114: implement wait_for_reset and disable_clock for tegra_cpu_car_ops Joseph Lo
2013-05-15 10:27     ` Joseph Lo
     [not found]     ` <1368613644-11863-6-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 23:02       ` Stephen Warren
2013-05-15 23:02         ` Stephen Warren
2013-05-16 19:17       ` Mike Turquette [this message]
2013-05-16 19:17         ` Mike Turquette
2013-05-15 10:27   ` [PATCH 6/6] ARM: tegra114: add CPU hotplug support Joseph Lo
2013-05-15 10:27     ` Joseph Lo
     [not found]     ` <1368613644-11863-7-git-send-email-josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-05-15 23:11       ` Stephen Warren
2013-05-15 23:11         ` Stephen Warren
     [not found]         ` <5194162D.7010007-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16 11:14           ` Joseph Lo
2013-05-16 11:14             ` Joseph Lo
     [not found]             ` <1368702862.7403.86.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:26               ` Stephen Warren
2013-05-16 18:26                 ` Stephen Warren
2013-05-15 23:38   ` [PATCH 0/6] " Stephen Warren
2013-05-15 23:38     ` Stephen Warren
     [not found]     ` <51941C58.9060002-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-16  9:53       ` Joseph Lo
2013-05-16  9:53         ` Joseph Lo
     [not found]         ` <1368698019.7403.10.camel-yx3yKKdKkHfc7b1ADBJPm0n48jw8i0AO@public.gmane.org>
2013-05-16 18:19           ` Stephen Warren
2013-05-16 18:19             ` Stephen Warren
     [not found]             ` <51952344.1090003-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-17 10:15               ` Joseph Lo
2013-05-17 10:15                 ` Joseph Lo
2013-05-17 10:27               ` Russell King - ARM Linux
2013-05-17 10:27                 ` Russell King - ARM Linux
2013-05-17 10:23           ` Russell King - ARM Linux
2013-05-17 10:23             ` Russell King - ARM Linux

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=20130516191723.12127.40116@quantum \
    --to=mturquette-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=josephl-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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.