usb: renesas_usbhs: Change USBHS_TYPE_R8A779x to USBHS_TYPE_RCAR_GEN2

Since the HSUSB controllers of R-Car Gen2 are the same specification
(they have 16 pipes and usb-dmac), this patch changes USBHS_TYPE_R8A7790
and USBHS_TYPE_R8A7791 to USBHS_TYPE_RCAR_GEN2.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:
Yoshihiro Shimoda 2015-05-18 20:04:14 +09:00 committed by Felipe Balbi
parent f14e9ad17f
commit e0213bc546
2 changed files with 5 additions and 13 deletions

View file

@ -466,11 +466,11 @@ static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev)
static const struct of_device_id usbhs_of_match[] = { static const struct of_device_id usbhs_of_match[] = {
{ {
.compatible = "renesas,usbhs-r8a7790", .compatible = "renesas,usbhs-r8a7790",
.data = (void *)USBHS_TYPE_R8A7790, .data = (void *)USBHS_TYPE_RCAR_GEN2,
}, },
{ {
.compatible = "renesas,usbhs-r8a7791", .compatible = "renesas,usbhs-r8a7791",
.data = (void *)USBHS_TYPE_R8A7791, .data = (void *)USBHS_TYPE_RCAR_GEN2,
}, },
{ }, { },
}; };
@ -497,14 +497,8 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
if (gpio > 0) if (gpio > 0)
dparam->enable_gpio = gpio; dparam->enable_gpio = gpio;
switch (dparam->type) { if (dparam->type == USBHS_TYPE_RCAR_GEN2)
case USBHS_TYPE_R8A7790:
case USBHS_TYPE_R8A7791:
dparam->has_usb_dmac = 1; dparam->has_usb_dmac = 1;
break;
default:
break;
}
return info; return info;
} }
@ -559,8 +553,7 @@ static int usbhs_probe(struct platform_device *pdev)
sizeof(struct renesas_usbhs_driver_param)); sizeof(struct renesas_usbhs_driver_param));
switch (priv->dparam.type) { switch (priv->dparam.type) {
case USBHS_TYPE_R8A7790: case USBHS_TYPE_RCAR_GEN2:
case USBHS_TYPE_R8A7791:
priv->pfunc = usbhs_rcar2_ops; priv->pfunc = usbhs_rcar2_ops;
if (!priv->dparam.pipe_type) { if (!priv->dparam.pipe_type) {
priv->dparam.pipe_type = usbhsc_new_pipe_type; priv->dparam.pipe_type = usbhsc_new_pipe_type;

View file

@ -169,8 +169,7 @@ struct renesas_usbhs_driver_param {
#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */ #define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */
}; };
#define USBHS_TYPE_R8A7790 1 #define USBHS_TYPE_RCAR_GEN2 1
#define USBHS_TYPE_R8A7791 2
/* /*
* option: * option: