Re: [PATCH v4 4/6] usb: renesas_usbhs: Update usbhs pipe configuration for RZ/G2L family

Geert Uytterhoeven <[email protected]>
Newsgroups gmane.linux.kernel.renesas-soc,gmane.linux.usb.general,gmane.linux.ports.sh.devel
Message-ID <CAMuHMdUqgBWmb1ovwDn+Xx0RVLdBCAZnSj48Dse6YPNDx1A6Pg@mail.gmail.com>
Hi Biju,

On Mon, Mar 18, 2024 at 6:33 PM Biju Das <[email protected]> wrote:
> The RZ/G2L family SoCs has 10 pipe buffers compared to 16 pipe buffers on
> RZ/A2M. Update the pipe configuration for RZ/G2L family SoCs and use
> family SoC specific compatible to handle this difference.
>
> The pipe configuration of RZ/G2L is same as usbhsc_rzg2l_default_pipe[],
> so select the default pipe configuration for RZ/G2L SoCs by setting
> .has_new_pipe_configs to zero.
>
> Add SoC specific compatible to OF table to avoid ABI breakage with old
> DTB. To optimize memory usage the SoC specific compatible will be removed
> later.
>
> Based on the patch in BSP by Huy Nguyen <[email protected]>
>
> Signed-off-by: Biju Das <[email protected]>
> ---
> v3->v4:
>  * Credit  Huy Nguyen's work in the commit message and dropped his name
>    from Signed-off-by tag.
>  * Selection of usbhsc_rzg2l_default_pipe[] by setting the variable
>    has_new_pipe_configs to zero.
>  * Updated commit description.

Thanks for the update!

>  * Dropped the check 'priv->dparam.pipe_configs' as it is same as
>    checking !has_new_pipe_configs.

I disagree: it is used to specify the pipe config through platform
data on non-DT platforms.  There don't seem to be any upstream SH
platforms doing that, though.

> --- a/drivers/usb/renesas_usbhs/common.c
> +++ b/drivers/usb/renesas_usbhs/common.c

> @@ -642,7 +658,7 @@ static int usbhs_probe(struct platform_device *pdev)
>         if (usbhs_get_dparam(priv, has_new_pipe_configs)) {
>                 priv->dparam.pipe_configs = usbhsc_new_pipe;
>                 priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_new_pipe);
> -       } else if (!priv->dparam.pipe_configs) {
> +       } else {

Hence I'd rather drop this check.

>                 priv->dparam.pipe_configs = usbhsc_default_pipe;
>                 priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_default_pipe);
>         }

The rest LGTM.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.