From patchwork Mon Nov 5 21:31:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10669225 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 6D94114BD for ; Mon, 5 Nov 2018 21:33:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6709929349 for ; Mon, 5 Nov 2018 21:33:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A5E029A0D; Mon, 5 Nov 2018 21:33:35 +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 2611629349 for ; Mon, 5 Nov 2018 21:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388121AbeKFGyt (ORCPT ); Tue, 6 Nov 2018 01:54:49 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:46763 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387598AbeKFGys (ORCPT ); Tue, 6 Nov 2018 01:54:48 -0500 Received: by mail-pl1-f196.google.com with SMTP id c13-v6so5065668plz.13; Mon, 05 Nov 2018 13:33:06 -0800 (PST) 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=oXPFAGO9CBh1PNvDRHgtigu8kPEG9MMwio1UV3mOaN8=; b=F/GVD1GoFRY+47VtWmBY5PMNbpPc81MoeiMfFCs9D6dHB7eFaXV3vb+GAYcdFySkFQ 59Y20NgCTcpfr14ImyHUSwO/K33KONj9VvhI9GCwQYz0DGFDpbaaKSQ3HEeKEd5I3eN1 UoYjb8twlt0w2fRkm6r7FdMAe8GPmrYnNRoOkvxwtEp2x2mULCV07brx1lnEV9aXnXqz qocVERjpXnRkLnj09jLgBb4+tde98inSZ8shWjwbwvRk76lUkh8U4eHyln+H/InEawZB B5cTRo2DdLWlF6VoG9GizLLrEXuM+drFfszrGmHHszkHLI+7OV5FFgQFWKY0aNuH9iNb pJog== 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=oXPFAGO9CBh1PNvDRHgtigu8kPEG9MMwio1UV3mOaN8=; b=FUxaJFYeM6vPoPup/jay32eywvZLe9+UB7Anp18oCc/ymt9d8F4d8aDJZQH7BR3mEB Arqo4jerPn6jV8ErKuykq2ilIAeXsc6JnM/cZB4xDFOv2MSJgX44mbxifvubGQ593Yy0 kSlVlY9g0L4G3V7TLCdDH8yilj8DE54jUj7IAOYRH51hbqz03b7765AdHviAHON9+uB5 2/F+v5IGe4QoORbc7hrgGPAKm+AbFJD6bYhk5bC6xdzsLCUZI7Pw3wLEjLzY+hEH9WpH LJNSSozX7ct43bmbGtHMIUy6p/Y6Wv73+kKUFaYJ9yyr/yWBL3yAlC197hrxAk7OWVEK 0jQQ== X-Gm-Message-State: AGRZ1gKMdLLzMqQEs0h6p7nn04wkEtb+cuZCnGD059RLqPQdvyJ9fNKZ 0BeHwk9siZ2ZHqDRpOIml9cpCBbKybw= X-Google-Smtp-Source: AJdET5dCpLjXo1H39p6UpTy/x4b3rXTKd6o2rcWIDMjKtMvMJZxPUrwl1CYuysig397M9pCWExE5/w== X-Received: by 2002:a17:902:7c0b:: with SMTP id x11-v6mr23371532pll.60.1541453586279; Mon, 05 Nov 2018 13:33:06 -0800 (PST) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id m129-v6sm14328440pfm.78.2018.11.05.13.33.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 13:33:05 -0800 (PST) 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 V3 3/6] usb: xhci: xhci-plat: Add support for Broadcom STB SoC's Date: Mon, 5 Nov 2018 16:31:30 -0500 Message-Id: <1541453493-34981-4-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1541453493-34981-1-git-send-email-alcooperx@gmail.com> References: <1541453493-34981-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..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, }, {}, };