Skip to content

Commit e0213bc

Browse files
shimodayFelipe Balbi
authored andcommitted
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>
1 parent f14e9ad commit e0213bc

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

drivers/usb/renesas_usbhs/common.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -466,11 +466,11 @@ static int usbhsc_drvcllbck_notify_hotplug(struct platform_device *pdev)
466466
static const struct of_device_id usbhs_of_match[] = {
467467
{
468468
.compatible = "renesas,usbhs-r8a7790",
469-
.data = (void *)USBHS_TYPE_R8A7790,
469+
.data = (void *)USBHS_TYPE_RCAR_GEN2,
470470
},
471471
{
472472
.compatible = "renesas,usbhs-r8a7791",
473-
.data = (void *)USBHS_TYPE_R8A7791,
473+
.data = (void *)USBHS_TYPE_RCAR_GEN2,
474474
},
475475
{ },
476476
};
@@ -497,14 +497,8 @@ static struct renesas_usbhs_platform_info *usbhs_parse_dt(struct device *dev)
497497
if (gpio > 0)
498498
dparam->enable_gpio = gpio;
499499

500-
switch (dparam->type) {
501-
case USBHS_TYPE_R8A7790:
502-
case USBHS_TYPE_R8A7791:
500+
if (dparam->type == USBHS_TYPE_RCAR_GEN2)
503501
dparam->has_usb_dmac = 1;
504-
break;
505-
default:
506-
break;
507-
}
508502

509503
return info;
510504
}
@@ -559,8 +553,7 @@ static int usbhs_probe(struct platform_device *pdev)
559553
sizeof(struct renesas_usbhs_driver_param));
560554

561555
switch (priv->dparam.type) {
562-
case USBHS_TYPE_R8A7790:
563-
case USBHS_TYPE_R8A7791:
556+
case USBHS_TYPE_RCAR_GEN2:
564557
priv->pfunc = usbhs_rcar2_ops;
565558
if (!priv->dparam.pipe_type) {
566559
priv->dparam.pipe_type = usbhsc_new_pipe_type;

include/linux/usb/renesas_usbhs.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,7 @@ struct renesas_usbhs_driver_param {
169169
#define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */
170170
};
171171

172-
#define USBHS_TYPE_R8A7790 1
173-
#define USBHS_TYPE_R8A7791 2
172+
#define USBHS_TYPE_RCAR_GEN2 1
174173

175174
/*
176175
* option:

0 commit comments

Comments
 (0)