All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Keita Kobayashi <keita.kobayashi.ym@renesas.com>,
	horms@verge.net.au, rjw@rjwysocki.net
Cc: linux-sh@vger.kernel.org, linux-pm@vger.kernel.org,
	magnus.damm@gmail.com
Subject: Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
Date: Thu, 05 Mar 2015 19:11:48 +0100	[thread overview]
Message-ID: <54F89C64.2050605@linaro.org> (raw)
In-Reply-To: <1425444946-3084-5-git-send-email-keita.kobayashi.ym@renesas.com>

On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> This patch Add the wfi and Core-Standby for CPUIdle power states
> support for the r8a7791 SoC.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
>   arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++++++++++++++++++++++++++++++
>   1 file changed, 41 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
> index 25f107b..6c00d37 100644
> --- a/arch/arm/mach-shmobile/pm-r8a7791.c
> +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
> @@ -10,8 +10,13 @@
>    * for more details.
>    */
>
> +#include <linux/cpuidle.h>
>   #include <linux/kernel.h>
>   #include <linux/smp.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/pm.h>
> +#include <asm/cpuidle.h>
> +#include <asm/cputype.h>
>   #include <asm/io.h>
>   #include "common.h"
>   #include "pm-rcar.h"
> @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
>
>   #endif /* CONFIG_SMP */
>
> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> +static struct cpuidle_driver r8a7791_cpuidle_driver = {
> +	.name = "rcar_r8a7791_cpuidle",
> +	.owner = THIS_MODULE,
> +	.states = {
> +		[0] = ARM_CPUIDLE_WFI_STATE,
> +		[1] = {
> +			.name = "Core-Standby",
> +			.desc = "Core Standby Mode",
> +			.exit_latency = 2800,
> +			.target_residency = 2800,
> +			.enter = shmobile_smp_apmu_enter_cpuidle,
> +		},
> +	},
> +	.state_count = 2,
> +};

It would be nice to have the code self contained. I am pretty sure this 
possible to have the cpuidle bits into drivers/cpuidle and the low level 
pm code here.

> +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
> +	.target_cpu	= ARM_CPU_PART_CORTEX_A15,
> +	.renesas_drv	= &r8a7791_cpuidle_driver,
> +};
> +
> +static struct renesas_cpuidle r8a7791_data = {
> +	.num_drvs	= 1,
> +	.rcd		= &r8a7791_cpuidle,
> +};
> +
> +static void __init r8a7791_cpuidle_init(void)
> +{
> +	shmobile_cpuidle_set_driver(&r8a7791_data);
> +}
> +#else
> +static void __init r8a7791_cpuidle_init(void) {}
> +#endif
> +
>   void __init r8a7791_pm_init(void)
>   {
>   	void __iomem *p;
> @@ -70,4 +110,5 @@ void __init r8a7791_pm_init(void)
>
>   	r8a7791_sysc_init();
>   	shmobile_smp_apmu_suspend_init();
> +	r8a7791_cpuidle_init();
>   }
>


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Keita Kobayashi <keita.kobayashi.ym@renesas.com>,
	horms@verge.net.au, rjw@rjwysocki.net
Cc: linux-sh@vger.kernel.org, linux-pm@vger.kernel.org,
	magnus.damm@gmail.com
Subject: Re: [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791
Date: Thu, 05 Mar 2015 18:11:48 +0000	[thread overview]
Message-ID: <54F89C64.2050605@linaro.org> (raw)
In-Reply-To: <1425444946-3084-5-git-send-email-keita.kobayashi.ym@renesas.com>

On 03/04/2015 05:55 AM, Keita Kobayashi wrote:
> This patch Add the wfi and Core-Standby for CPUIdle power states
> support for the r8a7791 SoC.
>
> Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
> ---
>   arch/arm/mach-shmobile/pm-r8a7791.c | 41 +++++++++++++++++++++++++++++++++++++
>   1 file changed, 41 insertions(+)
>
> diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
> index 25f107b..6c00d37 100644
> --- a/arch/arm/mach-shmobile/pm-r8a7791.c
> +++ b/arch/arm/mach-shmobile/pm-r8a7791.c
> @@ -10,8 +10,13 @@
>    * for more details.
>    */
>
> +#include <linux/cpuidle.h>
>   #include <linux/kernel.h>
>   #include <linux/smp.h>
> +#include <linux/platform_data/renesas-cpuidle.h>
> +#include <linux/pm.h>
> +#include <asm/cpuidle.h>
> +#include <asm/cputype.h>
>   #include <asm/io.h>
>   #include "common.h"
>   #include "pm-rcar.h"
> @@ -43,6 +48,41 @@ static inline void r8a7791_sysc_init(void) {}
>
>   #endif /* CONFIG_SMP */
>
> +#ifdef CONFIG_ARM_RENESAS_CPUIDLE
> +static struct cpuidle_driver r8a7791_cpuidle_driver = {
> +	.name = "rcar_r8a7791_cpuidle",
> +	.owner = THIS_MODULE,
> +	.states = {
> +		[0] = ARM_CPUIDLE_WFI_STATE,
> +		[1] = {
> +			.name = "Core-Standby",
> +			.desc = "Core Standby Mode",
> +			.exit_latency = 2800,
> +			.target_residency = 2800,
> +			.enter = shmobile_smp_apmu_enter_cpuidle,
> +		},
> +	},
> +	.state_count = 2,
> +};

It would be nice to have the code self contained. I am pretty sure this 
possible to have the cpuidle bits into drivers/cpuidle and the low level 
pm code here.

> +static struct renesas_cpuidle_driver r8a7791_cpuidle = {
> +	.target_cpu	= ARM_CPU_PART_CORTEX_A15,
> +	.renesas_drv	= &r8a7791_cpuidle_driver,
> +};
> +
> +static struct renesas_cpuidle r8a7791_data = {
> +	.num_drvs	= 1,
> +	.rcd		= &r8a7791_cpuidle,
> +};
> +
> +static void __init r8a7791_cpuidle_init(void)
> +{
> +	shmobile_cpuidle_set_driver(&r8a7791_data);
> +}
> +#else
> +static void __init r8a7791_cpuidle_init(void) {}
> +#endif
> +
>   void __init r8a7791_pm_init(void)
>   {
>   	void __iomem *p;
> @@ -70,4 +110,5 @@ void __init r8a7791_pm_init(void)
>
>   	r8a7791_sysc_init();
>   	shmobile_smp_apmu_suspend_init();
> +	r8a7791_cpuidle_init();
>   }
>


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


  parent reply	other threads:[~2015-03-05 18:11 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  4:55 [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs Keita Kobayashi
2015-03-04  4:55 ` Keita Kobayashi
2015-03-04  4:55 ` [RFC/PATCH 1/6] cpuidle: renesas: Add CPUIdle Driver " Keita Kobayashi
2015-03-04  4:55   ` Keita Kobayashi
2015-03-05 18:05   ` Daniel Lezcano
2015-03-05 18:05     ` Daniel Lezcano
2015-03-04  4:55 ` [RFC/PATCH 2/6] ARM: shmobile: Change CPUIdle InterFace Keita Kobayashi
2015-03-04  4:55   ` Keita Kobayashi
2015-03-04  4:55 ` [RFC/PATCH 3/6] ARM: shmobile: APMU: Add Core-Standby function for CPUIdle Keita Kobayashi
2015-03-04  4:55   ` Keita Kobayashi
2015-03-04  4:55 ` [RFC/PATCH 4/6] ARM: shmobile: r8a7791: Add Core-Standby CPUIdle support for r8a7791 Keita Kobayashi
2015-03-04  4:55   ` Keita Kobayashi
     [not found]   ` <CAKDJKT6vx8xhHtxCerXen0NqRao5d5hzZdj8LtSJ4hiMjhZXdA@mail.gmail.com>
2015-03-05  0:29     ` Simon Horman
2015-03-05  0:29       ` Simon Horman
2015-03-05  1:19       ` keita kobayashi
2015-03-05  1:19         ` keita kobayashi
2015-03-05 18:11   ` Daniel Lezcano [this message]
2015-03-05 18:11     ` Daniel Lezcano
2015-03-04  4:55 ` [RFC/PATCH 5/6] ARM: shmobile: r8a7790: Add Core-Standby CPUIdle support for r8a7790 Keita Kobayashi
2015-03-04  4:55   ` Keita Kobayashi
2015-03-05 18:13   ` Daniel Lezcano
2015-03-05 18:13     ` Daniel Lezcano
2015-03-04  4:55 ` [RFC/PATCH 6/6] ARM: shmobile: Enable Renesas CPUIdle for shmobile_defconfig Keita Kobayashi
2015-03-04  4:55   ` Keita Kobayashi
2015-03-05 18:02 ` [RFC/PATCH 0/6] Add CPUIdle support for Renesas SoCs Daniel Lezcano
2015-03-05 18:02   ` Daniel Lezcano
2015-03-06  9:38   ` keita kobayashi
2015-03-06  9:38     ` keita kobayashi
2015-03-09 15:21     ` Lina Iyer
2015-03-09 15:21       ` Lina Iyer
2015-03-09 15:32       ` Daniel Lezcano
2015-03-09 15:32         ` Daniel Lezcano
2015-03-13  5:01         ` keita kobayashi
2015-03-13  5:01           ` keita kobayashi

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=54F89C64.2050605@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=horms@verge.net.au \
    --cc=keita.kobayashi.ym@renesas.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=rjw@rjwysocki.net \
    /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.