Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Anson Huang and committed by
Shawn Guo
d082852f 83ef5da0

+12 -2
+9 -2
arch/arm/mach-imx/pm-imx6.c
··· 648 648 649 649 void __init imx6sl_pm_init(void) 650 650 { 651 - if (cpu_is_imx6sl()) 651 + struct regmap *gpr; 652 + 653 + if (cpu_is_imx6sl()) { 652 654 imx6_pm_common_init(&imx6sl_pm_data); 653 - else 655 + } else { 654 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 657 664 void __init imx6sx_pm_init(void)
+3
include/linux/mfd/syscon/imx6q-iomuxc-gpr.h
··· 457 457 #define MCLK_DIR(x) (x == 1 ? IMX6UL_GPR1_SAI1_MCLK_DIR : x == 2 ? \ 458 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 463 #endif /* __LINUX_IMX6Q_IOMUXC_GPR_H */