[PATCH 06/20] clk: imx: pllv3: add disable() support

Lukasz Majewski
2019-12-08T14:27:02Z

On Wed, 4 Dec 2019 18:44:25 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> Add disable() support.
>
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
> drivers/clk/imx/clk-pllv3.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> 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,

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Thanks for adding this code to U-Boot.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20191208/fc9fd952/attachment.sig>