/* called during probe() after chip reset completes */ static int xhci_mtk_setup(struct usb_hcd *hcd) { struct xhci_hcd *xhci = hcd_to_xhci(hcd); struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); int ret; if (usb_hcd_is_primary_hcd(hcd)) { ret = xhci_mtk_ssusb_config(mtk); if (ret) return ret; } ret = xhci_gen_setup(hcd, xhci_mtk_quirks); if (ret) return ret; if (usb_hcd_is_primary_hcd(hcd)) { mtk->num_u3_ports = xhci->num_usb3_ports; mtk->num_u2_ports = xhci->num_usb2_ports; ret = xhci_mtk_sch_init(mtk); if (ret) return ret; } return ret; }
/* called during probe() after chip reset completes */ static int xhci_mtk_setup(struct usb_hcd *hcd) { struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); int ret; if (usb_hcd_is_primary_hcd(hcd)) { ret = xhci_mtk_ssusb_config(mtk); if (ret) return ret; ret = xhci_mtk_sch_init(mtk); if (ret) return ret; } return xhci_gen_setup(hcd, xhci_mtk_quirks); }
static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci) { struct usb_hcd *hcd = xhci_to_hcd(xhci); struct xhci_hcd_mtk *mtk = hcd_to_mtk(hcd); /* * As of now platform drivers don't provide MSI support so we ensure * here that the generic code does not try to make a pci_dev from our * dev struct in order to setup MSI */ xhci->quirks |= XHCI_PLAT; xhci->quirks |= XHCI_MTK_HOST; /* * MTK host controller gives a spurious successful event after a * short transfer. Ignore it. */ xhci->quirks |= XHCI_SPURIOUS_SUCCESS; if (mtk->lpm_support) xhci->quirks |= XHCI_LPM_SUPPORT; }