MLK-10461: arm: imx7: set the PFD override bit before system entering low power mode
authorBai Ping <b51503@freescale.com>
Wed, 25 Mar 2015 10:14:40 +0000 (18:14 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:47:23 +0000 (14:47 -0500)
the PFD override bit must be set before system entering any low power mode.

Signed-off-by: Bai Ping <b51503@freescale.com>
arch/arm/mach-imx/anatop.c

index 02c78ac..7f1e936 100644 (file)
@@ -82,10 +82,10 @@ static inline void imx_anatop_disconnect_high_snvs(bool enable)
 void imx_anatop_pre_suspend(void)
 {
        if (cpu_is_imx7d()) {
-               /* PLL overwrite set */
+               /* PLL and PFDs overwrite set */
                regmap_write(anatop, ANADIG_ARM_PLL + REG_SET, 1 << 20);
                regmap_write(anatop, ANADIG_DDR_PLL + REG_SET, 1 << 19);
-               regmap_write(anatop, ANADIG_SYS_PLL + REG_SET, 1 << 17);
+               regmap_write(anatop, ANADIG_SYS_PLL + REG_SET, 0x1ff << 17);
                regmap_write(anatop, ANADIG_ENET_PLL + REG_SET, 1 << 13);
                regmap_write(anatop, ANADIG_AUDIO_PLL + REG_SET, 1 << 24);
                regmap_write(anatop, ANADIG_VIDEO_PLL + REG_SET, 1 << 24);
@@ -106,10 +106,10 @@ void imx_anatop_pre_suspend(void)
 void imx_anatop_post_resume(void)
 {
        if (cpu_is_imx7d()) {
-               /* PLL overwrite set */
+               /* PLL and PFDs overwrite clear */
                regmap_write(anatop, ANADIG_ARM_PLL + REG_CLR, 1 << 20);
                regmap_write(anatop, ANADIG_DDR_PLL + REG_CLR, 1 << 19);
-               regmap_write(anatop, ANADIG_SYS_PLL + REG_CLR, 1 << 17);
+               regmap_write(anatop, ANADIG_SYS_PLL + REG_CLR, 0x1ff << 17);
                regmap_write(anatop, ANADIG_ENET_PLL + REG_CLR, 1 << 13);
                regmap_write(anatop, ANADIG_AUDIO_PLL + REG_CLR, 1 << 24);
                regmap_write(anatop, ANADIG_VIDEO_PLL + REG_CLR, 1 << 24);