Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp794979imu; Fri, 9 Nov 2018 06:17:11 -0800 (PST) X-Google-Smtp-Source: AJdET5ctP2sfeUHqFNf4oOPJFYPlfDikMxUmeNeaNDwKy3B7FRtkjvFzE0v3WJ+UEpEpkc1yuVEs X-Received: by 2002:aa7:80ce:: with SMTP id a14-v6mr1079283pfn.86.1541773031476; Fri, 09 Nov 2018 06:17:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541773031; cv=none; d=google.com; s=arc-20160816; b=cDjb8+YdIAj8aYTMfbG6/WnBsnAcpixcDbNdRX2qvJny/rj4v4kHH9Cqb54FtuvYRh VC+MsPK9mNNmLhMNpBKYOz/giCswyq5vKYTZ8VDDE4WoJspYpcyG8znxvtJRvdwXXFWf 55bkRZD0YMTPPhFfxp20KDZHPpZgk7YnTvPXrTqaLbO0MMVUcAHTrfojtmdqacMjFqSC AbrbrBs4qgzLQpsFublGJZ5hbvnV3MNXrCUfXiZb6oUtNLcqe1k8DV7oY8wJ3s2Tt9xa OrHkhE1Sns/zTDUzOUFuT46vr4lF2LLfsiCBe8hyYgz6oklEA5K2iGXq8hjaHq/eM3UE 8iwA== 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=SQ1qrcLiIRYqOVmsCK0PkJAXJvvPlMp6EdxfoWbisj0=; b=OKQtHbxN88Q09igfNrOzmFXBbjeGwe0kpkyHNOEr91BxtueK75bfAxkYbityCFNHjb 8APvXXsUKyGc1MUOBIJPwMPMcUZ8CbGHPOhPIKM11S8YaL7/aOy6d9FiGqjFVHvz89vS TlK4Us1CoYytrVHshR4ZNS/DFT95UACEWMK8EWYiYFYRPq51VXQdybXyG+ZeNwE/qmIv wXXovW0ajVFP0CMwUZdmVmKzsgvMa+H2RGYVRBF+141WFcpUGXSPR7pKb/P7MxgIU5nJ exIHACMOD+mcyM27+XXPQVBHuv+fNpf5wTRYjyheQrqZh1g2FFDQ/89oLo8XD+OaLgad f9vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=RdxUyQbk; 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 u129-v6si209868pfb.201.2018.11.09.06.16.20; Fri, 09 Nov 2018 06:17:11 -0800 (PST) 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=RdxUyQbk; 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 S1728247AbeKIXwU (ORCPT + 99 others); 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-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-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 | 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, }, {}, }; -- 1.9.0.138.g2de3478