Re: [PATCH v2 11/15] usb: renesas_usbhs: Add support for RZ/A2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

On Thu, May 9, 2019 at 10:14 PM Chris Brandt <chris.brandt@xxxxxxxxxxx> wrote:
> The RZ/A2 is similar to the R-Car Gen3 with some small differences.
>
> Signed-off-by: Chris Brandt <chris.brandt@xxxxxxxxxxx>

Thanks for your patch!

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

> @@ -614,7 +618,8 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
>                 dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe);
>         }
>
> -       if (dparam->type == USBHS_TYPE_RZA1) {
> +       if (dparam->type == USBHS_TYPE_RZA1 ||
> +           dparam->type == USBHS_TYPE_RZA2) {
>                 dparam->pipe_configs = usbhsc_new_pipe;
>                 dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe);

The above two lines are also present in the block for R-Car Gen2/3 above.
Perhaps they can just be moved out, and executed unconditionally?
That leaves R-Car with just the has_usb_dmac feature flag.

BTW, this driver uses a mix of feature checking using USBHS_TYPE_*
enums, and a parameter block/callback struct
(renesas_usbhs_platform_callback).  Perhaps the feature flags can just
be moved to the struct, and the various structs referenced from
of_device_id.data?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux