From patchwork Thu Aug 13 03:37:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 258887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B285C433E1 for ; Thu, 13 Aug 2020 03:38:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D473E207F7 for ; Thu, 13 Aug 2020 03:38:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="O5BsyDq1" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726587AbgHMDiv (ORCPT ); Wed, 12 Aug 2020 23:38:51 -0400 Received: from mail-vi1eur05on2040.outbound.protection.outlook.com ([40.107.21.40]:46849 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726576AbgHMDiu (ORCPT ); Wed, 12 Aug 2020 23:38:50 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D7d6pQbAjMh0lRKMuztLOZ//zWaRUs7nA/RQmx8ZEVJBr0uj9ZXXVkPqaOJeZaca1cMT0JAls1tjll+rJJRta5c/M2CcJ4L/cFIY2sgGjRKK6PEg1eCA/6tiUd2owvq52zka5KKh/AT9qAHImGmM011X+LZSmCItRlFc+RXXwSZqC8PbjrXVzSzyUoeTVHJFMTn5ugS05/JeNJkNcObLZkzjtNDGTxEyX7wUbeqFYJ9vcsBToLbpnd2UZZzxqttXbt4df8K/yGqQSEngHFwrfS0iY0aTr2oZr8vQTwNsdAYUBA0ZsLfzHTkq+NPMI93epXAZeSEX7G84VyrpnC/LKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spaYOvH8F/9QH7WGZtpWwXsHPxLiYcpIsu4YuOb9WE4=; b=XFQH3lKlp+sYp99tGC6B4BvUhx/ksbmdiHjl7V/hKgxAo2JJnydSkF2daBMolFtXek8kwfokjb3FsHxR2dFtiya5ckeCLfDLPYEwnbLDFR+PHCM5qUlX5L4Zl7rS8Dv6CyotMwvsWVzhjiL2aAvKXYyRkwDXMZ9m19bEw2HfUttXwaXcmi2tLwASECcFx3vOPfWWcNFvyfpY3ZeUZm3Um+JZ7dg0bqriaQox7TredrXMJkNgjpnGyao7TXv54xE9qQZ5Tru6aP3xfLckB52YAXX3k/EL8EKSrSwQYQOcFyyn2Hm+SYNw0kSjEfOElWwHQWlOdp+bmgSDBU2HAePrvw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spaYOvH8F/9QH7WGZtpWwXsHPxLiYcpIsu4YuOb9WE4=; b=O5BsyDq14SYp6rcTnAwgfsIwjUEYIv4s5ukIssAhnp0UyEaW07RT2r9mGimq0uOZ/KOwUnhp6aGHh7IrqsNNMjyg+fWU2nWBnXUM+VYMY+T2N3RpskQQ5duAxHtVgSqVxR6NWeBeq/VbAS3rGFZgfxRdHzCetnNgTTUcbi2IgBQ= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM6PR0402MB3654.eurprd04.prod.outlook.com (2603:10a6:209:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Thu, 13 Aug 2020 03:38:47 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::ed7f:8755:5994:7fcf]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::ed7f:8755:5994:7fcf%5]) with mapi id 15.20.3261.025; Thu, 13 Aug 2020 03:38:47 +0000 From: Peter Chen To: mathias.nyman@intel.com Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, linux-imx@nxp.com, Peter Chen Subject: [RESEND PATCH 2/7] usb: host: xhci-plat: add .suspend_quirk for struct xhci_plat_priv Date: Thu, 13 Aug 2020 11:37:36 +0800 Message-Id: <20200813033741.13982-3-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200813033741.13982-1-peter.chen@nxp.com> References: <20200813033741.13982-1-peter.chen@nxp.com> X-ClientProxiedBy: SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Thu, 13 Aug 2020 03:38:45 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 53a122be-a401-47e9-6cee-08d83f3a62d9 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3654: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3513; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7157.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(376002)(136003)(346002)(39860400002)(6506007)(478600001)(316002)(26005)(6666004)(36756003)(6486002)(86362001)(186003)(15650500001)(6512007)(2906002)(66946007)(6916009)(66476007)(66556008)(4326008)(5660300002)(956004)(2616005)(16526019)(8936002)(8676002)(52116002)(1076003)(44832011)(83380400001)(142923001); DIR:OUT; SFP:1101; X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 53a122be-a401-47e9-6cee-08d83f3a62d9 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7157.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2020 03:38:47.3527 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EOAZUEIMam31GfLypPddqbcQhg4UqLbOTd2D5w5Vu4GEJ2dlRIte1oAOlI1Ea6/tSu0mz4nQVGgtBN1RUJflaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3654 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Some platforms (eg cdns3) may have special sequences between xhci_bus_suspend and xhci_suspend, add .suspend_quick for it. Reviewed-by: Jun Li Acked-by: Mathias Nyman Signed-off-by: Peter Chen --- drivers/usb/host/xhci-plat.c | 19 +++++++++++++++++++ drivers/usb/host/xhci-plat.h | 1 + 2 files changed, 20 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index c7f98edc5678..c3ce4d762adf 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -54,6 +54,16 @@ static int xhci_priv_init_quirk(struct usb_hcd *hcd) return priv->init_quirk(hcd); } +static int xhci_priv_suspend_quirk(struct usb_hcd *hcd) +{ + struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); + + if (!priv->suspend_quirk) + return 0; + + return priv->suspend_quirk(hcd); +} + static int xhci_priv_resume_quirk(struct usb_hcd *hcd) { struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); @@ -401,7 +411,11 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); + int ret; + ret = xhci_priv_suspend_quirk(hcd); + if (ret) + return ret; /* * xhci_suspend() needs `do_wakeup` to know whether host is allowed * to do wakeup during suspend. Since xhci_plat_suspend is currently @@ -438,6 +452,11 @@ static int __maybe_unused xhci_plat_runtime_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); + int ret; + + ret = xhci_priv_suspend_quirk(hcd); + if (ret) + return ret; return xhci_suspend(xhci, true); } diff --git a/drivers/usb/host/xhci-plat.h b/drivers/usb/host/xhci-plat.h index b49f6447bd3a..1fb149d1fbce 100644 --- a/drivers/usb/host/xhci-plat.h +++ b/drivers/usb/host/xhci-plat.h @@ -15,6 +15,7 @@ struct xhci_plat_priv { unsigned long long quirks; void (*plat_start)(struct usb_hcd *); int (*init_quirk)(struct usb_hcd *); + int (*suspend_quirk)(struct usb_hcd *); int (*resume_quirk)(struct usb_hcd *); }; From patchwork Thu Aug 13 03:37:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 258886 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01A84C433E1 for ; Thu, 13 Aug 2020 03:38:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D42D1206A4 for ; Thu, 13 Aug 2020 03:38:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="RR8YSBjG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbgHMDiz (ORCPT ); Wed, 12 Aug 2020 23:38:55 -0400 Received: from mail-vi1eur05on2040.outbound.protection.outlook.com ([40.107.21.40]:46849 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726576AbgHMDiz (ORCPT ); Wed, 12 Aug 2020 23:38:55 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fdiez2d0kDFzYnHTIZtO/v9p/Zedj/5dsskEF3EBg1KWxtPgxW0s0EVJnYyjknrpILyP7O1MP6GAn5oarWIdI29XFgouVNYt+Yfz/A5aYRawqsyC5wAPpZNn5DMJEcLbiB5U2qzvnP9Gy1IRoKYTgHrI3Cg5A7WK2IZ/wBLoM7wPMbmyYDZoGyP7YQIx30V/qYfErNyQq1PzkjTLkXNRHiUOgfTxBNwfOoxWumC3hgCn/d5ALBlZVUgCwXUrO+RpXPtEZ3h7Oasqo8l64idxyIiT36ADG4608nRHVgS5jjF+afLCtvlrEJocGZeiel2Ko+7R3RoHg89C0mjmIBBK5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qUQGhqU2QSjGJfTEsJ50YEPIEd+emQGe7ZzPcZUwZrk=; b=UzN3FI8omZ6SdxdsQjYnZ0fbWQr0YGpE1uBR12nCJT2sHkzejBALtLkSoR1aMxSehHE1pK5stapHTw4iKwT8LyUxfK3ct0Eskhrdb90oTcB9E0JWNrStCkErussc450lqotdvoGkJqQIUZqjfaevdkKDc0VXlOuyQUTvQFWjLfZZ3MVnCSfOHXO0VmdovhLXTkuA3tk6jcC5aUw2SZc43pYT6M2CjJB+W0aCiiVxboVmd/nSnYe7wCX/wtzhWQ8AxNpqpHJE8Z1u88lE6DGkguOhiMM9ETiZyD/hVNqVUeixFTE5AMjUsaBBCIq95kp99qC8WAAlISTdazGmw9VcuA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qUQGhqU2QSjGJfTEsJ50YEPIEd+emQGe7ZzPcZUwZrk=; b=RR8YSBjGNoo1KVaztSwDa82yWcLb9GCNgsyiLvGdKHfyP/BNlz1dddXcZBurXiWJOSk0KFes4SJ3+56Ae67uuCbaNOKLPSOjf1vysM16lVWIDixWeRi/IPdeC+VWd8ujqtO6rAQ1gKaUAU9nnVCsUDBXfGkqqGYm/l9tQvDCM0U= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM6PR0402MB3654.eurprd04.prod.outlook.com (2603:10a6:209:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Thu, 13 Aug 2020 03:38:51 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::ed7f:8755:5994:7fcf]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::ed7f:8755:5994:7fcf%5]) with mapi id 15.20.3261.025; Thu, 13 Aug 2020 03:38:51 +0000 From: Peter Chen To: mathias.nyman@intel.com Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, linux-imx@nxp.com, Peter Chen Subject: [RESEND PATCH 4/7] usb: host: xhci-plat: add priv quirk for skip PHY initialization Date: Thu, 13 Aug 2020 11:37:38 +0800 Message-Id: <20200813033741.13982-5-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200813033741.13982-1-peter.chen@nxp.com> References: <20200813033741.13982-1-peter.chen@nxp.com> X-ClientProxiedBy: SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Thu, 13 Aug 2020 03:38:49 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a5806590-303d-44f3-25e8-08d83f3a6567 X-MS-TrafficTypeDiagnostic: AM6PR0402MB3654: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7157.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(376002)(136003)(346002)(39860400002)(6506007)(478600001)(316002)(26005)(6666004)(36756003)(6486002)(86362001)(186003)(6512007)(2906002)(66946007)(6916009)(66476007)(66556008)(4326008)(5660300002)(956004)(2616005)(16526019)(8936002)(8676002)(52116002)(1076003)(44832011)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a5806590-303d-44f3-25e8-08d83f3a6567 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7157.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2020 03:38:51.6529 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Eg3l7sHQteGMRy6ISvK0ixCVuMHGw+rbWbodoEZ2gq8s9vOgGkKKgYeL3Z7f3x8AsxkPyFrKez3ChxLjuhewag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3654 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Some DRD controllers (eg, dwc3 & cdns3) have PHY management at their own driver to cover both device and host mode, so add one priv quirk for such users to skip PHY management from HCD core. Reviewed-by: Jun Li Signed-off-by: Peter Chen --- drivers/usb/host/xhci-plat.c | 8 ++++++-- drivers/usb/host/xhci.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 07ca000a0084..14ff65a387e8 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -183,6 +183,8 @@ static int xhci_plat_probe(struct platform_device *pdev) struct usb_hcd *hcd; int ret; int irq; + struct xhci_plat_priv *priv = NULL; + if (usb_disabled()) return -ENODEV; @@ -280,8 +282,7 @@ static int xhci_plat_probe(struct platform_device *pdev) priv_match = dev_get_platdata(&pdev->dev); if (priv_match) { - struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); - + priv = hcd_to_xhci_priv(hcd); /* Just copy data for now */ *priv = *priv_match; } @@ -329,6 +330,9 @@ static int xhci_plat_probe(struct platform_device *pdev) hcd->tpl_support = of_usb_host_tpl_support(sysdev->of_node); xhci->shared_hcd->tpl_support = hcd->tpl_support; + if (priv && (priv->quirks & XHCI_SKIP_PHY_INIT)) + hcd->skip_phy_initialization = 1; + ret = usb_add_hcd(hcd, irq, IRQF_SHARED); if (ret) goto disable_usb_phy; diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index ea1754f185a2..7658abdfca28 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1874,6 +1874,7 @@ struct xhci_hcd { #define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34) #define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35) #define XHCI_RENESAS_FW_QUIRK BIT_ULL(36) +#define XHCI_SKIP_PHY_INIT BIT_ULL(37) unsigned int num_active_eps; unsigned int limit_active_eps; From patchwork Thu Aug 13 03:37:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chen X-Patchwork-Id: 258885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4867C433DF for ; Thu, 13 Aug 2020 03:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81732207DA for ; Thu, 13 Aug 2020 03:39:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="q1IpFj2u" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726631AbgHMDjB (ORCPT ); Wed, 12 Aug 2020 23:39:01 -0400 Received: from mail-vi1eur05on2040.outbound.protection.outlook.com ([40.107.21.40]:46849 "EHLO EUR05-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726576AbgHMDjA (ORCPT ); Wed, 12 Aug 2020 23:39:00 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RgHgIfeLxtxRfJuMsTdywNKcqbc6vG4yyPiWEJuOff4caBIQ6HDhHex7/EIyJFEKX7eLU/0lL6xsGVcG+3PtiVJtX6fNY17XkN4ayo3pFxg63TDYAS/B8Pta6WVoNsbEIRVUmtUrT03o+N9n5qBxeidrRms4bHJ2zGNsEiuuu9DKQnFRNoC4khqVOcoMrS3byY9s4uq3toKJK8wGXLOIiRWi1UUvW7jQbq71kqliMo4Y7hTB2cYO8PSR50OiitjpvwxmN8buQDFlS1/DeIeKa2qywCTdE8oTh13DlJ876oWXHYcwYnHos/5JY+KkhaHyg+Q9pByHZDqps36USfsjsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SAMDPVNMui449JSukPWPPS2D9k5beTUCvuOBplnFeGE=; b=bpL6NQ0mIyorrgmUTW31ZxHalq2cyka5pzP3CnWCbEYbHyWbpSnjk5cvfFy5+kfOiU+0l49UBek5xVn6HIdcTKYKXdqL/QP0sZs6dGytWvsB/7TfOXXo4Oc+fms6/bpH23o2qmluy7SUeEerl0DUsLrMBz9rcRMhV2YCmjEBHNh9ffhQ4GT5hRc8yZKTponEL3mHKiUl5oF7kce+xjmiujUkj0kpJC7Vae0JwJlkCGQ/I3VyddDUiZTKlOl0IYA7EmwehvTndnP/VJwcDn9v8M/jJWDsv22Vx2Cpegi4ctaRuOU+DwEEHmbXlxcT+ZgWYTKexICxp23t6B2FkHnOqQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SAMDPVNMui449JSukPWPPS2D9k5beTUCvuOBplnFeGE=; b=q1IpFj2uOXT53B7sDkHJhB7Ttvpx8Byf85kZDiwnhdSNM24657LBeOtDxbX8y9aCqP66SJGTg/mkcYEd/gR8/Ssk0alppbn3IOjHaNXVI6+0OYZpsZch6IYAZMPvGNKOVQYTTWt8LtLfS/SPXBeI1g8t2ofizVzUeiQGr9bpSzA= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) by AM6PR0402MB3654.eurprd04.prod.outlook.com (2603:10a6:209:21::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Thu, 13 Aug 2020 03:38:56 +0000 Received: from AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::ed7f:8755:5994:7fcf]) by AM7PR04MB7157.eurprd04.prod.outlook.com ([fe80::ed7f:8755:5994:7fcf%5]) with mapi id 15.20.3261.025; Thu, 13 Aug 2020 03:38:56 +0000 From: Peter Chen To: mathias.nyman@intel.com Cc: linux-usb@vger.kernel.org, gregkh@linuxfoundation.org, linux-imx@nxp.com, Peter Chen Subject: [RESEND PATCH 6/7] usb: host: xhci-plat: improve the comments for xhci_plat_suspend Date: Thu, 13 Aug 2020 11:37:40 +0800 Message-Id: <20200813033741.13982-7-peter.chen@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200813033741.13982-1-peter.chen@nxp.com> References: <20200813033741.13982-1-peter.chen@nxp.com> X-ClientProxiedBy: SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) To AM7PR04MB7157.eurprd04.prod.outlook.com (2603:10a6:20b:118::20) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from b29397-desktop.ap.freescale.net (119.31.174.67) by SG2PR01CA0142.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Thu, 13 Aug 2020 03:38:54 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [119.31.174.67] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: bd7abeda-cecf-489b-fed8-08d83f3a67ea X-MS-TrafficTypeDiagnostic: AM6PR0402MB3654: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4714; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM7PR04MB7157.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(376002)(136003)(346002)(39860400002)(6506007)(478600001)(316002)(26005)(6666004)(36756003)(6486002)(86362001)(4744005)(186003)(6512007)(2906002)(66946007)(6916009)(66476007)(66556008)(4326008)(5660300002)(956004)(2616005)(16526019)(8936002)(8676002)(52116002)(1076003)(44832011)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd7abeda-cecf-489b-fed8-08d83f3a67ea X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7157.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Aug 2020 03:38:55.9829 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 7smKU7bjXgu6KQZ6S+2ccib4bdxUV3I3BhgR6V6HJhjZDhmlFwE6oT5p5QbmaSJHAAhSN0aam2UXrXmzRTKjCw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR0402MB3654 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org To reflect the current code status. Signed-off-by: Peter Chen --- drivers/usb/host/xhci-plat.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 0ef28b2caea3..7e2eb0439c03 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -421,11 +421,7 @@ static int __maybe_unused xhci_plat_suspend(struct device *dev) return ret; /* * xhci_suspend() needs `do_wakeup` to know whether host is allowed - * to do wakeup during suspend. Since xhci_plat_suspend is currently - * only designed for system suspend, device_may_wakeup() is enough - * to dertermine whether host is allowed to do wakeup. Need to - * reconsider this when xhci_plat_suspend enlarges its scope, e.g., - * also applies to runtime suspend. + * to do wakeup during suspend, the wakeup is enabled by default. */ return xhci_suspend(xhci, device_may_wakeup(dev)); }