bcm53xx: update patch adding fake USB doorbell

Rob suggested I should use of_machine_is_compatible insteak of a new
property and updated patch has been sent.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki 2016-12-07 09:21:11 +01:00
parent 4fbd3aa278
commit ee55a19a61

View File

@ -1,40 +1,22 @@
From 37df205cdb69d17d5e815385fc1af3c97d1fe20b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Sat, 1 Oct 2016 22:54:48 +0200
Subject: [PATCH] usb: xhci: add support for performing fake doorbell
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Broadcom's Northstar XHCI controllers seem to need a special start
procedure to work correctly. There isn't any official documentation on
procedure to work correctly. There isn't any official documentation of
this, the problem is that controller doesn't detect any connected
devices with default setup. Moreover connecting USB device to controller
that doesn't run properly can cause SoC's watchdog issues.
A workaround that was successfully tested on multiple devices is to
perform a fake doorbell. This patch adds code for doing that and a DT
binding enabling it.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
perform a fake doorbell. This patch adds code for doing this and enables
it on BCM4708 family.
---
Documentation/devicetree/bindings/usb/usb-xhci.txt | 2 +
drivers/usb/host/xhci-plat.c | 6 +++
drivers/usb/host/xhci.c | 63 ++++++++++++++++++++--
drivers/usb/host/xhci-plat.c | 6 +++++
drivers/usb/host/xhci.c | 63 +++++++++++++++++++++++++++++++++++++++++---
drivers/usb/host/xhci.h | 1 +
4 files changed, 69 insertions(+), 3 deletions(-)
3 files changed, 67 insertions(+), 3 deletions(-)
--- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
@@ -12,6 +12,8 @@ Required properties:
Optional properties:
- clocks: reference to a clock
- usb3-lpm-capable: determines if platform is USB3 LPM capable
+ - usb3-fake-doorbell: determines if controller requires a fake doorbell when
+ starting it
Example:
usb@f0931000 {
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -38,12 +38,18 @@ static const struct xhci_driver_override
@ -51,7 +33,7 @@ Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
*/
xhci->quirks |= XHCI_PLAT;
+
+ if (node && of_property_read_bool(node, "usb3-fake-doorbell"))
+ if (node && of_machine_is_compatible("brcm,bcm4708"))
+ xhci->quirks |= XHCI_FAKE_DOORBELL;
}