From patchwork Wed Oct 17 22:29:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10646143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F13171508 for ; Wed, 17 Oct 2018 22:30:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2D35285A2 for ; Wed, 17 Oct 2018 22:30:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D672028751; Wed, 17 Oct 2018 22:30:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C79F285A2 for ; Wed, 17 Oct 2018 22:30:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727348AbeJRG1s (ORCPT ); Thu, 18 Oct 2018 02:27:48 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:45045 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727082AbeJRG1s (ORCPT ); Thu, 18 Oct 2018 02:27:48 -0400 Received: by mail-pf1-f193.google.com with SMTP id r9-v6so13861759pff.11; Wed, 17 Oct 2018 15:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Q13zyxjtLMGSvq8CStH7nEQVSyTKekwyvItSN2Yi5X8=; b=rXzBEFOCXmSuTpy86h+k29rs6cpy+aXNQnInZy+sVSGhqkkG3RwBXoqWXKFiUoILbG 7wdTAO+RqFJkduxvF2rYFVTlZciqM0gKzkZ4wq5odC92Q4bY23cIKyOIisgRznLa8EI0 gUeGJmOcWjsD3AtJ7wY36La7ySulKMQtjulat7XrQ4rKafm0uCXg0zi0JkqY6Tqv/y+C AnO2WWmSIy8NXBim9rQD9/tTHuM307yVg7f/ckulZrD4i6GHRgbYjafca1APPThRhCu4 77hdVqkEZv2z1EBen2Zrjpgs0QBt+c/22RFBNl27csCkkvtyVdUOP8x0AnJQsBPGYqMP UoVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Q13zyxjtLMGSvq8CStH7nEQVSyTKekwyvItSN2Yi5X8=; b=PtpYlciSW5yTzH1C4fgYynvdyvMHE/PTVM/qLfCwiTRAjHMiCEILo/uet7mt2OXVNb brwak/c4N1KFapBvoDaHN+f4OIBcQg4G7cEaUh5vWNK6yYpeNdy5UZ3zhSa5cB2M/2ye /arcCkU2rLq5uWpX5YK9AEcVaj1EV1oitqNgzlWjz+G6xPoNX4VfC/FaiPANWlV3Zgea 1D3LFY2eglbiqCDvwjg92zw5Ed7Lh9pUjNdAHXL43VBhnuutL/VDooSaqfMAlMIhdKkw YEalToQMnq0V1y0qgRH/uQkvcPN2kV7x1v7mBEPi2pRHVHXfbrXnm1kpw+eumk7u8dBj gzeA== X-Gm-Message-State: ABuFfohGqbDQtvR0nEBTAx8SbMxlIyD6t0MfSbeVjKDVLrmajRgaU600 ZNmieVm1r46mC5gBN2pol/qiTAmXxM0= X-Google-Smtp-Source: ACcGV62qsmkmCO95yEo9x3h/6HQzSOlO36LG/8xYfHMjaTWd6n7QJKj5zsW59XYcR6Jaxov0SURmEQ== X-Received: by 2002:a62:3641:: with SMTP id d62-v6mr19200367pfa.97.1539815401214; Wed, 17 Oct 2018 15:30:01 -0700 (PDT) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id p3-v6sm352597pgl.2.2018.10.17.15.29.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:30:00 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Alban Bedel , Alex Elder , Andrew Morton , Arnd Bergmann , Avi Fishman , bcm-kernel-feedback-list@broadcom.com, Bjorn Andersson , Chunfeng Yun , "David S. Miller" , devicetree@vger.kernel.org, Dmitry Osipenko , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Hans de Goede , James Hogan , Jianguo Sun , Johan Hovold , Kees Cook , linux-usb@vger.kernel.org, Lu Baolu , Mark Rutland , Martin Blumenstingl , Mathias Nyman , Mathias Nyman , Mauro Carvalho Chehab , Rishabh Bhatnagar , Rob Herring , Roger Quadros Subject: [PATCH V2 1/6] dt-bindings: Add Broadcom STB OHCI, EHCI and XHCI binding document Date: Wed, 17 Oct 2018 18:29:04 -0400 Message-Id: <1539815349-24126-2-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> References: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add DT bindings document for Broadcom STB USB OHCI, EHCI and XHCI drivers. Signed-off-by: Al Cooper Reviewed-by: Rob Herring --- .../devicetree/bindings/usb/brcm,bcm7445-ehci.txt | 22 +++++++++++++++++++++ .../devicetree/bindings/usb/brcm,bcm7445-ohci.txt | 22 +++++++++++++++++++++ .../devicetree/bindings/usb/brcm,bcm7445-xhci.txt | 23 ++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.txt create mode 100644 Documentation/devicetree/bindings/usb/brcm,bcm7445-ohci.txt create mode 100644 Documentation/devicetree/bindings/usb/brcm,bcm7445-xhci.txt diff --git a/Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.txt b/Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.txt new file mode 100644 index 000000000000..824f4bf5d07c --- /dev/null +++ b/Documentation/devicetree/bindings/usb/brcm,bcm7445-ehci.txt @@ -0,0 +1,22 @@ +Broadcom STB USB EHCI controller + +Required properties: +- compatible: should be "brcm,bcm7445-ehci" +- reg: should contain one register range i.e. start and length +- interrupts: description of the interrupt line +- phys: phandle + phy specifier pair + The specifier should be 0 for the OHCI/EHCI PHY + +Optional properties: +- clocks: A phandle for the EHCI clock + +Example: + +ehci@f0b00300 { + compatible = "brcm,bcm7445-ehci"; + reg = <0xf0b00300 0xa8>; + interrupts = <0x0 0x5a 0x0>; + interrupt-names = "usb0_ehci_0"; + phys = <&usbphy_0 0x0>; + clocks = <&usb20> +}; diff --git a/Documentation/devicetree/bindings/usb/brcm,bcm7445-ohci.txt b/Documentation/devicetree/bindings/usb/brcm,bcm7445-ohci.txt new file mode 100644 index 000000000000..de5a22b3d138 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/brcm,bcm7445-ohci.txt @@ -0,0 +1,22 @@ +Broadcom STB USB OHCI controller + +Required properties: +- compatible: should be "brcm,bcm7445-ohci" +- reg: should contain one register range i.e. start and length +- interrupts: description of the interrupt line +- phys: phandle + phy specifier pair + The specifier should be 0 for the OHCI/EHCI PHY + +Optional properties: +- clocks: A phandle for the OHCI clock + +Example: + +ohci@f0b00400 { + compatible = "brcm,bcm7445-ohci"; + reg = <0xf0b00400 0x58>; + interrupts = <0x0 0x5b 0x0>; + interrupt-names = "usb0_ohci_0"; + phys = <&usbphy_0 0x0>; + clocks = <&usb20>; +}; diff --git a/Documentation/devicetree/bindings/usb/brcm,bcm7445-xhci.txt b/Documentation/devicetree/bindings/usb/brcm,bcm7445-xhci.txt new file mode 100644 index 000000000000..c41f3f8d836d --- /dev/null +++ b/Documentation/devicetree/bindings/usb/brcm,bcm7445-xhci.txt @@ -0,0 +1,23 @@ +Broadcom STB USB XHCI controller + +Required properties: +- compatible: should be "brcm,bcm7445-xhci" +- reg: should contain one register range i.e. start and length +- interrupts: description of the interrupt line +- phys: phandle + phy specifier pair + The specifier should be 1 for the XHCI PHY + +Optional properties: +- clocks: A phandle for the XHCI clock +- usb3-lpm-capable: determines if platform is USB3 LPM capable + +Example: + +xhci_0_0: xhci@f0b01000 { + compatible = "brcm,bcm7445-xhci"; + reg = <0xf0b01000 0x1000>; + interrupts = <0x0 0x5c 0x0>; + interrupt-names = "usb0_xhci_0"; + phys = <&usbphy_0 0x1>; + clocks = <&usb30>; +}; From patchwork Wed Oct 17 22:29:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10646141 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90ED91057 for ; Wed, 17 Oct 2018 22:30:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 816E7285A2 for ; Wed, 17 Oct 2018 22:30:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74FCA28751; Wed, 17 Oct 2018 22:30:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CD0C8285A2 for ; Wed, 17 Oct 2018 22:30:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727534AbeJRG1w (ORCPT ); Thu, 18 Oct 2018 02:27:52 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45985 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbeJRG1w (ORCPT ); Thu, 18 Oct 2018 02:27:52 -0400 Received: by mail-pf1-f194.google.com with SMTP id u12-v6so13850870pfn.12; Wed, 17 Oct 2018 15:30:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=f9A6R6aOucoDmKZi9No7wZ/RuFbvujGgsoesI9cyy0M=; b=SRPc2tKWCQBxK1BSf2oXIwsygBz/aj9Op1Z87fyPch+1jBb8OEA2S7yu182JBeO9j2 ho9eMEGqXKAroyJUxlYJlXY7QD1tW+WavsJDzpn0MFFABk5BdObj+VX0ZoiEjQpTBWgf xb0bReyp38AF2KtqdVQWqyXMFkK9ZJUmlxFAZD5Pv6chnkuRE4t51PAQJ8D1Cd1cGLxg Om3RXLCVUf0Yid06AwPUgq/GGBVnQVM+sfJnoDK8tdNwLwSNXPaZY/eHj0alaeXvJ9Yb RdjGu5qWM6sIaYG0m24hdkfV+uUQMcZpEFK+ppXBvnKRG773iUIMpn5VM3HcqyD/mQsQ Vw0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=f9A6R6aOucoDmKZi9No7wZ/RuFbvujGgsoesI9cyy0M=; b=acIEvHvl8RJMOmiVioDzifaMDLPoxc57muGIdkLREdKls2VNPbV9km7XyQi+b0WfsX m7GrO5Tb3a3qaVOawbzMje+7CAQYEhgHfB8mv7bRoPsTFXaNlBLnaD4umZP2MtAkXrPk +sDFs3tZhPwCuNlZENIGOgUsTdqGBOW4f6f3uIQZLn+04BlA7I+oRlHFyI11VtqkWUW/ 0qFYXrrVbYmf4YO3rY8R82r1EBbekkKa6Nh7hwbo9EtgzsxWMBD06SqYL/ocJG9PbpCW dG/AyXLlX/vnaz57+3GWNr+FYrWN6DzB9htUjVGWEhDx2OxDpz8o6WDwqcZdmtPmDi2J NisQ== X-Gm-Message-State: ABuFfoiiYaG4iPOKLgOtOxAkugnjdGYAn6MfIRhEm5JbYMr54fAGQSVo DupmQNGl2yi2+3KxGRwfTqhrGfy89KM= X-Google-Smtp-Source: ACcGV61HPZjRevTSNN7UE6ZRHUwCYDlDL9zotT/z/HUpoVZmQQ3Vl5u8ZRzmsKy1FM9GSqhzdOYseQ== X-Received: by 2002:a63:1302:: with SMTP id i2-v6mr26630111pgl.380.1539815405185; Wed, 17 Oct 2018 15:30:05 -0700 (PDT) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id p3-v6sm352597pgl.2.2018.10.17.15.30.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:30:04 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Alban Bedel , Alex Elder , Andrew Morton , Arnd Bergmann , Avi Fishman , bcm-kernel-feedback-list@broadcom.com, Bjorn Andersson , Chunfeng Yun , "David S. Miller" , devicetree@vger.kernel.org, Dmitry Osipenko , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Hans de Goede , James Hogan , Jianguo Sun , Johan Hovold , Kees Cook , linux-usb@vger.kernel.org, Lu Baolu , Mark Rutland , Martin Blumenstingl , Mathias Nyman , Mathias Nyman , Mauro Carvalho Chehab , Rishabh Bhatnagar , Rob Herring , Roger Quadros Subject: [PATCH V2 2/6] usb: core: Add ability to skip phy exit on suspend and init on resume Date: Wed, 17 Oct 2018 18:29:05 -0400 Message-Id: <1539815349-24126-3-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> References: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the ability to skip calling the PHY's exit routine on suspend and the PHY's init routine on resume. This is to handle a USB PHY that should have it's power_off function called on suspend but cannot have it's exit function called because on exit it will disable the PHY to the point where register accesses to the Host Controllers using the PHY will be disabled and the host drivers will crash. This is enabled with the HCD flag "suspend_without_phy_exit" which can be set from any HCD driver. Signed-off-by: Al Cooper --- drivers/usb/core/hcd.c | 8 ++++---- drivers/usb/core/phy.c | 18 ++++++++++++------ drivers/usb/core/phy.h | 9 ++++++--- include/linux/usb/hcd.h | 3 +++ 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 1c21955fe7c0..e67e4d6b3d21 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2263,7 +2263,7 @@ int hcd_bus_suspend(struct usb_device *rhdev, pm_message_t msg) hcd->state = HC_STATE_SUSPENDED; if (!PMSG_IS_AUTO(msg)) - usb_phy_roothub_suspend(hcd->self.sysdev, + usb_phy_roothub_suspend(hcd, hcd->phy_roothub); /* Did we race with a root-hub wakeup event? */ @@ -2304,7 +2304,7 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) } if (!PMSG_IS_AUTO(msg)) { - status = usb_phy_roothub_resume(hcd->self.sysdev, + status = usb_phy_roothub_resume(hcd, hcd->phy_roothub); if (status) return status; @@ -2347,7 +2347,7 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) } } else { hcd->state = old_state; - usb_phy_roothub_suspend(hcd->self.sysdev, hcd->phy_roothub); + usb_phy_roothub_suspend(hcd, hcd->phy_roothub); dev_dbg(&rhdev->dev, "bus %s fail, err %d\n", "resume", status); if (status != -ESHUTDOWN) @@ -2744,7 +2744,7 @@ int usb_add_hcd(struct usb_hcd *hcd, struct usb_device *rhdev; if (!hcd->skip_phy_initialization && usb_hcd_is_primary_hcd(hcd)) { - hcd->phy_roothub = usb_phy_roothub_alloc(hcd->self.sysdev); + hcd->phy_roothub = usb_phy_roothub_alloc(hcd); if (IS_ERR(hcd->phy_roothub)) return PTR_ERR(hcd->phy_roothub); diff --git a/drivers/usb/core/phy.c b/drivers/usb/core/phy.c index 9879767452a2..b54db39eee4c 100644 --- a/drivers/usb/core/phy.c +++ b/drivers/usb/core/phy.c @@ -45,10 +45,11 @@ static int usb_phy_roothub_add_phy(struct device *dev, int index, return 0; } -struct usb_phy_roothub *usb_phy_roothub_alloc(struct device *dev) +struct usb_phy_roothub *usb_phy_roothub_alloc(struct usb_hcd *hcd) { struct usb_phy_roothub *phy_roothub; int i, num_phys, err; + struct device *dev = hcd->self.sysdev; if (!IS_ENABLED(CONFIG_GENERIC_PHY)) return NULL; @@ -161,26 +162,30 @@ void usb_phy_roothub_power_off(struct usb_phy_roothub *phy_roothub) } EXPORT_SYMBOL_GPL(usb_phy_roothub_power_off); -int usb_phy_roothub_suspend(struct device *controller_dev, +int usb_phy_roothub_suspend(struct usb_hcd *hcd, struct usb_phy_roothub *phy_roothub) { + struct device *controller_dev = hcd->self.sysdev; + usb_phy_roothub_power_off(phy_roothub); /* keep the PHYs initialized so the device can wake up the system */ - if (device_may_wakeup(controller_dev)) + if (device_may_wakeup(controller_dev) || hcd->suspend_without_phy_exit) return 0; return usb_phy_roothub_exit(phy_roothub); } EXPORT_SYMBOL_GPL(usb_phy_roothub_suspend); -int usb_phy_roothub_resume(struct device *controller_dev, +int usb_phy_roothub_resume(struct usb_hcd *hcd, struct usb_phy_roothub *phy_roothub) { + struct device *controller_dev = hcd->self.sysdev; int err; /* if the device can't wake up the system _exit was called */ - if (!device_may_wakeup(controller_dev)) { + if (!device_may_wakeup(controller_dev) && + !hcd->suspend_without_phy_exit) { err = usb_phy_roothub_init(phy_roothub); if (err) return err; @@ -189,7 +194,8 @@ int usb_phy_roothub_resume(struct device *controller_dev, err = usb_phy_roothub_power_on(phy_roothub); /* undo _init if _power_on failed */ - if (err && !device_may_wakeup(controller_dev)) + if (err && !device_may_wakeup(controller_dev) + && !hcd->suspend_without_phy_exit) usb_phy_roothub_exit(phy_roothub); return err; diff --git a/drivers/usb/core/phy.h b/drivers/usb/core/phy.h index 88a3c037e9df..34293e11a917 100644 --- a/drivers/usb/core/phy.h +++ b/drivers/usb/core/phy.h @@ -5,13 +5,16 @@ * Copyright (C) 2018 Martin Blumenstingl */ +#include +#include + #ifndef __USB_CORE_PHY_H_ #define __USB_CORE_PHY_H_ struct device; struct usb_phy_roothub; -struct usb_phy_roothub *usb_phy_roothub_alloc(struct device *dev); +struct usb_phy_roothub *usb_phy_roothub_alloc(struct usb_hcd *hcd); int usb_phy_roothub_init(struct usb_phy_roothub *phy_roothub); int usb_phy_roothub_exit(struct usb_phy_roothub *phy_roothub); @@ -19,9 +22,9 @@ int usb_phy_roothub_power_on(struct usb_phy_roothub *phy_roothub); void usb_phy_roothub_power_off(struct usb_phy_roothub *phy_roothub); -int usb_phy_roothub_suspend(struct device *controller_dev, +int usb_phy_roothub_suspend(struct usb_hcd *hcd, struct usb_phy_roothub *phy_roothub); -int usb_phy_roothub_resume(struct device *controller_dev, +int usb_phy_roothub_resume(struct usb_hcd *hcd, struct usb_phy_roothub *phy_roothub); #endif /* __USB_CORE_PHY_H_ */ diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 97e2ddec18b1..87a104055b5e 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -157,6 +157,9 @@ struct usb_hcd { */ unsigned skip_phy_initialization:1; + /* Some phys don't want the phy's exit/init called on suspend/resume */ + unsigned suspend_without_phy_exit:1; + /* The next flag is a stopgap, to be removed when all the HCDs * support the new root-hub polling mechanism. */ unsigned uses_new_polling:1; From patchwork Wed Oct 17 22:29:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10646139 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D851C1508 for ; Wed, 17 Oct 2018 22:30:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CAE49285A2 for ; Wed, 17 Oct 2018 22:30:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE8D128751; Wed, 17 Oct 2018 22:30:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B97E285A2 for ; Wed, 17 Oct 2018 22:30:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727579AbeJRG14 (ORCPT ); Thu, 18 Oct 2018 02:27:56 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:36632 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbeJRG14 (ORCPT ); Thu, 18 Oct 2018 02:27:56 -0400 Received: by mail-pf1-f194.google.com with SMTP id l81-v6so13876864pfg.3; Wed, 17 Oct 2018 15:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OXrp7lSff47EDC16vYjjmN9IQaBCCpSe1i8CheNnDHA=; b=ZXOGnMaiEVr3u9TjvER7T/h/2Ixw331J64J207lfHMq2OZigKYoQFpGhorHdwRIqyY hN9PDwnyR6KynOFlZNgu3FUqEm6p4g9AekyRuxgcVwVi0IREDOo+jb+UF2LHnR+aB0Mr 6CpkiZ7X9WNEBcc2zJ5ZUsKI+mp8A6Wx8HLdeb6AR8qEwjlZr35WMvRCuKfkAsy0WfMH FQMvyE0wQWiiKWMEADInBz0NPHMdRysZfS1BZYksDu3OaeH3uwfbA2ypdEYU2+7JvrO8 iIT7wug0d6ywd0YAU0hqXIwZBA3P4PlClb4H2vxDM1JTxXRxhM1F40Wm9s8ulEWfdRrx LV6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OXrp7lSff47EDC16vYjjmN9IQaBCCpSe1i8CheNnDHA=; b=brjD4OkG6nRTKfvUlKR88CePWj82n0mRZa46qgoHldid7bJO7YT5TohonqHHcSfyzH U9BH8BMT863LwLO/69Bc+pt7tabGRSZJmlR0q+Ru71lmKR2p13IZQdkspZyMQEEM35Py 7IkjcAUvWd0KnQ/laIbrVwlJLSmbuPqkWnWDcyAtkjPyhS8GW1q0D3j+SrIIqplwMdp4 tLewaQpkhu5cmcDFI+Ep97mGfF0ELuqFQdC780TUSer/YS9Rtz5OrT688UaONllqOOsR 9UblmNcQ+ncHPuW2qVdU664hwHLjRaExP30eE+EV91Gs4YekXVhfePZMYKXaoqKwY/Ue BBoQ== X-Gm-Message-State: ABuFfogaDvZ3r+Kio5bgWgTVYLULtxBscTK4wpZ5shuePgbMltHTzZoZ OBGDQjeGiT7eEVoqi9y74mq+zfIIzgM= X-Google-Smtp-Source: ACcGV63Z6qaGV0vXxZ6Y6XM2gDOLqh1jEr+vSnBGbvbuft8YVc6IL009JMlva2380xsw9wbwVMvc3g== X-Received: by 2002:a63:4107:: with SMTP id o7-v6mr26421727pga.256.1539815409175; Wed, 17 Oct 2018 15:30:09 -0700 (PDT) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id p3-v6sm352597pgl.2.2018.10.17.15.30.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:30:08 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Alban Bedel , Alex Elder , Andrew Morton , Arnd Bergmann , Avi Fishman , bcm-kernel-feedback-list@broadcom.com, Bjorn Andersson , Chunfeng Yun , "David S. Miller" , devicetree@vger.kernel.org, Dmitry Osipenko , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Hans de Goede , James Hogan , Jianguo Sun , Johan Hovold , Kees Cook , linux-usb@vger.kernel.org, Lu Baolu , Mark Rutland , Martin Blumenstingl , Mathias Nyman , Mathias Nyman , Mauro Carvalho Chehab , Rishabh Bhatnagar , Rob Herring , Roger Quadros Subject: [PATCH V2 3/6] usb: xhci: xhci-plat: Add support for Broadcom STB SoC's Date: Wed, 17 Oct 2018 18:29:06 -0400 Message-Id: <1539815349-24126-4-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> References: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for Broadcom STB SoC's to the xhci platform driver Signed-off-by: Al Cooper --- drivers/usb/host/xhci-brcm.c | 17 +++++++++++++++++ drivers/usb/host/xhci-brcm.h | 16 ++++++++++++++++ drivers/usb/host/xhci-plat.c | 8 ++++++++ 3 files changed, 41 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..a7220126f6af --- /dev/null +++ b/drivers/usb/host/xhci-brcm.c @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (c) 2018, Broadcom */ + +#include +#include + +#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; + hcd->suspend_without_phy_exit = 1; + return 0; +} + diff --git a/drivers/usb/host/xhci-brcm.h b/drivers/usb/host/xhci-brcm.h new file mode 100644 index 000000000000..a39d1b807a4c --- /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_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 94e939249b2b..1de22928e862 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -23,6 +23,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; @@ -111,6 +112,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", @@ -143,6 +148,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, }, {}, }; From patchwork Wed Oct 17 22:29:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10646137 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E18E1508 for ; Wed, 17 Oct 2018 22:30:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3A77285A2 for ; Wed, 17 Oct 2018 22:30:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7809286E6; Wed, 17 Oct 2018 22:30:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 817C2285A2 for ; Wed, 17 Oct 2018 22:30:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727602AbeJRG2A (ORCPT ); Thu, 18 Oct 2018 02:28:00 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:38391 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726644AbeJRG17 (ORCPT ); Thu, 18 Oct 2018 02:27:59 -0400 Received: by mail-pl1-f194.google.com with SMTP id q19-v6so10283416pll.5; Wed, 17 Oct 2018 15:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=G/avwaNHR2AwcRj8BPEvkwQlcWjIT4+gT2UzKciw+Gs=; b=CWyzRpfh3in0HjrziB0WF7IfjdlJgWDIGi+EUIzlUQ5rizDgb+wrJHZwZfzLV6vIED TQ3t3+7UJmQP5QMG+Ojnfb7mXfmNfRG5CzlpQw0Zz/wqB48Xw8kKnibEuO1NfbCY0OCR qHwEvETYqrwqJnFaFvlGHQE9OQB9HxzeaAA24ev6898PIAxup+K6kYe2Zguy1WZjhcoB Hagv1b0tFTcZq6Z6ejh6CMI641COCrty4+y4hTYnXuENCoTGkW8VRIGsKhdxYTRYtXaW IOLw/sCaA+wHAXmtlH2OO0LbRdtQ27pEeucNX3o0zhCjhxvmY97mvuAuZ/ZZ+F3gn/CV Zg6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=G/avwaNHR2AwcRj8BPEvkwQlcWjIT4+gT2UzKciw+Gs=; b=KtOXQ7ApBUQKKWWX/2hNl69CvN16QutxyM8Q+jLnuMfW7CkOeeRDbZJCgxnKz/ne8t xb3tTS9pT4tNVVBVhhuJFRqLadBrG5mD+THCxJ5X4XE4z9IEyWZXKSV1HOJExVSR1NrU vGXn+oDUzfwnPJxik9Mz6kyyZpyEKTUN7+/YHWhYQlOtDs0SJQaEB+S45Z/hE7oienKn Crsvn/0nb246KCFXc8SuidZR0ScWlRvJ/mwus6RzAb7a8Eb9MLhjVZCIGJG9ll6mP7K0 5wrEbweYxjBZx6ainQ0NPGD72xVbDNKAJJafQK45nW15f9hu8UP3Qq+JkLogvqF6tWh+ S2lw== X-Gm-Message-State: ABuFfohUClRqjF6DdwjKE7Tvgk/avXQANGv5GanbS7Z3SDshB2OlEvO/ Mhg95BOGvH2BACAssJl+gekpcrw3bL0= X-Google-Smtp-Source: ACcGV61u664iHvXBUIUDQl+1OeNUaT2iFmeRT/rORzqrQNU3WiktxvC+jRi0xHnKsBMmSkvt0e5+sg== X-Received: by 2002:a17:902:9696:: with SMTP id n22-v6mr19008508plp.282.1539815413047; Wed, 17 Oct 2018 15:30:13 -0700 (PDT) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id p3-v6sm352597pgl.2.2018.10.17.15.30.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:30:12 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Alban Bedel , Alex Elder , Andrew Morton , Arnd Bergmann , Avi Fishman , bcm-kernel-feedback-list@broadcom.com, Bjorn Andersson , Chunfeng Yun , "David S. Miller" , devicetree@vger.kernel.org, Dmitry Osipenko , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Hans de Goede , James Hogan , Jianguo Sun , Johan Hovold , Kees Cook , linux-usb@vger.kernel.org, Lu Baolu , Mark Rutland , Martin Blumenstingl , Mathias Nyman , Mathias Nyman , Mauro Carvalho Chehab , Rishabh Bhatnagar , Rob Herring , Roger Quadros Subject: [PATCH V2 4/6] usb: ohci-platform: Add support for Broadcom STB SoC's Date: Wed, 17 Oct 2018 18:29:07 -0400 Message-Id: <1539815349-24126-5-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> References: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for Broadcom STB SoC's to the ohci platform driver. Signed-off-by: Al Cooper --- drivers/usb/host/ohci-platform.c | 35 +++++++++++++++++++++++++++++------ include/linux/usb/ohci_pdriver.h | 1 + 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index 65a1c3fdc88c..363d6fa676a5 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -99,12 +100,24 @@ static int ohci_platform_probe(struct platform_device *dev) if (usb_disabled()) return -ENODEV; - /* - * Use reasonable defaults so platforms don't have to provide these - * with DT probing on ARM. - */ - if (!pdata) - pdata = &ohci_platform_defaults; + if (!pdata) { + const struct usb_ohci_pdata *match_pdata; + + match_pdata = of_device_get_match_data(&dev->dev); + if (match_pdata) { + pdata = devm_kzalloc(&dev->dev, sizeof(*pdata), + GFP_KERNEL); + if (!pdata) + return -ENOMEM; + *pdata = *match_pdata; + } else { + /* + * Use reasonable defaults so platforms don't have + * to provide these with DT probing on ARM. + */ + pdata = &ohci_platform_defaults; + } + } err = dma_coerce_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32)); if (err) @@ -177,6 +190,8 @@ static int ohci_platform_probe(struct platform_device *dev) ohci->flags |= OHCI_QUIRK_FRAME_NO; if (pdata->num_ports) ohci->num_ports = pdata->num_ports; + if (pdata->suspend_without_phy_exit) + hcd->suspend_without_phy_exit = 1; #ifndef CONFIG_USB_OHCI_BIG_ENDIAN_MMIO if (ohci->flags & OHCI_QUIRK_BE_MMIO) { @@ -305,10 +320,18 @@ static int ohci_platform_resume(struct device *dev) } #endif /* CONFIG_PM_SLEEP */ +static const struct usb_ohci_pdata ohci_plat_brcm_bcm7445_ohci = { + .power_on = ohci_platform_power_on, + .power_suspend = ohci_platform_power_off, + .power_off = ohci_platform_power_off, + .suspend_without_phy_exit = 1, +}; + static const struct of_device_id ohci_platform_ids[] = { { .compatible = "generic-ohci", }, { .compatible = "cavium,octeon-6335-ohci", }, { .compatible = "ti,ohci-omap3", }, + { .compatible = "brcm,bcm7445-ohci", &ohci_plat_brcm_bcm7445_ohci}, { } }; MODULE_DEVICE_TABLE(of, ohci_platform_ids); diff --git a/include/linux/usb/ohci_pdriver.h b/include/linux/usb/ohci_pdriver.h index 7eb16cf587ee..16b24ea1e3bb 100644 --- a/include/linux/usb/ohci_pdriver.h +++ b/include/linux/usb/ohci_pdriver.h @@ -35,6 +35,7 @@ struct usb_ohci_pdata { unsigned big_endian_desc:1; unsigned big_endian_mmio:1; unsigned no_big_frame_no:1; + unsigned suspend_without_phy_exit:1; unsigned int num_ports; /* Turn on all power and clocks */ From patchwork Wed Oct 17 22:29:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10646135 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A38B1057 for ; Wed, 17 Oct 2018 22:30:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BC7E285A2 for ; Wed, 17 Oct 2018 22:30:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1ED94286E6; Wed, 17 Oct 2018 22:30:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DA5D285A2 for ; Wed, 17 Oct 2018 22:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727489AbeJRG2E (ORCPT ); Thu, 18 Oct 2018 02:28:04 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:35766 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727188AbeJRG2E (ORCPT ); Thu, 18 Oct 2018 02:28:04 -0400 Received: by mail-pg1-f194.google.com with SMTP id 32-v6so2015321pgu.2; Wed, 17 Oct 2018 15:30:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=MrleH0HbAVlM9Z7cvXBULa7rKzCb+2ZKgMUNDdj5YIo=; b=iACMOhXbAtVWh5/eHjxwmUo6G/Zeabjnt2r96ojIBzi2z2qzQ9uphIZjmMY3ngR4BN t0p5x8WQni7XInlX1CC+jUo3WpSUCC8e/osxnTu560u90+znc+2uQ9oPRq0xrnNPlTRe vY1zlWe5K+9+sLvW/mD6gGrEEeQSG+vdrVQsaJHP4P8CiuQmNLiqz1N3DhCHEFh9uLKM TCPNWx60yOZjaNr/AMb9CzmpF7lvwoU0ja3NtEcFZSwx2AKqq+qWViYdhBK+D6q2db9H W12b+Bt1VL8g8+g5qEJ6qaZ17n321MU6PKxNFPUcmB/yubZYWMUPZ5J2rWrCHt/kqux5 jntw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MrleH0HbAVlM9Z7cvXBULa7rKzCb+2ZKgMUNDdj5YIo=; b=Jh6r6f7Bhl7iW0JhXodyxWkzFKM5ETjsTDFCKln8GaebloHcYUX9Gy3/X47Mg2tNH/ fiZd+SbWdRZ+AhLX/Fle59HM08aKmcCvL7F4KfMNT2DZrZz+hNk3tB2Te/BpeqRd87Vo Oz+qCWYtqfmQRNlmGFavGhFWpH3g9PlnHsligBcgQHR00JSksI05fBz2G0ZCeZlxt+Z6 d9613Gl80gLUV/xhr3tHfxcr1q76sK44vITRVjB9vXr3dbeUKTDMZz42VsxIElkTKPgk PD8aI49uVDO+piX33TE2t8shbwi0dtI6E+lBrhVZ9eYaLl1YP25ly9dGMv/3nEipAJ1O dt/g== X-Gm-Message-State: ABuFfojCdxNNVuKI/5ILxvQnenpTXKN1UIWeXCZDtwL0tPbBIBArs/5W kwKRp+qpvShw0NNtOW/3IZr9BGGaFSM= X-Google-Smtp-Source: ACcGV61AlgswqSeyq6RWpTG73PLZd3YFd21lUHq1LyD6Hq4KTCG46qdKXjGzw05nO4N2KK5Q8yL1RQ== X-Received: by 2002:a63:e141:: with SMTP id h1-v6mr26133365pgk.47.1539815416952; Wed, 17 Oct 2018 15:30:16 -0700 (PDT) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id p3-v6sm352597pgl.2.2018.10.17.15.30.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:30:16 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Alban Bedel , Alex Elder , Andrew Morton , Arnd Bergmann , Avi Fishman , bcm-kernel-feedback-list@broadcom.com, Bjorn Andersson , Chunfeng Yun , "David S. Miller" , devicetree@vger.kernel.org, Dmitry Osipenko , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Hans de Goede , James Hogan , Jianguo Sun , Johan Hovold , Kees Cook , linux-usb@vger.kernel.org, Lu Baolu , Mark Rutland , Martin Blumenstingl , Mathias Nyman , Mathias Nyman , Mauro Carvalho Chehab , Rishabh Bhatnagar , Rob Herring , Roger Quadros Subject: [PATCH V2 5/6] usb: ehci: Add new EHCI driver for Broadcom STB SoC's Date: Wed, 17 Oct 2018 18:29:08 -0400 Message-Id: <1539815349-24126-6-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> References: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a new EHCI driver for Broadcom STB SoC's. A new EHCI driver was created instead of adding support to the existing ehci platform driver because of the code required to workaround bugs in the EHCI controller. Signed-off-by: Al Cooper --- drivers/usb/host/ehci-brcm.c | 291 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) create mode 100644 drivers/usb/host/ehci-brcm.c diff --git a/drivers/usb/host/ehci-brcm.c b/drivers/usb/host/ehci-brcm.c new file mode 100644 index 000000000000..b2a100698bf5 --- /dev/null +++ b/drivers/usb/host/ehci-brcm.c @@ -0,0 +1,291 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (c) 2018, Broadcom */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ehci.h" + +#define BRCM_DRIVER_DESC "EHCI Broadcom STB driver" + +#define hcd_to_ehci_priv(h) ((struct brcm_priv *)hcd_to_ehci(h)->priv) + +struct brcm_priv { + struct clk *clk; +}; + +static const char brcm_hcd_name[] = "ehci-brcm"; + +static int (*org_hub_control)(struct usb_hcd *hcd, + u16 typeReq, u16 wValue, u16 wIndex, + char *buf, u16 wLength); + +/* ehci_brcm_wait_for_sof + * Wait for start of next microframe, then wait extra delay microseconds + */ +static inline void ehci_brcm_wait_for_sof(struct ehci_hcd *ehci, u32 delay) +{ + int frame_idx = ehci_readl(ehci, &ehci->regs->frame_index); + + while (frame_idx == ehci_readl(ehci, &ehci->regs->frame_index)) + ; + udelay(delay); +} + +/* + * ehci_brcm_hub_control + * Intercept echi-hcd request to complete RESUME and align it to the start + * of the next microframe. + * If RESUME is complete too late in the microframe, host controller + * detects babble on suspended port and resets the port afterwards. + * This s/w workaround allows to avoid this problem. + * See SWLINUX-1909 for more details + */ +static int ehci_brcm_hub_control( + struct usb_hcd *hcd, + u16 typeReq, + u16 wValue, + u16 wIndex, + char *buf, + u16 wLength) +{ + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + int ports = HCS_N_PORTS(ehci->hcs_params); + u32 __iomem *status_reg = &ehci->regs->port_status[ + (wIndex & 0xff) - 1]; + unsigned long flags; + int retval, irq_disabled = 0; + + /* + * RESUME is cleared when GetPortStatus() is called 20ms after start + * of RESUME + */ + if ((typeReq == GetPortStatus) && + (wIndex && wIndex <= ports) && + ehci->reset_done[wIndex-1] && + time_after_eq(jiffies, ehci->reset_done[wIndex-1]) && + (ehci_readl(ehci, status_reg) & PORT_RESUME)) { + + /* + * to make sure we are not interrupted until RESUME bit + * is cleared, disable interrupts on current CPU + */ + ehci_dbg(ehci, "SOF alignment workaround\n"); + irq_disabled = 1; + local_irq_save(flags); + ehci_brcm_wait_for_sof(ehci, 5); + } + retval = (*org_hub_control)(hcd, typeReq, wValue, wIndex, buf, wLength); + if (irq_disabled) + local_irq_restore(flags); + return retval; +} + +static int ehci_brcm_reset(struct usb_hcd *hcd) +{ + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + + ehci->big_endian_mmio = 1; + hcd->suspend_without_phy_exit = 1; + + ehci->caps = (struct ehci_caps *) hcd->regs; + ehci->regs = (struct ehci_regs *) (hcd->regs + + HC_LENGTH(ehci, ehci_readl(ehci, &ehci->caps->hc_capbase))); + + /* This fixes the lockup during reboot due to prior interrupts */ + ehci_writel(ehci, CMD_RESET, &ehci->regs->command); + mdelay(10); + + /* + * SWLINUX-1705: Avoid OUT packet underflows during high memory + * bus usage + * port_status[0x0f] = Broadcom-proprietary USB_EHCI_INSNREG00 @ 0x90 + */ + ehci_writel(ehci, 0x00800040, &ehci->regs->port_status[0x10]); + ehci_writel(ehci, 0x00000001, &ehci->regs->port_status[0x12]); + + return ehci_setup(hcd); +} + +static struct hc_driver __read_mostly ehci_brcm_hc_driver; + +static const struct ehci_driver_overrides brcm_overrides __initconst = { + + .reset = ehci_brcm_reset, + .extra_priv_size = sizeof(struct brcm_priv), +}; + +static int ehci_brcm_probe(struct platform_device *pdev) +{ + struct usb_hcd *hcd; + struct resource *res_mem; + struct brcm_priv *priv; + int irq; + int err; + + if (usb_disabled()) + return -ENODEV; + + err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); + if (err) + return err; + + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + dev_err(&pdev->dev, "no irq provided"); + return irq; + } + + /* Hook the hub control routine to work around a bug */ + if (org_hub_control == NULL) + org_hub_control = ehci_brcm_hc_driver.hub_control; + ehci_brcm_hc_driver.hub_control = ehci_brcm_hub_control; + + /* initialize hcd */ + hcd = usb_create_hcd(&ehci_brcm_hc_driver, + &pdev->dev, dev_name(&pdev->dev)); + if (!hcd) + return -ENOMEM; + + platform_set_drvdata(pdev, hcd); + priv = hcd_to_ehci_priv(hcd); + + priv->clk = devm_clk_get(&pdev->dev, NULL); + if (IS_ERR(priv->clk)) { + dev_err(&pdev->dev, "Clock not found in Device Tree\n"); + priv->clk = NULL; + } + err = clk_prepare_enable(priv->clk); + if (err) + goto err_hcd; + + res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + hcd->regs = devm_ioremap_resource(&pdev->dev, res_mem); + if (IS_ERR(hcd->regs)) { + err = PTR_ERR(hcd->regs); + goto err_clk; + } + hcd->rsrc_start = res_mem->start; + hcd->rsrc_len = resource_size(res_mem); + err = usb_add_hcd(hcd, irq, IRQF_SHARED); + if (err) + goto err_clk; + + device_wakeup_enable(hcd->self.controller); + device_enable_async_suspend(hcd->self.controller); + platform_set_drvdata(pdev, hcd); + + return err; + +err_clk: + clk_disable_unprepare(priv->clk); +err_hcd: + usb_put_hcd(hcd); + + return err; +} + +static int ehci_brcm_remove(struct platform_device *dev) +{ + struct usb_hcd *hcd = platform_get_drvdata(dev); + struct brcm_priv *priv = hcd_to_ehci_priv(hcd); + + usb_remove_hcd(hcd); + clk_disable_unprepare(priv->clk); + usb_put_hcd(hcd); + return 0; +} + +#ifdef CONFIG_PM_SLEEP + +static int ehci_brcm_suspend(struct device *dev) +{ + int ret; + struct usb_hcd *hcd = dev_get_drvdata(dev); + struct brcm_priv *priv = hcd_to_ehci_priv(hcd); + bool do_wakeup = device_may_wakeup(dev); + + ret = ehci_suspend(hcd, do_wakeup); + clk_disable_unprepare(priv->clk); + return ret; +} + +static int ehci_brcm_resume(struct device *dev) +{ + struct usb_hcd *hcd = dev_get_drvdata(dev); + struct ehci_hcd *ehci = hcd_to_ehci(hcd); + struct brcm_priv *priv = hcd_to_ehci_priv(hcd); + int err; + + err = clk_prepare_enable(priv->clk); + if (err) + return err; + /* + * SWLINUX-1705: Avoid OUT packet underflows during high memory + * bus usage + * port_status[0x0f] = Broadcom-proprietary USB_EHCI_INSNREG00 + * @ 0x90 + */ + ehci_writel(ehci, 0x00800040, &ehci->regs->port_status[0x10]); + ehci_writel(ehci, 0x00000001, &ehci->regs->port_status[0x12]); + + ehci_resume(hcd, false); + return 0; +} +#endif /* CONFIG_PM_SLEEP */ + +static SIMPLE_DEV_PM_OPS(ehci_brcm_pm_ops, ehci_brcm_suspend, + ehci_brcm_resume); + +#ifdef CONFIG_OF +static const struct of_device_id brcm_ehci_of_match[] = { + { .compatible = "brcm,bcm7445-ehci", }, + {} +}; + +MODULE_DEVICE_TABLE(of, brcm_ehci_of_match); +#endif /* CONFIG_OF */ + +static struct platform_driver ehci_brcm_driver = { + .probe = ehci_brcm_probe, + .remove = ehci_brcm_remove, + .shutdown = usb_hcd_platform_shutdown, + .driver = { + .owner = THIS_MODULE, + .name = "ehci-brcm", + .pm = &ehci_brcm_pm_ops, + .of_match_table = of_match_ptr(brcm_ehci_of_match), + } +}; + +static int __init ehci_brcm_init(void) +{ + if (usb_disabled()) + return -ENODEV; + + pr_info("%s: " BRCM_DRIVER_DESC "\n", brcm_hcd_name); + + ehci_init_driver(&ehci_brcm_hc_driver, &brcm_overrides); + return platform_driver_register(&ehci_brcm_driver); +} +module_init(ehci_brcm_init); + +static void __exit ehci_brcm_exit(void) +{ + platform_driver_unregister(&ehci_brcm_driver); +} +module_exit(ehci_brcm_exit); + +MODULE_ALIAS("platform:ehci-brcm"); +MODULE_DESCRIPTION(BRCM_DRIVER_DESC); +MODULE_AUTHOR("Al Cooper"); +MODULE_LICENSE("GPL"); From patchwork Wed Oct 17 22:29:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10646133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E22811057 for ; Wed, 17 Oct 2018 22:30:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D42CC285A2 for ; Wed, 17 Oct 2018 22:30:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6CCF286E6; Wed, 17 Oct 2018 22:30:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 423E4285A2 for ; Wed, 17 Oct 2018 22:30:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727650AbeJRG2J (ORCPT ); Thu, 18 Oct 2018 02:28:09 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:45438 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727101AbeJRG2I (ORCPT ); Thu, 18 Oct 2018 02:28:08 -0400 Received: by mail-pl1-f195.google.com with SMTP id y15-v6so13349837plr.12; Wed, 17 Oct 2018 15:30:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HLBJAv0sMMzlzwqjXNvHCj/KWOFQxAuSMQyCP91bvfk=; b=b+fTw5+WUT6ydP+6YcfNLxzLC/uTHrsg/qbOTQKK87Hfc72I/FBaDBkEvuz7J8hYWP 7vvw7/muNb63KkVON1yIhPc3zKXs+Ze6mpJyWeaLsv9s3hEP/ZFf3Kg/YdGQ+XNVWb9z Hu593f9Szkr9nVYkyFN7ODlqTMf/jDzI5FwV/QW7YymV/v7IIPbNFEBNI7CAKS4mSqpL 0tpr+nYKjTfhKnfafSMhycLuXj4VoUjdR1PLqEuy5pZUlvnDelkVcSEZcOxq00R3e/iI 9hbb5AidVQiSUNvcY8R/XDH7GDKG6i4txQ36DwVN+xCYhoPxeEPizUKdxb3yfT7uhrUD 5qXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HLBJAv0sMMzlzwqjXNvHCj/KWOFQxAuSMQyCP91bvfk=; b=SDbrnddXKwxB54CxwErhzTzTG4Xj26ad6OZXT9aQgC/cSPfDdCYDw9ochJLDIzTApx GakyvEJsjUmAVru8vgf9YW4EQjph9jYvAM3+jpJBvMhG223cAvX8bPPqPFt4CyN1Wze4 4hW88ygqXItIdVmoq58dc32nAGpjeJkHN9zDzrUeMelnusO9Pxxi+O3nSYIAe1bEKxHa WuM1azdFymqFsRzj1avzKuhuxHPf/WhN0lBKKLyuMPhR3AWKwqrngFbZACx+xJZDOXPk LBFulE8VzVMCLpAf3vF3VrrjAUa77eWCMXknW6oYr9S8lqcfNoqzy6Mjw4aCHNptWLpp 9VxQ== X-Gm-Message-State: ABuFfohcCJTsaMbEVzirfWA+SfhnSplYe16oK0qHGtRLWL7cTr99UJB9 PTMGLEeikTgSZMd3/xSC32my7GPlnT0= X-Google-Smtp-Source: ACcGV602x89OWR3UU5Ffw10ZgjvCLyZJbvj0gRn62MrV828jC6VHdAmcdLRwHaWd0ahJ9Mgd+CkItQ== X-Received: by 2002:a17:902:6689:: with SMTP id e9-v6mr3587363plk.128.1539815421024; Wed, 17 Oct 2018 15:30:21 -0700 (PDT) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id p3-v6sm352597pgl.2.2018.10.17.15.30.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Oct 2018 15:30:20 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Alban Bedel , Alex Elder , Andrew Morton , Arnd Bergmann , Avi Fishman , bcm-kernel-feedback-list@broadcom.com, Bjorn Andersson , Chunfeng Yun , "David S. Miller" , devicetree@vger.kernel.org, Dmitry Osipenko , Greg Kroah-Hartman , "Gustavo A. R. Silva" , Hans de Goede , James Hogan , Jianguo Sun , Johan Hovold , Kees Cook , linux-usb@vger.kernel.org, Lu Baolu , Mark Rutland , Martin Blumenstingl , Mathias Nyman , Mathias Nyman , Mauro Carvalho Chehab , Rishabh Bhatnagar , Rob Herring , Roger Quadros Subject: [PATCH V2 6/6] usb: host: Add ability to build new Broadcom STB USB drivers Date: Wed, 17 Oct 2018 18:29:09 -0400 Message-Id: <1539815349-24126-7-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> References: <1539815349-24126-1-git-send-email-alcooperx@gmail.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the build system changes needed to get the Broadcom STB XHCI, EHCI and OHCI functionality working. The link order for XHCI was changed in the Makefile because of the way STB XHCI, EHCI and OHCI controllers share a port which requires that the XHCI driver be initialized first. Also update MAINTAINERS. Signed-off-by: Al Cooper --- MAINTAINERS | 9 +++++++++ drivers/usb/host/Kconfig | 29 +++++++++++++++++++++++++++++ drivers/usb/host/Makefile | 18 ++++++++++++------ 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 6ac000cc006d..7e062dcbe173 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3006,6 +3006,15 @@ S: Supported F: drivers/gpio/gpio-brcmstb.c F: Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt +BROADCOM BRCMSTB USB XHCI, EHCI and OHCI DRIVERS +M: Al Cooper +L: linux-usb@vger.kernel.org +L: bcm-kernel-feedback-list@broadcom.com +S: Maintained +F: drivers/usb/host/xhci-brcm.* +F: drivers/usb/host/ohci-brcm.c +F: Documentation/devicetree/bindings/usb/brcm,bcm7445-*.txt + BROADCOM BRCMSTB USB2 and USB3 PHY DRIVER M: Al Cooper L: linux-kernel@vger.kernel.org diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index 1a4ea98cac2a..112de3334389 100644 --- a/drivers/usb/host/Kconfig +++ b/drivers/usb/host/Kconfig @@ -94,6 +94,35 @@ config USB_XHCI_TEGRA Say 'Y' to enable the support for the xHCI host controller found in NVIDIA Tegra124 and later SoCs. +config USB_OHCI_BRCM + tristate + +config USB_EHCI_BRCM + tristate + +config USB_XHCI_BRCM + tristate + +config BRCM_USB_PHY + tristate + +config USB_BRCM + tristate "Broadcom STB USB support" + depends on ARCH_BRCMSTB + select USB_OHCI_HCD_PLATFORM if USB_OHCI_HCD + select USB_EHCI_BRCM if USB_EHCI_HCD + select USB_XHCI_BRCM if USB_XHCI_HCD + select USB_XHCI_PLATFORM if USB_XHCI_HCD + select BRCM_USB_PHY if USB_OHCI_HCD || USB_EHCI_HCD || USB_XHCI_HCD + select GENERIC_PHY if BRCM_USB_PHY + default ARCH_BRCMSTB + help + Say Y to enable support for XHCI, EHCI and OHCI host controllers + found in Broadcom STB SoC's. + + Disabling this will keep the controllers and corresponding + PHYs powered down. + endif # USB_XHCI_HCD config USB_EHCI_HCD diff --git a/drivers/usb/host/Makefile b/drivers/usb/host/Makefile index e6235269c151..2a16226f0916 100644 --- a/drivers/usb/host/Makefile +++ b/drivers/usb/host/Makefile @@ -31,6 +31,10 @@ ifneq ($(CONFIG_USB_XHCI_RCAR), ) xhci-plat-hcd-y += xhci-rcar.o endif +ifneq ($(CONFIG_USB_XHCI_BRCM), ) + xhci-plat-hcd-y += xhci-brcm.o +endif + ifneq ($(CONFIG_DEBUG_FS),) xhci-hcd-y += xhci-debugfs.o endif @@ -39,6 +43,13 @@ obj-$(CONFIG_USB_WHCI_HCD) += whci/ obj-$(CONFIG_USB_PCI) += pci-quirks.o +obj-$(CONFIG_USB_XHCI_HCD) += xhci-hcd.o +obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o +obj-$(CONFIG_USB_XHCI_PLATFORM) += xhci-plat-hcd.o +obj-$(CONFIG_USB_XHCI_HISTB) += xhci-histb.o +obj-$(CONFIG_USB_XHCI_MTK) += xhci-mtk.o +obj-$(CONFIG_USB_XHCI_TEGRA) += xhci-tegra.o + obj-$(CONFIG_USB_EHCI_HCD) += ehci-hcd.o obj-$(CONFIG_USB_EHCI_PCI) += ehci-pci.o obj-$(CONFIG_USB_EHCI_HCD_PLATFORM) += ehci-platform.o @@ -52,6 +63,7 @@ obj-$(CONFIG_USB_EHCI_EXYNOS) += ehci-exynos.o obj-$(CONFIG_USB_EHCI_HCD_AT91) += ehci-atmel.o obj-$(CONFIG_USB_EHCI_TEGRA) += ehci-tegra.o obj-$(CONFIG_USB_W90X900_EHCI) += ehci-w90x900.o +obj-$(CONFIG_USB_EHCI_BRCM) += ehci-brcm.o obj-$(CONFIG_USB_OXU210HP_HCD) += oxu210hp-hcd.o obj-$(CONFIG_USB_ISP116X_HCD) += isp116x-hcd.o @@ -72,12 +84,6 @@ obj-$(CONFIG_USB_OHCI_HCD_DAVINCI) += ohci-da8xx.o obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o obj-$(CONFIG_USB_FHCI_HCD) += fhci.o -obj-$(CONFIG_USB_XHCI_HCD) += xhci-hcd.o -obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o -obj-$(CONFIG_USB_XHCI_PLATFORM) += xhci-plat-hcd.o -obj-$(CONFIG_USB_XHCI_HISTB) += xhci-histb.o -obj-$(CONFIG_USB_XHCI_MTK) += xhci-mtk.o -obj-$(CONFIG_USB_XHCI_TEGRA) += xhci-tegra.o obj-$(CONFIG_USB_SL811_HCD) += sl811-hcd.o obj-$(CONFIG_USB_SL811_CS) += sl811_cs.o obj-$(CONFIG_USB_U132_HCD) += u132-hcd.o