All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
@ 2018-06-22  5:32 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2018-06-22  5:32 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, fabio.estevam, linux, lee.jones, tj,
	hongxing.zhu
  Cc: Linux-imx, linux-arm-kernel, linux-kernel

i.MX6SLL has HW bus auto clock gating function, enable
it by default to save VDD_SOC_IN power, about 5% ~ 20%
saved depends on different use cases.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 arch/arm/mach-imx/pm-imx6.c                 | 11 +++++++++--
 include/linux/mfd/syscon/imx6q-iomuxc-gpr.h |  3 +++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 791e1fd..b08e407 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -648,10 +648,17 @@ void __init imx6dl_pm_init(void)
 
 void __init imx6sl_pm_init(void)
 {
-	if (cpu_is_imx6sl())
+	struct regmap *gpr;
+
+	if (cpu_is_imx6sl()) {
 		imx6_pm_common_init(&imx6sl_pm_data);
-	else
+	} else {
 		imx6_pm_common_init(&imx6sll_pm_data);
+		gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
+		if (!IS_ERR(gpr))
+			regmap_update_bits(gpr, IOMUXC_GPR5,
+				IMX6SLL_GPR5_AFCG_X_BYPASS_MASK, 0);
+	}
 }
 
 void __init imx6sx_pm_init(void)
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
index e06f5f7..6c1ad16 100644
--- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
+++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
@@ -457,4 +457,7 @@
 #define MCLK_DIR(x) (x == 1 ? IMX6UL_GPR1_SAI1_MCLK_DIR : x == 2 ? \
 		     IMX6UL_GPR1_SAI2_MCLK_DIR : IMX6UL_GPR1_SAI3_MCLK_DIR)
 
+/* For imx6sll iomux gpr register field define */
+#define IMX6SLL_GPR5_AFCG_X_BYPASS_MASK		(0x1f << 11)
+
 #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */
-- 
2.7.4


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

* [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
@ 2018-06-22  5:32 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2018-06-22  5:32 UTC (permalink / raw)
  To: linux-arm-kernel

i.MX6SLL has HW bus auto clock gating function, enable
it by default to save VDD_SOC_IN power, about 5% ~ 20%
saved depends on different use cases.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 arch/arm/mach-imx/pm-imx6.c                 | 11 +++++++++--
 include/linux/mfd/syscon/imx6q-iomuxc-gpr.h |  3 +++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/pm-imx6.c b/arch/arm/mach-imx/pm-imx6.c
index 791e1fd..b08e407 100644
--- a/arch/arm/mach-imx/pm-imx6.c
+++ b/arch/arm/mach-imx/pm-imx6.c
@@ -648,10 +648,17 @@ void __init imx6dl_pm_init(void)
 
 void __init imx6sl_pm_init(void)
 {
-	if (cpu_is_imx6sl())
+	struct regmap *gpr;
+
+	if (cpu_is_imx6sl()) {
 		imx6_pm_common_init(&imx6sl_pm_data);
-	else
+	} else {
 		imx6_pm_common_init(&imx6sll_pm_data);
+		gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
+		if (!IS_ERR(gpr))
+			regmap_update_bits(gpr, IOMUXC_GPR5,
+				IMX6SLL_GPR5_AFCG_X_BYPASS_MASK, 0);
+	}
 }
 
 void __init imx6sx_pm_init(void)
diff --git a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
index e06f5f7..6c1ad16 100644
--- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
+++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
@@ -457,4 +457,7 @@
 #define MCLK_DIR(x) (x == 1 ? IMX6UL_GPR1_SAI1_MCLK_DIR : x == 2 ? \
 		     IMX6UL_GPR1_SAI2_MCLK_DIR : IMX6UL_GPR1_SAI3_MCLK_DIR)
 
+/* For imx6sll iomux gpr register field define */
+#define IMX6SLL_GPR5_AFCG_X_BYPASS_MASK		(0x1f << 11)
+
 #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */
-- 
2.7.4

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

* Re: [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
  2018-06-22  5:32 ` Anson Huang
@ 2018-07-01  8:51   ` Shawn Guo
  -1 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2018-07-01  8:51 UTC (permalink / raw)
  To: Anson Huang
  Cc: s.hauer, kernel, fabio.estevam, linux, lee.jones, tj,
	hongxing.zhu, Linux-imx, linux-arm-kernel, linux-kernel

On Fri, Jun 22, 2018 at 01:32:48PM +0800, Anson Huang wrote:
> i.MX6SLL has HW bus auto clock gating function, enable
> it by default to save VDD_SOC_IN power, about 5% ~ 20%
> saved depends on different use cases.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Applied, thanks.

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

* [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
@ 2018-07-01  8:51   ` Shawn Guo
  0 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2018-07-01  8:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jun 22, 2018 at 01:32:48PM +0800, Anson Huang wrote:
> i.MX6SLL has HW bus auto clock gating function, enable
> it by default to save VDD_SOC_IN power, about 5% ~ 20%
> saved depends on different use cases.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Applied, thanks.

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

* Re: [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
  2018-07-01  8:51   ` Shawn Guo
@ 2018-07-03  6:20     ` Lee Jones
  -1 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2018-07-03  6:20 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Anson Huang, s.hauer, kernel, fabio.estevam, linux, tj,
	hongxing.zhu, Linux-imx, linux-arm-kernel, linux-kernel

On Sun, 01 Jul 2018, Shawn Guo wrote:

> On Fri, Jun 22, 2018 at 01:32:48PM +0800, Anson Huang wrote:
> > i.MX6SLL has HW bus auto clock gating function, enable
> > it by default to save VDD_SOC_IN power, about 5% ~ 20%
> > saved depends on different use cases.
> > 
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> 
> Applied, thanks.

Since this touches MFD, please apply my Ack to the patch.

  Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
@ 2018-07-03  6:20     ` Lee Jones
  0 siblings, 0 replies; 8+ messages in thread
From: Lee Jones @ 2018-07-03  6:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 01 Jul 2018, Shawn Guo wrote:

> On Fri, Jun 22, 2018 at 01:32:48PM +0800, Anson Huang wrote:
> > i.MX6SLL has HW bus auto clock gating function, enable
> > it by default to save VDD_SOC_IN power, about 5% ~ 20%
> > saved depends on different use cases.
> > 
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> 
> Applied, thanks.

Since this touches MFD, please apply my Ack to the patch.

  Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
  2018-07-03  6:20     ` Lee Jones
@ 2018-07-03  7:15       ` Shawn Guo
  -1 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2018-07-03  7:15 UTC (permalink / raw)
  To: Lee Jones
  Cc: Anson Huang, s.hauer, kernel, fabio.estevam, linux, tj,
	hongxing.zhu, Linux-imx, linux-arm-kernel, linux-kernel

On Tue, Jul 03, 2018 at 07:20:14AM +0100, Lee Jones wrote:
> On Sun, 01 Jul 2018, Shawn Guo wrote:
> 
> > On Fri, Jun 22, 2018 at 01:32:48PM +0800, Anson Huang wrote:
> > > i.MX6SLL has HW bus auto clock gating function, enable
> > > it by default to save VDD_SOC_IN power, about 5% ~ 20%
> > > saved depends on different use cases.
> > > 
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > 
> > Applied, thanks.
> 
> Since this touches MFD, please apply my Ack to the patch.
> 
>   Acked-by: Lee Jones <lee.jones@linaro.org>

Done.  Thanks for reminding, Lee.

> 
> -- 
> Lee Jones [李琼斯]

Nice Chinese name, BTW ;)

Shawn

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

* [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll
@ 2018-07-03  7:15       ` Shawn Guo
  0 siblings, 0 replies; 8+ messages in thread
From: Shawn Guo @ 2018-07-03  7:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jul 03, 2018 at 07:20:14AM +0100, Lee Jones wrote:
> On Sun, 01 Jul 2018, Shawn Guo wrote:
> 
> > On Fri, Jun 22, 2018 at 01:32:48PM +0800, Anson Huang wrote:
> > > i.MX6SLL has HW bus auto clock gating function, enable
> > > it by default to save VDD_SOC_IN power, about 5% ~ 20%
> > > saved depends on different use cases.
> > > 
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > 
> > Applied, thanks.
> 
> Since this touches MFD, please apply my Ack to the patch.
> 
>   Acked-by: Lee Jones <lee.jones@linaro.org>

Done.  Thanks for reminding, Lee.

> 
> -- 
> Lee Jones [???]

Nice Chinese name, BTW ;)

Shawn

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

end of thread, other threads:[~2018-07-03  7:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-22  5:32 [PATCH] ARM: imx: enable bus auto clock gating function for i.mx6sll Anson Huang
2018-06-22  5:32 ` Anson Huang
2018-07-01  8:51 ` Shawn Guo
2018-07-01  8:51   ` Shawn Guo
2018-07-03  6:20   ` Lee Jones
2018-07-03  6:20     ` Lee Jones
2018-07-03  7:15     ` Shawn Guo
2018-07-03  7:15       ` Shawn Guo

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.