diff options
author | Giulio Benetti <giulio.benetti@benettiengineering.com> | 2020-01-10 15:46:56 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2020-01-14 22:53:59 +0100 |
commit | cbb20014a3b06bf9d9e1a71aded08ea997fd7778 (patch) | |
tree | 37b243e606763b664869c659c473d7056a03a0b8 /drivers/clk/imx | |
parent | f4b7094250fb92d4b044674d812a71bb59cd3c11 (diff) |
clk: imx: pllv3: add disable() support
Add disable() support.
Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'drivers/clk/imx')
-rw-r--r-- | drivers/clk/imx/clk-pllv3.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-pllv3.c b/drivers/clk/imx/clk-pllv3.c index d8cbe3dd4e..9b37cd9cd9 100644 --- a/drivers/clk/imx/clk-pllv3.c +++ b/drivers/clk/imx/clk-pllv3.c @@ -54,9 +54,25 @@ static int clk_pllv3_generic_enable(struct clk *clk) return 0; } +static int clk_pllv3_generic_disable(struct clk *clk) +{ + struct clk_pllv3 *pll = to_clk_pllv3(clk); + u32 val; + + val = readl(pll->base); + if (pll->powerup_set) + val &= ~pll->power_bit; + else + val |= pll->power_bit; + writel(val, pll->base); + + return 0; +} + static const struct clk_ops clk_pllv3_generic_ops = { .get_rate = clk_pllv3_generic_get_rate, .enable = clk_pllv3_generic_enable, + .disable = clk_pllv3_generic_disable, }; struct clk *imx_clk_pllv3(enum imx_pllv3_type type, const char *name, |