Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1780436ybh; Fri, 13 Mar 2020 07:18:37 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvBruGzPX5DHQM8HSWM0nYchCv7YmTjtbm0K0HyGROq4DNJ57FveaeKNCCMNPhhiFCYj6/p X-Received: by 2002:aca:4e08:: with SMTP id c8mr7190104oib.143.1584109117673; Fri, 13 Mar 2020 07:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584109117; cv=none; d=google.com; s=arc-20160816; b=u+LC7cQ1YjUdYhxh5n0EG0KylGyinjidwoLNS1C1S8lrwmvamuc/MwC306MCQAEt19 Mtljd1jiyKS/jxGV3i74wHhWWHsvMTQKr56pPiArExTVpU3iuaZkPibkiEVmvC5EC4uf G82h8JBdmzzvOg6gAozndl0cHW4S/diWPD7sgUAeT9IEUOjj9DjtpRC5/9L/1rehyuu4 lvp/PMAS7f+wHAMODBmcgMpvOHSACali0yVvRazC7g4FSIhfCQd4aAmiPHvKXw2CwG04 gANtIDqoVc2kqLv3TSjgchgVafLhdYfuzVN7zvHNwlM/V642v3+iUtNz7Av+SgXSvhQR bWFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=bSpghWAMwr8Q+uEFRygw1e/iYUietdP6cX8XvjepZ+U=; b=Tbh/AeSuY6mbbKPgg7vcD4yZb8vP0U7Ec/U7YuMeJYAZjllwoFqKyNxpwX6PPdPooA 0Egb8l2Cy7YV44dIYRckX2zw20vAzOYAhFqkkv/OpDF44VufrHlaXlBUW8QNKNk6KQI/ 9KEbFrK4aWy5RiXQdP3unAC24JQjgBk9Qz8IKc5oGhsD9HprfTJxb2eZ5vp3+IpfCPVN bZsDGDh2t7ygWBuefcHEBMgYtEZX7u/fkY3PGKqQT9EyGFSzaOxh/Q7AjSjDoQ5G0Az6 W8+eoRmmTdHPlQm5ymwFr0drN94PT8byVsgnQloCr8ULzC3F+I5GWZZkc8+CRUelWkF6 tO2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EPJ8MjMj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si3734967otb.169.2020.03.13.07.18.23; Fri, 13 Mar 2020 07:18:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EPJ8MjMj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbgCMOQb (ORCPT + 99 others); Fri, 13 Mar 2020 10:16:31 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:33632 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726958AbgCMOQ2 (ORCPT ); Fri, 13 Mar 2020 10:16:28 -0400 Received: by mail-wr1-f68.google.com with SMTP id a25so12323504wrd.0; Fri, 13 Mar 2020 07:16:27 -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=bSpghWAMwr8Q+uEFRygw1e/iYUietdP6cX8XvjepZ+U=; b=EPJ8MjMjDnDTgKA2OhGgCSXfsmAgm76W53Tnwy+u1uWTTDZH9zPuJk2ktTkbQpRuIs YyFkcdmmYOlUPj/t9VsUIAxs7e1rOw0dKSJrcsRpNZLtcLXDP4+eVc7KnrwbylpWLI1F gfTKn0aRhAv4o45b0qbrpm7PEeQ9dKIZdGKMHOGSsBCVprijy3O35vE7wemVldA3+MC0 dISFBR21knHcNnTMcbu/WeoXuSimCySQlkvaq67H2l4gyeb40M5FY9CuDN3hq5k9Frab eDtXeUprWtAvJJe8zLcVSWVod3Ff/WaXWYuMoIICXS7QbNRzbvQLz/X2sH0OQO3MHTkw MVBQ== 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=bSpghWAMwr8Q+uEFRygw1e/iYUietdP6cX8XvjepZ+U=; b=gN4fzcwAGePP3bsdbe20Bp14ISP4IaNDtiKo5dLq/IBLE9p54xFnkrb9ULckzvoKbh c//l4NhaGlNiWhDNpjLqRAQICPVL7PJy1vosHAfNEIwWz3V/da1qGMiZKyP/jzDCAhVa 8vVsfRmynRmO4JEhnH0YHH3dhFM8K7Tx7rxcLWe1FGA0WgrueaBvXv9TsAiVfqr5kM62 c6mUozfW0bHaX5/uRAyl4shwcYzg1TLnc+URj5QJQUvX4bT7XxhZXhMZ43mdFmwZszWq y5fzXdQ43DthBUOj6k3n3lAsC32vZs4R933lQVyZKKi+epAoDb+JvcBJKMN+VMNafD/y zbXg== X-Gm-Message-State: ANhLgQ0y18DeXPxZgpZ6A/5n9z1Tbo/n1TTr+VKn1iSvtfQ18na59p75 52W0LAoSAVMtm5EoZy5cT5aCU+zNnrE= X-Received: by 2002:a5d:528e:: with SMTP id c14mr18297940wrv.308.1584108986387; Fri, 13 Mar 2020 07:16:26 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id l83sm17561422wmf.43.2020.03.13.07.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 07:16:25 -0700 (PDT) From: Al Cooper To: linux-kernel@vger.kernel.org Cc: Al Cooper , Alan Stern , Andy Shevchenko , Arnd Bergmann , Bartlomiej Zolnierkiewicz , bcm-kernel-feedback-list@broadcom.com, "David S. Miller" , devicetree@vger.kernel.org, Greg Kroah-Hartman , Johan Hovold , Jonathan Cameron , Krzysztof Kozlowski , linux-usb@vger.kernel.org, Mark Rutland , Mathias Nyman , Mauro Carvalho Chehab , Rob Herring , Rob Herring Subject: [PATCH 2/4] usb: xhci: xhci-plat: Add support for Broadcom STB SoC's Date: Fri, 13 Mar 2020 10:15:43 -0400 Message-Id: <20200313141545.31943-3-alcooperx@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200313141545.31943-1-alcooperx@gmail.com> References: <20200313141545.31943-1-alcooperx@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 | 11 +++++++++++ 3 files changed, 43 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 d90cd5ec09cf..9314620b8fad 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 const struct xhci_plat_priv xhci_plat_renesas_rcar_gen3 = { SET_XHCI_PLAT_PRIV_FOR_RCAR(XHCI_RCAR_FIRMWARE_NAME_V3) }; +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", @@ -147,6 +152,12 @@ static const struct of_device_id usb_xhci_of_match[] = { }, { .compatible = "renesas,rcar-gen3-xhci", .data = &xhci_plat_renesas_rcar_gen3, + }, { + .compatible = "brcm,xhci-brcm-v2", + .data = &xhci_plat_brcm, + }, { + .compatible = "brcm,bcm7445-xhci", + .data = &xhci_plat_brcm, }, {}, }; -- 2.17.1