]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/clk/rockchip/clk-rk3288.c
clk: rockchip: Turn on "aclk_dmac1" for suspend on rk3288
[mirror_ubuntu-bionic-kernel.git] / drivers / clk / rockchip / clk-rk3288.c
index 64191694ff6e9684c3e5145b66d10a99505ea11e..9cfdbea493bb37926c2ab9a190cbeae227a8c020 100644 (file)
@@ -835,6 +835,9 @@ static const int rk3288_saved_cru_reg_ids[] = {
        RK3288_CLKSEL_CON(10),
        RK3288_CLKSEL_CON(33),
        RK3288_CLKSEL_CON(37),
+
+       /* We turn aclk_dmac1 on for suspend; this will restore it */
+       RK3288_CLKGATE_CON(10),
 };
 
 static u32 rk3288_saved_cru_regs[ARRAY_SIZE(rk3288_saved_cru_reg_ids)];
@@ -850,6 +853,14 @@ static int rk3288_clk_suspend(void)
                                readl_relaxed(rk3288_cru_base + reg_id);
        }
 
+       /*
+        * Going into deep sleep (specifically setting PMU_CLR_DMA in
+        * RK3288_PMU_PWRMODE_CON1) appears to fail unless
+        * "aclk_dmac1" is on.
+        */
+       writel_relaxed(1 << (12 + 16),
+                      rk3288_cru_base + RK3288_CLKGATE_CON(10));
+
        /*
         * Switch PLLs other than DPLL (for SDRAM) to slow mode to
         * avoid crashes on resume. The Mask ROM on the system will