diff options
author | Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> | 2017-10-03 14:09:13 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-10-19 10:38:06 +0300 |
commit | a877b8e553fd2808e8693c75e0d945f413ccf5b6 (patch) | |
tree | febc5a61b4f8691033af1d4d155ed84e1484d9be /drivers/usb/renesas_usbhs | |
parent | e93650994a955f8cd966916c4e980e822123d07a (diff) | |
download | linux-a877b8e553fd2808e8693c75e0d945f413ccf5b6.tar.xz |
usb: renesas_usbhs: unify Gen2/3 pipe_config setting
This patch unifies the Gen2 and Gen3 pipe_config setting on
usbhs_parse_dt().
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/renesas_usbhs')
-rw-r--r-- | drivers/usb/renesas_usbhs/common.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c index f0ce304c5aaf..2a860e496b4f 100644 --- a/drivers/usb/renesas_usbhs/common.c +++ b/drivers/usb/renesas_usbhs/common.c @@ -519,8 +519,11 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev) dparam->enable_gpio = gpio; if (dparam->type == USBHS_TYPE_RCAR_GEN2 || - dparam->type == USBHS_TYPE_RCAR_GEN3) + dparam->type == USBHS_TYPE_RCAR_GEN3) { dparam->has_usb_dmac = 1; + dparam->pipe_configs = usbhsc_new_pipe; + dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe); + } return info; } @@ -577,17 +580,9 @@ static int usbhs_probe(struct platform_device *pdev) switch (priv->dparam.type) { case USBHS_TYPE_RCAR_GEN2: priv->pfunc = usbhs_rcar2_ops; - if (!priv->dparam.pipe_configs) { - priv->dparam.pipe_configs = usbhsc_new_pipe; - priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_new_pipe); - } break; case USBHS_TYPE_RCAR_GEN3: priv->pfunc = usbhs_rcar3_ops; - if (!priv->dparam.pipe_configs) { - priv->dparam.pipe_configs = usbhsc_new_pipe; - priv->dparam.pipe_size = ARRAY_SIZE(usbhsc_new_pipe); - } break; default: if (!info->platform_callback.get_id) { |