From patchwork Fri Nov 9 14:01:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Cooper X-Patchwork-Id: 10676029 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 1ECA313AD for ; Fri, 9 Nov 2018 14:11:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0DAAF2E3D2 for ; Fri, 9 Nov 2018 14:11:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0186B2E4B0; Fri, 9 Nov 2018 14:11:58 +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 8BB012E3D2 for ; Fri, 9 Nov 2018 14:11:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728272AbeKIXwU (ORCPT ); Fri, 9 Nov 2018 18:52:20 -0500 Received: from mail-yb1-f194.google.com ([209.85.219.194]:45326 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727802AbeKIXwT (ORCPT ); Fri, 9 Nov 2018 18:52:19 -0500 Received: by mail-yb1-f194.google.com with SMTP id 131-v6so1059851ybe.12; Fri, 09 Nov 2018 06:11:33 -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=SQ1qrcLiIRYqOVmsCK0PkJAXJvvPlMp6EdxfoWbisj0=; b=RdxUyQbkpkC6SAQUQSvaz17J9cY1KfdUEWq03ulBktroBdHbQCT3Xl0zl6sD6FD/Vs 9ZQ2IED5qBB3EwGQa4kanWL17vCm1idiTEWQTt273lnTxwT6S7HGXFI0l1TJOA7CZJjb tRvjgLD8da+8wAGmvzsL1n10A2JqKJjoPpMUqUHjnPqN3jiLCyNIeG/vhEbJPjtWQlm8 edJa3ttPeND/8V7iyuW2m5Kf8RJJmpsj16pmauC/GZ4GgV836++azscamvxn8a8h1yga vaB8h6pbXL/Jf67+lVzEJCIA2yirmsKff+wpKNgePNJ+zAIvrVSa5zf4inrlpB9RzxR5 b1vg== 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=SQ1qrcLiIRYqOVmsCK0PkJAXJvvPlMp6EdxfoWbisj0=; b=VLPCTZ25r7aRjQ+tcOyxojr327ABW2yjptb2iPM1pX1tWCUMLHfnnAotQbcdXSq3Ub +s+pUkI6H0OdYXPRqyUHdsESuAZi2EdBRdS+xMLNxwz9deZO+NdWjH14v3IwkFROWkPS 46yL9F6BrGvO/CrFx4SqauUcOw3eP/2FYmBY8wsFDuPO1iyV7YSi2Gxh6CLj5jmLxNwT HMFX8//9xQKkbm62n41gMZfqjjqu1ZpDt63QZUnwmivb/Z1hISvPHQjIKAIwdiQUFY3d my9nM7gyah+CgGtcqukzp9Ef5A6bLqtn1FH6ElFnmWjZAZ/VqUoa69pel92osudytfEI Uwrg== X-Gm-Message-State: AGRZ1gLmIXbMPykmzNntlGIIpo2/G99Qo42UD23KYwY0dnjX336uoxKD 4/96zEQ5ofedAFIi0UgT9yyQ1s03+bA= X-Google-Smtp-Source: AJdET5f5qCC9oQa2WkHIrYuP38sbT2YTTrYLFjU4qmfPyEXSslJMdN8FUzcKETUQigVvtYWhz0adRQ== X-Received: by 2002:a25:48c7:: with SMTP id v190-v6mr8705826yba.7.1541772692936; Fri, 09 Nov 2018 06:11:32 -0800 (PST) Received: from stbsrv-and-3.and.broadcom.com ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id c6-v6sm7301965ywh.34.2018.11.09.06.11.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 06:11:32 -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 , 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 V4 3/5] usb: xhci: xhci-plat: Add support for Broadcom STB SoC's Date: Fri, 9 Nov 2018 09:01:58 -0500 Message-Id: <1541772120-40394-4-git-send-email-alcooperx@gmail.com> X-Mailer: git-send-email 1.9.0.138.g2de3478 In-Reply-To: <1541772120-40394-1-git-send-email-alcooperx@gmail.com> References: <1541772120-40394-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 | 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 +#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; + 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, }, {}, };