Commit 074811c3 authored by Dong Aisheng's avatar Dong Aisheng Committed by Kleber Sacilotto de Souza

clk: imx: clk-pllv3: fix incorrect handle of enet powerdown bit

BugLink: https://bugs.launchpad.net/bugs/1878232

commit b3e76bdc upstream.

After commit f5394745 ("ARM: clk: imx: update pllv3 to support imx7"),
the former used BM_PLL_POWER bit is not correct anymore for IMX7 ENET.
Instead, pll->powerdown holds the correct bit, so using powerdown bit
in clk_pllv3_{prepare | unprepare} functions.

Fixes: f5394745 ("ARM: clk: imx: update pllv3 to support imx7")
Signed-off-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: default avatarShawn Guo <shawnguo@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarIan May <ian.may@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 2b51a2c3
......@@ -76,9 +76,9 @@ static int clk_pllv3_prepare(struct clk_hw *hw)
val = readl_relaxed(pll->base);
if (pll->powerup_set)
val |= BM_PLL_POWER;
val |= pll->powerdown;
else
val &= ~BM_PLL_POWER;
val &= ~pll->powerdown;
writel_relaxed(val, pll->base);
return clk_pllv3_wait_lock(pll);
......@@ -91,9 +91,9 @@ static void clk_pllv3_unprepare(struct clk_hw *hw)
val = readl_relaxed(pll->base);
if (pll->powerup_set)
val &= ~BM_PLL_POWER;
val &= ~pll->powerdown;
else
val |= BM_PLL_POWER;
val |= pll->powerdown;
writel_relaxed(val, pll->base);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment