2018-01-23 09:05:37

by Anson Huang

[permalink] [raw]
Subject: [PATCH 1/2] soc: imx: gpc: ARM power domain should be always-on

ARM power domain does NOT support runtime off, always-on
flag should be set to avoid incorrect power state in
pm_genpd_summary:

Before:

root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
ARM off-0

After:

root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain status slaves
/device runtime status
----------------------------------------------------------------------
ARM on

Signed-off-by: Anson Huang <[email protected]>
---
drivers/soc/imx/gpc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c
index 53f7275..6cafa9b 100644
--- a/drivers/soc/imx/gpc.c
+++ b/drivers/soc/imx/gpc.c
@@ -254,6 +254,7 @@ static struct imx_pm_domain imx_gpc_domains[] = {
{
.base = {
.name = "ARM",
+ .flags = GENPD_FLAG_ALWAYS_ON,
},
}, {
.base = {
--
2.7.4



2018-01-23 09:06:17

by Anson Huang

[permalink] [raw]
Subject: [PATCH 2/2] ARM: dts: imx6sx: add ARM power domain support

Add ARM power domain in PGC.

Signed-off-by: Anson Huang <[email protected]>
---
this patch should be based on 0001-ARM-dts-imx6sx-add-pu-power-domain-support.patch
arch/arm/boot/dts/imx6sx.dtsi | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi
index 42ef4c6..aa29ca6 100644
--- a/arch/arm/boot/dts/imx6sx.dtsi
+++ b/arch/arm/boot/dts/imx6sx.dtsi
@@ -768,6 +768,11 @@
#address-cells = <1>;
#size-cells = <0>;

+ power-domain@0 {
+ reg = <0>;
+ #power-domain-cells = <0>;
+ };
+
pd_pu: power-domain@1 {
reg = <1>;
#power-domain-cells = <0>;
--
2.7.4


2018-01-23 13:48:53

by Lucas Stach

[permalink] [raw]
Subject: Re: [PATCH 1/2] soc: imx: gpc: ARM power domain should be always-on

Am Mittwoch, den 24.01.2018, 00:42 +0800 schrieb Anson Huang:
> ARM power domain does NOT support runtime off, always-on
> flag should be set to avoid incorrect power state in
> pm_genpd_summary:
>
> Before:
>
> root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain                          status          slaves
>     /device                                             runtime status
> ----------------------------------------------------------------------
> ARM                             off-0
>
> After:
>
> root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain                          status          slaves
>     /device                                             runtime status
> ----------------------------------------------------------------------
> ARM                             on
>
> Signed-off-by: Anson Huang <[email protected]>

Reviewed-by: Lucas Stach <[email protected]>

> ---
>  drivers/soc/imx/gpc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c
> index 53f7275..6cafa9b 100644
> --- a/drivers/soc/imx/gpc.c
> +++ b/drivers/soc/imx/gpc.c
> @@ -254,6 +254,7 @@ static struct imx_pm_domain imx_gpc_domains[] = {
> >   {
> >   .base = {
> >   .name = "ARM",
> > + .flags = GENPD_FLAG_ALWAYS_ON,
> >   },
> >   }, {
> >   .base = {

2018-01-23 13:50:31

by Lucas Stach

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: dts: imx6sx: add ARM power domain support

Am Mittwoch, den 24.01.2018, 00:42 +0800 schrieb Anson Huang:
> Add ARM power domain in PGC.
>
> Signed-off-by: Anson Huang <[email protected]>

Reviewed-by: Lucas Stach <[email protected]>

> ---
> this patch should be based on 0001-ARM-dts-imx6sx-add-pu-power-domain-support.patch
>  arch/arm/boot/dts/imx6sx.dtsi | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi
> index 42ef4c6..aa29ca6 100644
> --- a/arch/arm/boot/dts/imx6sx.dtsi
> +++ b/arch/arm/boot/dts/imx6sx.dtsi
> @@ -768,6 +768,11 @@
> >   #address-cells = <1>;
> >   #size-cells = <0>;
>  
> > + power-domain@0 {
> > + reg = <0>;
> > + #power-domain-cells = <0>;
> > + };
> +
> > >   pd_pu: power-domain@1 {
> >   reg = <1>;
> >   #power-domain-cells = <0>;

2018-01-25 10:30:58

by Dong Aisheng

[permalink] [raw]
Subject: Re: [PATCH 1/2] soc: imx: gpc: ARM power domain should be always-on

On Wed, Jan 24, 2018 at 12:42:13AM +0800, Anson Huang wrote:
> ARM power domain does NOT support runtime off, always-on
> flag should be set to avoid incorrect power state in
> pm_genpd_summary:
>
> Before:
>
> root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> ARM off-0
>
> After:
>
> root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> ARM on
>
> Signed-off-by: Anson Huang <[email protected]>

Acked-by: Dong Aisheng <[email protected]>

Regards
Dong Aisheng

2018-01-25 10:34:17

by Dong Aisheng

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: dts: imx6sx: add ARM power domain support

On Wed, Jan 24, 2018 at 12:42:14AM +0800, Anson Huang wrote:
> Add ARM power domain in PGC.
>
> Signed-off-by: Anson Huang <[email protected]>
> ---
> this patch should be based on 0001-ARM-dts-imx6sx-add-pu-power-domain-support.patch
> arch/arm/boot/dts/imx6sx.dtsi | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx6sx.dtsi b/arch/arm/boot/dts/imx6sx.dtsi
> index 42ef4c6..aa29ca6 100644
> --- a/arch/arm/boot/dts/imx6sx.dtsi
> +++ b/arch/arm/boot/dts/imx6sx.dtsi
> @@ -768,6 +768,11 @@
> #address-cells = <1>;
> #size-cells = <0>;
>
> + power-domain@0 {

Nitpick: probably an 'arm' prefix is better:
arm: power-domain@0

Anyway, it's minor depends on maintainer's perference.

Otherwise, looks fine

Acked-by: Dong Aisheng <[email protected]>

Regards
Dong Aisheng

> + reg = <0>;
> + #power-domain-cells = <0>;
> + };
> +
> pd_pu: power-domain@1 {
> reg = <1>;
> #power-domain-cells = <0>;
> --
> 2.7.4
>

2018-02-05 06:34:50

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 1/2] soc: imx: gpc: ARM power domain should be always-on

On Wed, Jan 24, 2018 at 12:42:13AM +0800, Anson Huang wrote:
> ARM power domain does NOT support runtime off, always-on
> flag should be set to avoid incorrect power state in
> pm_genpd_summary:
>
> Before:
>
> root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> ARM off-0
>
> After:
>
> root@imx6qpdlsolox:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain status slaves
> /device runtime status
> ----------------------------------------------------------------------
> ARM on
>
> Signed-off-by: Anson Huang <[email protected]>

Applied both, thanks.