Commit a877b8e5 authored by Yoshihiro Shimoda's avatar Yoshihiro Shimoda Committed by Felipe Balbi

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: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent e9365099
...@@ -519,8 +519,11 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev) ...@@ -519,8 +519,11 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
dparam->enable_gpio = gpio; dparam->enable_gpio = gpio;
if (dparam->type == USBHS_TYPE_RCAR_GEN2 || 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->has_usb_dmac = 1;
dparam->pipe_configs = usbhsc_new_pipe;
dparam->pipe_size = ARRAY_SIZE(usbhsc_new_pipe);
}
return info; return info;
} }
...@@ -577,17 +580,9 @@ static int usbhs_probe(struct platform_device *pdev) ...@@ -577,17 +580,9 @@ static int usbhs_probe(struct platform_device *pdev)
switch (priv->dparam.type) { switch (priv->dparam.type) {
case USBHS_TYPE_RCAR_GEN2: case USBHS_TYPE_RCAR_GEN2:
priv->pfunc = usbhs_rcar2_ops; 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; break;
case USBHS_TYPE_RCAR_GEN3: case USBHS_TYPE_RCAR_GEN3:
priv->pfunc = usbhs_rcar3_ops; 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; break;
default: default:
if (!info->platform_callback.get_id) { if (!info->platform_callback.get_id) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment