aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2018-06-22 01:32:48 -0400
committerShawn Guo <shawnguo@kernel.org>2018-07-03 03:13:44 -0400
commitd082852f40de5cf55a7a689bf582fced39f5443e (patch)
tree1f9496f4ccc1a39966f1fb29b0f2dc11bb90f01b
parent83ef5da0527cfeb1bb77c25f67b7ce0e06a42579 (diff)
ARM: imx: enable bus auto clock gating function for i.mx6sll
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> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r--arch/arm/mach-imx/pm-imx6.c11
-rw-r--r--include/linux/mfd/syscon/imx6q-iomuxc-gpr.h3
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 791e1fda248e..b08e407d8d96 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)
648 648
649void __init imx6sl_pm_init(void) 649void __init imx6sl_pm_init(void)
650{ 650{
651 if (cpu_is_imx6sl()) 651 struct regmap *gpr;
652
653 if (cpu_is_imx6sl()) {
652 imx6_pm_common_init(&imx6sl_pm_data); 654 imx6_pm_common_init(&imx6sl_pm_data);
653 else 655 } else {
654 imx6_pm_common_init(&imx6sll_pm_data); 656 imx6_pm_common_init(&imx6sll_pm_data);
657 gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr");
658 if (!IS_ERR(gpr))
659 regmap_update_bits(gpr, IOMUXC_GPR5,
660 IMX6SLL_GPR5_AFCG_X_BYPASS_MASK, 0);
661 }
655} 662}
656 663
657void __init imx6sx_pm_init(void) 664void __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 e06f5f79eaef..6c1ad160ed87 100644
--- a/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
+++ b/include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
@@ -457,4 +457,7 @@
457#define MCLK_DIR(x) (x == 1 ? IMX6UL_GPR1_SAI1_MCLK_DIR : x == 2 ? \ 457#define MCLK_DIR(x) (x == 1 ? IMX6UL_GPR1_SAI1_MCLK_DIR : x == 2 ? \
458 IMX6UL_GPR1_SAI2_MCLK_DIR : IMX6UL_GPR1_SAI3_MCLK_DIR) 458 IMX6UL_GPR1_SAI2_MCLK_DIR : IMX6UL_GPR1_SAI3_MCLK_DIR)
459 459
460/* For imx6sll iomux gpr register field define */
461#define IMX6SLL_GPR5_AFCG_X_BYPASS_MASK (0x1f << 11)
462
460#endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */ 463#endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */