[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1541772120-40394-4-git-send-email-alcooperx@gmail.com>
Date: Fri, 9 Nov 2018 09:01:58 -0500
From: Al Cooper <alcooperx@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Al Cooper <alcooperx@...il.com>,
Alan Stern <stern@...land.harvard.edu>,
Alban Bedel <albeu@...e.fr>, Alex Elder <elder@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Avi Fishman <avifishman70@...il.com>,
bcm-kernel-feedback-list@...adcom.com,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
"David S. Miller" <davem@...emloft.net>,
devicetree@...r.kernel.org, Dmitry Osipenko <digetx@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
Hans de Goede <hdegoede@...hat.com>,
James Hogan <jhogan@...nel.org>,
Johan Hovold <johan@...nel.org>,
Kees Cook <keescook@...omium.org>, linux-usb@...r.kernel.org,
Lu Baolu <baolu.lu@...ux.intel.com>,
Mark Rutland <mark.rutland@....com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Mathias Nyman <mathias.nyman@...el.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Rishabh Bhatnagar <rishabhb@...eaurora.org>,
Rob Herring <robh+dt@...nel.org>, Roger Quadros <rogerq@...com>
Subject: [PATCH V4 3/5] usb: xhci: xhci-plat: Add support for Broadcom STB SoC's
Add support for Broadcom STB SoC's to the xhci platform driver
Signed-off-by: Al Cooper <alcooperx@...il.com>
---
drivers/usb/host/xhci-brcm.c | 16 ++++++++++++++++
drivers/usb/host/xhci-brcm.h | 16 ++++++++++++++++
drivers/usb/host/xhci-plat.c | 8 ++++++++
3 files changed, 40 insertions(+)
create mode 100644 drivers/usb/host/xhci-brcm.c
create mode 100644 drivers/usb/host/xhci-brcm.h
diff --git a/drivers/usb/host/xhci-brcm.c b/drivers/usb/host/xhci-brcm.c
new file mode 100644
index 000000000000..bf8c0bfd1780
--- /dev/null
+++ b/drivers/usb/host/xhci-brcm.c
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/* Copyright (c) 2018, Broadcom */
+
+#include <linux/usb.h>
+#include <linux/usb/hcd.h>
+
+#include "xhci.h"
+
+int xhci_plat_brcm_init_quirk(struct usb_hcd *hcd)
+{
+ struct xhci_hcd *xhci = hcd_to_xhci(hcd);
+
+ xhci->quirks |= XHCI_RESET_ON_RESUME;
+ return 0;
+}
+
diff --git a/drivers/usb/host/xhci-brcm.h b/drivers/usb/host/xhci-brcm.h
new file mode 100644
index 000000000000..e64800fae4d5
--- /dev/null
+++ b/drivers/usb/host/xhci-brcm.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* Copyright (c) 2018, Broadcom */
+
+#ifndef _XHCI_BRCM_H
+#define _XHCI_BRCM_H
+
+#if IS_ENABLED(CONFIG_USB_XHCI_BRCM)
+int xhci_plat_brcm_init_quirk(struct usb_hcd *hcd);
+#else
+static inline int xhci_plat_brcm_init_quirk(struct usb_hcd *hcd)
+{
+ return 0;
+}
+#endif
+#endif /* _XHCI_BRCM_H */
+
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 32b5574ad5c5..5372d4040be6 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -24,6 +24,7 @@
#include "xhci-plat.h"
#include "xhci-mvebu.h"
#include "xhci-rcar.h"
+#include "xhci-brcm.h"
static struct hc_driver __read_mostly xhci_plat_hc_driver;
@@ -112,6 +113,10 @@ static int xhci_plat_start(struct usb_hcd *hcd)
.resume_quirk = xhci_rcar_resume_quirk,
};
+static const struct xhci_plat_priv xhci_plat_brcm = {
+ .init_quirk = xhci_plat_brcm_init_quirk
+};
+
static const struct of_device_id usb_xhci_of_match[] = {
{
.compatible = "generic-xhci",
@@ -144,6 +149,9 @@ static int xhci_plat_start(struct usb_hcd *hcd)
}, {
.compatible = "renesas,rcar-gen3-xhci",
.data = &xhci_plat_renesas_rcar_gen3,
+ }, {
+ .compatible = "brcm,bcm7445-xhci",
+ .data = &xhci_plat_brcm,
},
{},
};
--
1.9.0.138.g2de3478
Powered by blists - more mailing lists