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] [day] [month] [year] [list]
Message-ID: <CAMuHMdUpKn8ByG_2+h+c=oSq_euCOdGvUaM2P1pa-VWDQrT7Kg@mail.gmail.com>
Date: Wed, 30 Jul 2025 15:24:16 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Magnus Damm <damm@...nsource.se>
Cc: linux-renesas-soc@...r.kernel.org, robh@...nel.org, 
	geert+renesas@...der.be, devicetree@...r.kernel.org, conor+dt@...nel.org, 
	krzk@...nel.org, linux-kernel@...r.kernel.org, 
	wsa+renesas@...g-engineering.com, sergei.shtylyov@...il.com, 
	p.zabel@...gutronix.de
Subject: Re: [PATCH v2 3/4] memory: renesas-rpc-if: Add RZ/A1 and RZ/A2 support

Hi Magnus,

On Sat, 12 Jul 2025 at 15:39, Magnus Damm <damm@...nsource.se> wrote:
> From: Magnus Damm <damm@...nsource.se>
>
> Add RZ/A1 and RZ/A2 compat strings to the rpc-if driver. Also make the
> reset controller optional. This is because RZ/A1 does not have any reset
> bits assigned to the device so there is no reset controller available.
>
> Signed-off-by: Magnus Damm <damm@...nsource.se>

Thanks for your patch!

> --- 0001/drivers/memory/renesas-rpc-if.c
> +++ work/drivers/memory/renesas-rpc-if.c        2025-07-11 03:45:25.605098312 +0900
> @@ -234,7 +234,7 @@ static int rpcif_hw_init_impl(struct rpc
>         int ret;
>
>         if (rpc->info->type == RPCIF_RZ_G2L) {
> -               ret = reset_control_reset(rpc->rstc);
> +               ret = rpc->rstc ? reset_control_reset(rpc->rstc) : 0;

No need for this, as reset_control_reset() does nothing in case
an optional reset is not present.

>                 if (ret)
>                         return ret;
>                 usleep_range(200, 300);
> @@ -614,7 +614,7 @@ static int rpcif_manual_xfer_impl(struct
>         return ret;
>
>  err_out:
> -       if (reset_control_reset(rpc->rstc))
> +       if (rpc->rstc && reset_control_reset(rpc->rstc))

Likewise.

>                 dev_err(rpc->dev, "Failed to reset HW\n");
>         rpcif_hw_init_impl(rpc, rpc->bus_size == 2);
>         return ret;
> @@ -1017,7 +1017,7 @@ static int rpcif_probe(struct platform_d
>         rpc->size = resource_size(res);
>         rpc->rstc = devm_reset_control_array_get_exclusive(dev);
>         if (IS_ERR(rpc->rstc))
> -               return PTR_ERR(rpc->rstc);
> +               rpc->rstc = NULL;

Errors should be propagated correctly, also for probe deferral.
devm_reset_control_array_get_optional_exclusive() is what you are
looking for. You can enforce the presence of the resets where needed
through the DT bindings.

>
>         /*
>          * The enabling/disabling of spi/spix2 clocks at runtime leading to


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