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, }, {}, };