Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932429AbbBQFmM (ORCPT ); Tue, 17 Feb 2015 00:42:12 -0500 Received: from mail-pd0-f169.google.com ([209.85.192.169]:41107 "EHLO mail-pd0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932211AbbBQFmA (ORCPT ); Tue, 17 Feb 2015 00:42:00 -0500 From: Sneeker Yeh X-Google-Original-From: Sneeker Yeh To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Felipe Balbi , Greg Kroah-Hartman , Mathias Nyman , Grant Likely , Huang Rui , Kishon Vijay Abraham I , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-omap@vger.kernel.org Cc: Andy Green , Jassi Brar , Sneeker Yeh Subject: [PATCH v4 2/5] xhci: Platform: Set Synopsis device disconnection quirk based on platform data Date: Tue, 17 Feb 2015 13:41:34 +0800 Message-Id: <1424151697-2084-3-git-send-email-Sneeker.Yeh@tw.fujitsu.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1424151697-2084-1-git-send-email-Sneeker.Yeh@tw.fujitsu.com> References: <1424151697-2084-1-git-send-email-Sneeker.Yeh@tw.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1743 Lines: 50 If an xhci platform has Synopsis device disconnection errata then enable XHCI_DISCONNECT_QUIRK quirk flag. Signed-off-by: Sneeker Yeh --- drivers/usb/host/xhci-plat.c | 3 +++ include/linux/usb/xhci_pdriver.h | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 08d402b..40beb95 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -147,6 +147,9 @@ static int xhci_plat_probe(struct platform_device *pdev) if ((node && of_property_read_bool(node, "usb3-lpm-capable")) || (pdata && pdata->usb3_lpm_capable)) xhci->quirks |= XHCI_LPM_SUPPORT; + + if (pdata && pdata->delay_portcsc_clear) + xhci->quirks |= XHCI_DISCONNECT_QUIRK; /* * Set the xHCI pointer before xhci_plat_setup() (aka hcd_driver.reset) * is called by usb_add_hcd(). diff --git a/include/linux/usb/xhci_pdriver.h b/include/linux/usb/xhci_pdriver.h index 376654b..a37a3a5 100644 --- a/include/linux/usb/xhci_pdriver.h +++ b/include/linux/usb/xhci_pdriver.h @@ -18,10 +18,14 @@ * * @usb3_lpm_capable: determines if this xhci platform supports USB3 * LPM capability + * @delay_portcsc_clear: determines if Synopsis USB3 core has errata in + * "DWC_USB3_SUSPEND_ON_DISCONNECT_EN=1" hardware + * configuration. * */ struct usb_xhci_pdata { unsigned usb3_lpm_capable:1; + unsigned delay_portcsc_clear:1; }; #endif /* __USB_CORE_XHCI_PDRIVER_H */ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/