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)
committerLuan Yuan <luan.yuan@amlogic.com>
Wed, 13 Mar 2019 12:22:41 +0000 (20:22 +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 0f67ff3..505a6aa 100644 (file)
@@ -536,6 +536,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);
 }