/* called during probe() after chip reset completes */ static int xhci_plat_setup(struct usb_hcd *hcd) { struct device_node *of_node = hcd->self.controller->of_node; int ret; #ifdef CONFIG_SSUSB_MTK_XHCI struct xhci_hcd *xhci; #endif if (of_device_is_compatible(of_node, "renesas,xhci-r8a7790") || of_device_is_compatible(of_node, "renesas,xhci-r8a7791")) { ret = xhci_rcar_init_quirk(hcd); if (ret) return ret; } #ifdef CONFIG_SSUSB_MTK_XHCI ret = xhci_gen_setup(hcd, xhci_plat_quirks); if (ret) return ret; if (!usb_hcd_is_primary_hcd(hcd)) return 0; xhci = hcd_to_xhci(hcd); ret = xhci_mtk_init_quirk(xhci); if (ret) { kfree(xhci); return ret; } return ret; #else return xhci_gen_setup(hcd, xhci_plat_quirks); #endif }
/* called during probe() after chip reset completes */ static int xhci_plat_setup(struct usb_hcd *hcd) { int ret; if (xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_RENESAS_RCAR_GEN2) || xhci_plat_type_is(hcd, XHCI_PLAT_TYPE_RENESAS_RCAR_GEN3)) { ret = xhci_rcar_init_quirk(hcd); if (ret) return ret; } return xhci_gen_setup(hcd, xhci_plat_quirks); }
/* called during probe() after chip reset completes */ static int xhci_plat_setup(struct usb_hcd *hcd) { struct device_node *of_node = hcd->self.controller->of_node; int ret; if (of_device_is_compatible(of_node, "renesas,xhci-r8a7790") || of_device_is_compatible(of_node, "renesas,xhci-r8a7791")) { ret = xhci_rcar_init_quirk(hcd); if (ret) return ret; } return xhci_gen_setup(hcd, xhci_plat_quirks); }