Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 040d1247 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: host: xhci: Move LPM support quirk to xhci_plat_quirks"

parents bb6ff648 a4df35f9
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -38,12 +38,19 @@ static const struct xhci_driver_overrides xhci_plat_overrides __initconst = {

static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
{
	struct device_node *node = dev->of_node;
	struct usb_xhci_pdata *pdata = dev_get_platdata(dev);

	/*
	 * 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;

	if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
			(pdata && pdata->usb3_lpm_capable))
		xhci->quirks |= XHCI_LPM_SUPPORT;
}

/* called during probe() after chip reset completes */
@@ -129,7 +136,6 @@ static DEVICE_ATTR(config_imod, S_IRUGO | S_IWUSR,

static int xhci_plat_probe(struct platform_device *pdev)
{
	struct device_node	*node = pdev->dev.of_node;
	struct usb_xhci_pdata	*pdata = dev_get_platdata(&pdev->dev);
	const struct hc_driver	*driver;
	struct xhci_hcd		*xhci;
@@ -227,10 +233,6 @@ static int xhci_plat_probe(struct platform_device *pdev)

	hcd_to_bus(xhci->shared_hcd)->skip_resume = true;

	if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
			(pdata && pdata->usb3_lpm_capable))
		xhci->quirks |= XHCI_LPM_SUPPORT;

	if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
		xhci->shared_hcd->can_do_streams = 1;