From patchwork Fri Mar 17 10:02:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Shimoda X-Patchwork-Id: 9630269 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CFFC760245 for ; Fri, 17 Mar 2017 10:28:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BAB5828631 for ; Fri, 17 Mar 2017 10:28:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF978286A4; Fri, 17 Mar 2017 10:28:59 +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=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 3929C28631 for ; Fri, 17 Mar 2017 10:28:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751039AbdCQK27 (ORCPT ); Fri, 17 Mar 2017 06:28:59 -0400 Received: from relmlor4.renesas.com ([210.160.252.174]:31330 "EHLO relmlie3.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750999AbdCQK26 (ORCPT ); Fri, 17 Mar 2017 06:28:58 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie3.idc.renesas.com with ESMTP; 17 Mar 2017 19:04:47 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id D94256030C; Fri, 17 Mar 2017 19:04:47 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id DDC18480A5; Fri, 17 Mar 2017 19:04:47 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id D7FF348014; Fri, 17 Mar 2017 19:04:47 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id VAQ10615; Fri, 17 Mar 2017 19:04:47 +0900 X-IronPort-AV: E=Sophos;i="5.36,176,1486393200"; d="scan'208";a="236978072" Received: from mail-sg2apc01lp0244.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.244]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 17 Mar 2017 19:04:46 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uDVFrhLUF15SbniF0k7PVjVQBbgwkablQzM88Gwwg7E=; b=KBauafhOQx+2Pt5txSINveNsIWAjICCvoDMAGbNfFbdxr/RIWq9F6PwUGZQr7RUrZoeBs2tleDLF9gBjM4hxQn3Z0DPg5pWbgsE1MyMXSZgae9Sd6DP4GG7tuSgLgabX04poJdEcAN64O47zfuiXhsxN4PYJwIOmSFk16/13+5E= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none; intel.com; dmarc=none action=none header.from=renesas.com; Received: from localhost.localdomain (211.11.155.144) by PS1PR06MB1691.apcprd06.prod.outlook.com (10.167.53.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.977.11; Fri, 17 Mar 2017 10:04:43 +0000 From: Yoshihiro Shimoda To: , CC: , , Yoshihiro Shimoda Subject: [PATCH 2/3] usb: host: xhci-plat: add resume_quirk() Date: Fri, 17 Mar 2017 19:02:34 +0900 Message-ID: <1489744955-29553-3-git-send-email-yoshihiro.shimoda.uh@renesas.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489744955-29553-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> References: <1489744955-29553-1-git-send-email-yoshihiro.shimoda.uh@renesas.com> MIME-Version: 1.0 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0092.jpnprd01.prod.outlook.com (10.167.153.180) To PS1PR06MB1691.apcprd06.prod.outlook.com (10.167.53.13) X-MS-Office365-Filtering-Correlation-Id: 921b92b1-07b5-4b01-f4f3-08d46d1d08df X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:PS1PR06MB1691; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1691; 3:IEy7HovjnVzOPR/tvkCMbaQAbuVYNHaYvnkRQSAmwGQsH393P6KgorFvn4xj8AonmD869P7njnm2/h5eOcjFPv+QqUemMoqpGRvutRmueYM/3Fpz+/iUx4C3SxlUDUJWTZ9fNFrzW/4c4v+utl11Uip+4jYm7i+a3O5bsq06u/xXwU4uRh/bCDAbC+U96vWaeLvc29OTCEPnzEKoMvRtFbBqUmq9Url++MOXPVGoERFgDsVV1mwqdU/vfuyJpPMFbye+PakTUjtazvs9mFr9dxffaXiuireIjAK4Fb9yp9o=; 25:DCHqec0ZIl4Twwv/9WKtR/DVMUYda2RvlsJXVXjTK1zRNI25xamc25y85U8Y/GsdV2nDhhhJCgTsTElP3nbdLDizcSzgZSEe9l97C6485FYp4EdvnJn4RX+f3zVIgOI0IZL5UAW2i6JGEIlXMpy6+ytO2yJ0mOQCm72XhKwiwzItLxsgAv2cnqFO7/9lvExtN/bkRuG6ZIkeNyQCwHS+ZKfsFLHEpHMxENfkVt0E4w9TgPZ7IVafqUelSkcRbQWQbWOIrVK9mwdDdxsLZWWa9dyCWkHpnOVQupe2KrdtaZRHbS6kxfp+dVE5a6QWKb3kdigWZh4MYQD7MrgkmAaLbiUrQ3IN1ZdA+GEt1pu+Lxl2e9RK1GTNHIr24cwB7qPIMHENG0PDeJR7rgo722/HZSVO+mx1tTo7OBUi4+NSbWnNDC4JdvHqIrhh6eqtxBm7sfpK7oCd7iB/s00O3C68EQ== X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1691; 31:jjUKkzm70ZRyuAXaFLE6ggV+iIAbmnRMMdwhe82n9vrBplfpaRcClIGcA55iLtliIBwS/Ews5hYC7askt0g9IZVGRcjyWJXOUOmEc/djd5wKLJC6489yJQ9UZHduUrz5zijH2ec/uS2tkze9UB3XgROgRHN5Axy7IxQoCtKXbfx+knSzjzriBP0WPg7abUCFmSSQ42SCXFLdakOp9jwkI9DwXZaPqtTCiGjkPN+ky8E=; 20:NRxmIA2uJx5YYzk6nEa73V1Lblm2ukPqIzHzXlfXaFG9blIHxKOpTBAIxq2VF5x//MP6Uqgx3AWTeyFcWayxugZDmcRu+CPJXRuf4ex5GeWxjkvLEQqmFHgtE8ItCPzNXhaLGomj28YgyOgPAArjB/O7rfTkc29jHUMcQ5V2xtQWYENQxGS32Q/ZX83naJkGQMEyr28AL5p5M98MaJOuooyW+WrlDJblaV+raH5DKbE0umhriqkWu8gzR6njer96znuv6/59D+dqDek9Xbrqh6eXA0XKYkYMyQleTgHoq4CwPrT8Lvf8uFxmqO33Ug/jLgHVPr0CRS1Zw+GcHp2a1475ASnFHBVhv5tyy+GbmjDgd3N9fBOca710vVWakr2K2yTbtZBolEbdYp7DXBBg/r5g51surxcexW5N3PEUMP8POft5eU4Fy24KC/3dnmFjWfvqXvZ9PzrwtjMJsvTlhDbltkgcihS+77qjPLiIabb4GkegXiJ8iIA6mMSjk2G9 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558025)(20161123562025)(6072148); SRVR:PS1PR06MB1691; BCL:0; PCL:0; RULEID:; SRVR:PS1PR06MB1691; X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1691; 4:IkyEFAosC28rqaJQYxwCV/mXloeMkTtM2LC3ojA7M4vlbG5Wkv3NoyAu6zdGc/+akLG4IjB1yH4ISi6Tgn5jSrTzE6h2zMtKAr0ZklwgeMehAbTaImH6f8BL1j5/nTSFzGjgCYRtNno3VHYxlqT1DNhVKIemCqiSL8uvZ9EhH6jtqrpN4cNekLytZ6yyzTvldGirnhqraObBZlZeq2GO0lhSuMya6mW3SYkm0jWt+RVjCasigIjVZzz5pn7F3sdep2KexHaGt0MiCqcXox9JBLbfQm9znbQ/4/WYC+9j0THUjKRLxY3b7m+ECoJtnPEK6Wpd27aQB/TzPfN5W/mV5Eg//YRS97pzOn/ioBKXGVRCqG1x+/ZOy7fXo3ytQstP3PdTI7u+E4ANTchrw42mFKY9gUqfcmBqNoso3bohQ+IWZsY342VYG2MT0ZNlIMBgakhamhh+Xcqkrofp2fXeoJi/qyC3SdUBYPkstbV1mDTSM9MycjH4GUNEHRgX6JVxiEzb3XwB2kfqT4xljhO4fz3eT6KMwtf7tuEpwa0Xw8pTiZH9pev9hP2mNFeD4cJbvGu8Tkvsm39n/B37L5xOAHAy++NC1Uc+AVFyTtU/R5Qor9tgOozIb3U1LsL1WVVV X-Forefront-PRVS: 0249EFCB0B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6069001)(6009001)(39410400002)(39850400002)(39860400002)(39450400003)(39840400002)(78352004)(5003940100001)(3846002)(6116002)(36756003)(7736002)(305945005)(50226002)(81166006)(8676002)(2906002)(47776003)(107886003)(38730400002)(575784001)(4326008)(6486002)(53936002)(66066001)(189998001)(76176999)(50986999)(5660300001)(50466002)(48376002)(2950100002)(6666003)(42882006)(33646002)(6512007)(54906002)(42186005)(6506006)(25786008); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR06MB1691; H:localhost.localdomain; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; PS1PR06MB1691; 23:4biYiZgVfqvr+/f9RYG3HdKfd+55zvq9k3PIQlevG?= =?us-ascii?Q?C6kzZ0kZn1/OmuUg/9qBfFR++p7sY6yBNxX71KnuJKswXg04SdzIGOaBrYLM?= =?us-ascii?Q?yKVUGuj2tVksfbLvNmtb5XJs/OQLbBqfUEtrWZn+U3TInh6fUOj1LMlDni3B?= =?us-ascii?Q?fQMBoD7m1Jtl8esCdBwYPwqW6fbQtCCHUVBe/PMtE6fPfx0XvXe5rpkXmTUI?= =?us-ascii?Q?qzUpiGiNsN5y2CzCNE+40vDlpB8Uf+e5v+txklGAlBuwRbSfdvzK/x8ZlCt7?= =?us-ascii?Q?+DZwjZ+LGohlCvsoFfOV23c9h97HU3Cc6ONJx3w3oGHI89ddk0Sg9JcfGKtX?= =?us-ascii?Q?iysmw+K0sFd62HXMeKzmvz4aoa9FxrHstbI3MHxNAiRGFc2Kptis7Je4jI0A?= =?us-ascii?Q?Ip/brIfXNhharv/aK5ZEtRl8akilcW3lnjXNXxJxE8Yl9Edtfclj38pWx/3b?= =?us-ascii?Q?nyNQBx69o3/RWtWTqRfWDZvxNf0ltZJ4AmRAV2qXmThLFqzixEnOShA4otzN?= =?us-ascii?Q?JH12vuBip4f4LiXiMPJ+a3bc0/9Bk1rZbx3KpqFPXxrahF3iWTQjH+zcC7ER?= =?us-ascii?Q?gqvYBeJDomDfAfoUEkmLb3i7WY8To0yWSM1kgdP41ENDW+Wh12C4ehIKTGlQ?= =?us-ascii?Q?z6iymws6r9Li3ROgbbkwwYDqw1gc/suIs6ao6EPLatHLQouVGEU1aEdCxcPn?= =?us-ascii?Q?LSNx3+VNrL6L6P6kQA7ae/tdz6y2mWdKY3t6UIXuoOfYpNiHNGv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R8j9VPhJ1BhUiLikUVTDkoLI4NFXJwYiKEYYkoeFE1Vl0l6JBYIlLHIdhvxyEUnfC3tsystDNPGoSAP0CxExqBfUM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1691; 7:fx1KnwzvCN9c4ayugKuAUeYnUiEphwUrtV+fg4jorZ6WNI8h/+/b4xAlO+FLIBX8YxZrUBJ4jFj1epzgGJeEceG5HhwwY5xIMwZjz1pMYvGOkIGhp0UZ7441iUGe/UZuaTJAwPmq4UxuoqOLZPJN54VO9yF47sCtEe00Y37RV8mHoDsCAsk8E/9gIVCCZtsFg/vFlg4hxojXZifuoB1/elk2uBK75cGnuJOozeoKavKxeKgZYOsZn3uKB4KeluwqxjWj5Y+CI0Ub/wpDLTObikzGI+zoz9/N5WdDGW8CElr8F5zswWu6/l9SFVMcxGxvFxN4tl2BuV8TxlE/xKdjrQ==; 20:1b48YCp9zSgRQ8/akCDnZVbhrCTsb1cknpk3+6Gl4tX9NmOQP8OMLe9Cb2uKWVa7/6nH0ytVxzodlPbdhvxyL/nU7/F/8OGEvDTvr7DWc/XeotlYabWUH57c7FwP0JeVbkuj7c9XIEG+heg45k8z/wn9bVO/gBn/NQBhCv5ITJc= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2017 10:04:43.2862 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR06MB1691 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds resume_quirk() to do platform specific process in resume timing. Signed-off-by: Yoshihiro Shimoda --- drivers/usb/host/xhci-plat.c | 15 +++++++++++++++ drivers/usb/host/xhci-plat.h | 1 + 2 files changed, 16 insertions(+) diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index 3528de3..ceb7413 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_resume_quirk(struct usb_hcd *hcd) +{ + struct xhci_plat_priv *priv = hcd_to_xhci_priv(hcd); + + if (!priv->resume_quirk) + return 0; + + return priv->resume_quirk(hcd); +} + static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci) { /* @@ -328,10 +338,15 @@ static int xhci_plat_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); + int ret; if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk)) clk_prepare_enable(xhci->clk); + ret = xhci_priv_resume_quirk(hcd); + if (ret) + return ret; + return xhci_resume(xhci, 0); } diff --git a/drivers/usb/host/xhci-plat.h b/drivers/usb/host/xhci-plat.h index 9af0cb4..29b2278 100644 --- a/drivers/usb/host/xhci-plat.h +++ b/drivers/usb/host/xhci-plat.h @@ -17,6 +17,7 @@ struct xhci_plat_priv { const char *firmware_name; void (*plat_start)(struct usb_hcd *); int (*init_quirk)(struct usb_hcd *); + int (*resume_quirk)(struct usb_hcd *); }; #define hcd_to_xhci_priv(h) ((struct xhci_plat_priv *)hcd_to_xhci(h)->priv)