/* * - The V3 firmware is for all R-Car Gen3 * - The V2 firmware is possible to use on R-Car Gen2. However, the V2 causes * performance degradation. So, this driver continues to use the V1 if R-Car * Gen2. * - The V1 firmware is impossible to use on R-Car Gen3.
*/
MODULE_FIRMWARE(XHCI_RCAR_FIRMWARE_NAME_V1);
MODULE_FIRMWARE(XHCI_RCAR_FIRMWARE_NAME_V3);
/*** Register Offset ***/ #define RCAR_USB3_AXH_STA 0x104 /* AXI Host Control Status */ #define RCAR_USB3_INT_ENA 0x224 /* Interrupt Enable */ #define RCAR_USB3_DL_CTRL 0x250 /* FW Download Control & Status */ #define RCAR_USB3_FW_DATA0 0x258 /* FW Data0 */
/* * According to the datasheet, "Upon the completion of FW Download, * there is no need to write or reload FW".
*/ if (readl(regs + RCAR_USB3_DL_CTRL) & RCAR_USB3_DL_CTRL_FW_SUCCESS) return 0;
/* This function needs to initialize a "phy" of usb before */ staticint xhci_rcar_init_quirk(struct usb_hcd *hcd)
{ /* If hcd->regs is NULL, we don't just call the following function */ if (!hcd->regs) return 0;
if (!xhci_rcar_wait_for_pll_active(hcd)) return -ETIMEDOUT;
return xhci_rcar_download_firmware(hcd);
}
staticint xhci_rcar_resume_quirk(struct usb_hcd *hcd)
{ int ret;
ret = xhci_rcar_download_firmware(hcd); if (!ret)
xhci_rcar_start(hcd);
return ret;
}
/* * On R-Car Gen2 and Gen3, the AC64 bit (bit 0) of HCCPARAMS1 is set * to 1. However, these SoCs don't support 64-bit address memory * pointers. So, this driver clears the AC64 bit of xhci->hcc_params * to call dma_set_coherent_mask(dev, DMA_BIT_MASK(32)) in * xhci_gen_setup() by using the XHCI_NO_64BIT_SUPPORT quirk. * * And, since the firmware/internal CPU control the USBSTS.STS_HALT * and the process speed is down when the roothub port enters U3, * long delay for the handshake of STS_HALT is neeed in xhci_suspend() * by using the XHCI_SLOW_SUSPEND quirk.
*/ #define SET_XHCI_PLAT_PRIV_FOR_RCAR(firmware) \
.firmware_name = firmware, \
.quirks = XHCI_NO_64BIT_SUPPORT | XHCI_SLOW_SUSPEND, \
.init_quirk = xhci_rcar_init_quirk, \
.plat_start = xhci_rcar_start, \
.resume_quirk = xhci_rcar_resume_quirk,
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.