Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yoshihiro Shimoda and committed by
Felipe Balbi
e0213bc5 f14e9ad1

+5 -13
+4 -11
drivers/usb/renesas_usbhs/common.c
··· 466 466 static const struct of_device_id usbhs_of_match[] = { 467 467 { 468 468 .compatible = "renesas,usbhs-r8a7790", 469 - .data = (void *)USBHS_TYPE_R8A7790, 469 + .data = (void *)USBHS_TYPE_RCAR_GEN2, 470 470 }, 471 471 { 472 472 .compatible = "renesas,usbhs-r8a7791", 473 - .data = (void *)USBHS_TYPE_R8A7791, 473 + .data = (void *)USBHS_TYPE_RCAR_GEN2, 474 474 }, 475 475 { }, 476 476 }; ··· 497 497 if (gpio > 0) 498 498 dparam->enable_gpio = gpio; 499 499 500 - switch (dparam->type) { 501 - case USBHS_TYPE_R8A7790: 502 - case USBHS_TYPE_R8A7791: 500 + if (dparam->type == USBHS_TYPE_RCAR_GEN2) 503 501 dparam->has_usb_dmac = 1; 504 - break; 505 - default: 506 - break; 507 - } 508 502 509 503 return info; 510 504 } ··· 553 559 sizeof(struct renesas_usbhs_driver_param)); 554 560 555 561 switch (priv->dparam.type) { 556 - case USBHS_TYPE_R8A7790: 557 - case USBHS_TYPE_R8A7791: 562 + case USBHS_TYPE_RCAR_GEN2: 558 563 priv->pfunc = usbhs_rcar2_ops; 559 564 if (!priv->dparam.pipe_type) { 560 565 priv->dparam.pipe_type = usbhsc_new_pipe_type;
+1 -2
include/linux/usb/renesas_usbhs.h
··· 169 169 #define USBHS_USB_DMAC_XFER_SIZE 32 /* hardcode the xfer size */ 170 170 }; 171 171 172 - #define USBHS_TYPE_R8A7790 1 173 - #define USBHS_TYPE_R8A7791 2 172 + #define USBHS_TYPE_RCAR_GEN2 1 174 173 175 174 /* 176 175 * option: