clk: g12a: clear pcie cntl5 for save power [1/1]
authorShunzhou Jiang <shunzhou.jiang@amlogic.com>
Thu, 24 Jan 2019 01:46:06 +0000 (09:46 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 26 Feb 2019 02:08:05 +0000 (18:08 -0800)
PD#SWPL-4583

Problem:
cntl5 caused power increase

Solution:
clear pcie cntl5 when pcie clk disabled

Verify:
test pass on g12a skt

Change-Id: I495590af2ccb81eb5ae90c86008679def8673a70
Signed-off-by: Shunzhou Jiang <shunzhou.jiang@amlogic.com>
drivers/amlogic/clk/g12a/g12a_clk-pll.c

index 858a088..ae48c82 100644 (file)
@@ -524,6 +524,11 @@ static void meson_g12a_pll_disable(struct clk_hw *hw)
        writel(readl(pll->base + p->reg_off) & (~MESON_PLL_ENABLE),
                pll->base + p->reg_off);
 
+       if (!strcmp(clk_hw_get_name(hw), "pcie_pll")) {
+               writel(0x20000060,
+                      pll->base + p->reg_off + 0x14);
+       }
+
        if (pll->lock)
                spin_unlock_irqrestore(pll->lock, flags);
 }