lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdVxOg3Yh1JxsJuga_qz=98kp5kv8JGg_yk0=HiKop8o5Q@mail.gmail.com>
Date: Thu, 2 Jan 2025 20:30:41 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Rohit Visavalia <rohit.visavalia@....com>
Cc: mturquette@...libre.com, sboyd@...nel.org, michal.simek@....com, 
	vishal.sagar@....com, javier.carrasco.cruz@...il.com, geert+renesas@...der.be, 
	u.kleine-koenig@...libre.com, linux-clk@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] clk: xilinx: vcu: Update vcu init/reset sequence

Hi Rohit,

On Thu, Jan 2, 2025 at 6:04 PM Rohit Visavalia <rohit.visavalia@....com> wrote:
> Updated vcu init/reset sequence as per design changes.
> If VCU reset GPIO is available then do assert and de-assert it before
> enabling/disabling gasket isolation.
> This GPIO is added because gasket isolation will be removed during startup
> that requires access to SLCR register space. Post startup, the ownership of
> the register interface lies with logiCORE IP.
>
> Signed-off-by: Rohit Visavalia <rohit.visavalia@....com>
> ---
> Changes in v2:
>   - Changed patches sequence to have patches with "Fixes" as preceding in order
>   - Used dev_err_probe()
>   - Moved warning to dev_dbg() and updated print with more detail

Thanks for the update!

> --- a/drivers/clk/xilinx/xlnx_vcu.c
> +++ b/drivers/clk/xilinx/xlnx_vcu.c
> @@ -676,6 +679,24 @@ static int xvcu_probe(struct platform_device *pdev)
>          * Bit 0 : Gasket isolation
>          * Bit 1 : put VCU out of reset
>          */
> +       xvcu->reset_gpio = devm_gpiod_get_optional(&pdev->dev, "reset",
> +                                                  GPIOD_OUT_LOW);

This requires updating the DT bindings _first_.

> +       if (IS_ERR(xvcu->reset_gpio)) {
> +               ret = PTR_ERR(xvcu->reset_gpio);
> +               dev_err_probe(&pdev->dev, ret, "failed to get reset gpio for vcu.\n");
> +               goto error_get_gpio;
> +       }
> +
> +       if (xvcu->reset_gpio) {
> +               gpiod_set_value(xvcu->reset_gpio, 0);
> +               /* min 2 clock cycle of vcu pll_ref, slowest freq is 33.33KHz */
> +               usleep_range(60, 120);
> +               gpiod_set_value(xvcu->reset_gpio, 1);
> +               usleep_range(60, 120);
> +       } else {
> +               dev_dbg(&pdev->dev, "No reset gpio info found in dts for VCU. This may result in incorrect functionality if VCU isolation is removed after initialization in designs where the VCU reset is driven by gpio.\n");
> +       }
> +
>         regmap_write(xvcu->logicore_reg_ba, VCU_GASKET_INIT, VCU_GASKET_VALUE);
>
>         ret = xvcu_register_clock_provider(xvcu);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ