Message ID | 1489744955-29553-2-git-send-email-yoshihiro.shimoda.uh@renesas.com (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show
Return-Path: <linux-renesas-soc-owner@kernel.org> 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 1E33D60245 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 17 Mar 2017 10:29:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08B9E28631 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 17 Mar 2017 10:29:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1B8328697; Fri, 17 Mar 2017 10:29:00 +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 9600128631 for <patchwork-linux-renesas-soc@patchwork.kernel.org>; Fri, 17 Mar 2017 10:29:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751042AbdCQK3A (ORCPT <rfc822;patchwork-linux-renesas-soc@patchwork.kernel.org>); Fri, 17 Mar 2017 06:29:00 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:59416 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751037AbdCQK3A (ORCPT <rfc822;linux-renesas-soc@vger.kernel.org>); Fri, 17 Mar 2017 06:29:00 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie2.idc.renesas.com with ESMTP; 17 Mar 2017 19:04:46 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id CD0126030B; Fri, 17 Mar 2017 19:04:46 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id D0EC4480A5; Fri, 17 Mar 2017 19:04:46 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id C8E2D48014; Fri, 17 Mar 2017 19:04:46 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id VAN10615; Fri, 17 Mar 2017 19:04:46 +0900 X-IronPort-AV: E=Sophos;i="5.36,176,1486393200"; d="scan'208";a="236978071" 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:45 +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=vFCUGVaDVG8KcF075JAGqBkpgBCOpacIQOq/5VB3W/s=; b=jFKHK7i2RQoLD/sdtlGviA/pH5t2sJAMmu39y2EKgINNRWMuUw5I3C0lXXBLpUpJWluFQRdi6rxBc0iGcqFX8eN1ArH9eGQ3+K7AlS2k+C3DSvEX6lEE73Nj3qonIgapTqS+zCREzIH+NoNSNRHFSxD2E+FE0KPePX0EXNeYTPQ= 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:42 +0000 From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> To: <mathias.nyman@intel.com>, <gregkh@linuxfoundation.org> CC: <linux-usb@vger.kernel.org>, <linux-renesas-soc@vger.kernel.org>, Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Subject: [PATCH 1/3] usb: host: xhci-plat: enable clk in resume timing Date: Fri, 17 Mar 2017 19:02:33 +0900 Message-ID: <1489744955-29553-2-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 Content-Type: text/plain 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: 791f7b96-8a50-4c28-7054-08d46d1d085a 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:KyvOkEZ8nqRcgsVo/KUE+DBcuG2h63sFSLs4CtI/FmtGFJioBI/qbFIBZvt6gNJnvpqYyq/6bdAjoCl4sVvS8xE2CAX1j2/5dRBwELkW774BKAzm/D4/NfpCQ/j3RdZtcTPzm1i4R+mPW1u7iNCalKebnx2BXONvlPKk2iydgduSBhrDjKl1PQlofp6wvzhrRhx+vw0iZNSgLF5ki1y9MkQzcTsk/298O2Uehy3ivaHmikc8k3APP6U7iSVYL09zGKeXwF+HKg8z5jInrnnTpt0Z0UQtMKxuaVCXiJwR9lo=; 25:Diua6Zr1HUnk7hvvBNqRsqsGGi7kB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znDnHA7F6QJNIF61lelS9yx4Z1Cp+RQbaF5a9ky8hQuAAZM1Gu76k2uItKemO1qHyyweCzr7nIizNUiHNic1LZbpMiiCWy3QpjshmJcpU26apIRdf8JVZkm+D1ZNLzb82cHHLB70rXfFdonEkSrYl8//SWeGOWLjurmrw X-Microsoft-Antispam-PRVS: <PS1PR06MB16910ACB8EF71B4387384CB7B8390@PS1PR06MB1691.apcprd06.prod.outlook.com> 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:y0GL+5t9Mm01LV5JjgeNcKHySTbIxB/wBiaGVZRghutfsY0G1BKY9/5V5YoIqOZKg1lPFoCRvl0sF0yv/SD5y9yfybRF66M4FoXOHRv3QagiAzgaXca+wYvLWk4hCvmfoxdFY/pcz8eYCGMvy/QeXH0EPhru8oo6T21GpwJA+KpN0g/Ck92/QYfo1cv7HfBnDQXU4wKDNvbyYfwDFJNlzHGnCZ6Yp4eDyWoY69jdHumqS8SiGfn1pdruW8qR3L2uGfBcHkydKrufeVqyC6hrq7JNb0w0TU/LinosSSQ5kLdF9UXdNMoVkKMumTWt+sET4OrK4sd17jf9yit3TAonZFlw4V2ybBefdM0kc/HY6VYGeqkER6SG5mw0DNEtdeeLbjcn8gf8CR4Q+Jo1mwYQas1qxmBpPOCCwZT9WAuJ6ec4QrHZPZqFbXdXh4C5BfIpm66vzNTZkAGmQKjcTupF0XxRCAi/JAhUje7yhcI1/8IHr2BCs+H9lbiuV6iB1YcEBsPmganK9/sQU31I7fH6aZJZWsbd+CtzmQJbucCNDQThkPWKcuglpwvj44Vj20wRFRYysosQ59RQAWUk//2ba/rbrFKST59SsNzTmKoexz8lApPjM2desc9r+50L/sLf 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)(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:9pw4Q5MfFcdWnc/yax85U9ThXejDPm8Jhe9t8LpnF?= =?us-ascii?Q?63bKfuS5m54rH3AvhTOOLuGe9FAhODS+4w1e6/O5DBxlmgkO/ODlmgECPYDf?= =?us-ascii?Q?cgb03Mm35kNlRRlHPShm9zXnLW/2kjzTEz9SnMchRGpo74QESDoEXHsS+nzH?= =?us-ascii?Q?3mxdu6lsmayqbPKiVngLztbJTkYmgrV18EtC7og0sJbyIz5UhsqOdHhqxFLo?= =?us-ascii?Q?hrLLj1Ptpm/eQVSJI5gL4LrxCifaaWQcPIPXYg5dqrTynRinSb4gvQUeyG4V?= =?us-ascii?Q?Sa6P2hr4YKxqSdyrQ0ogYr+WxN+fo/nS3q8FGcKIeTemEMJ3wN13DTH7vlrl?= =?us-ascii?Q?bGa9ooHQeIIR9zBxwI58nf8QfRtBdCG2h8FlOnAlNJB316nXWNx65jp21g8g?= =?us-ascii?Q?ypr0vI2p+kfxrZb/eeb/QCkHa8Ymx3Z0rUgCCb77/gOJkzvq1gG5Lzw4MWxV?= =?us-ascii?Q?Gj4YMOUvh4qM1zojU1brdxBbMKDjeSsOSA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Umu8Y0AUGwDkwurzcS19IYGZc1CPcN6e/0e8BMP/zkH69vfaQ0N91zx5hufjdfJ0UFFhD3H/KPhySxzntiusjwy7tVBQqLvAaS9ndqDh/10lnz/JNl84=; 5:glI/oOPYaGPzQFCkchPJ1qzIJqpQtvkd9f27VJuyEHrTgfnqoEPKqP73MvDW427IG7NUJNHtJR1IxrOwXdDXtz9xbR+mqvzaIkYQAMzmx7k+geFumG9B5O11I9MOBWbflnouEcAQHaeciMz48kmrpw==; 24:4KyiHm4zAoZAp9dv5a1Ex5HPgmQLzFAx175M2uzUKfqCVur2cSGUhqFxJMKB5L3Mr1Z98lvtqw9OOjLM5fw5uFjB02/ntbIMnKFpIP3AsZI= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; PS1PR06MB1691; 7:6DLUZeFmCLg4ll0lcQEN+3SF/YFRnz27UnebUDzUsXe5b4FNNN+mzWCaO9tM2sxQRBEB/EjqRHapJW+PTH/5FHCxatDa68GNkaWq+6jnzzbkOZ7d8b272Y3tDmKfcS6nplkTzPrrt9fQNT9ba8eXt/OeLwR1CQhLXtoz+1oq0zN8H6fVKjF4Smgily/UHjj7ASKeHisqADS3dJwWPdfo0kzLMczfhxh2FLQn4uGO68e3MjutWH6s32p+WAw8v1/3oloxhya5icbKppDu2nBkXkIaQp9yr27uiAax+L3JPEeFq3uCk2VPpp57UKSX3GS2cRtNb7I5grnLOzifUTs3Og==; 20:QS/GweUnm9JupqouLAMi6PVRfdJb0gUdjSSLOdknK9o45l0RlSaWV302Eh8LXz4MKZwk63eaohmjGqcG6xCeFK6gt/itJYk+sidJQDuFkIwycw4DOuh16q+S+lj0DGEMcc2vuwSty9Oqarz0QO9pMvYvTnsWRtAoJ8qr/rsEAQo= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Mar 2017 10:04:42.4268 (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: <linux-renesas-soc.vger.kernel.org> X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index bd02a6c..3528de3 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -306,6 +306,7 @@ static int xhci_plat_suspend(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); + int ret; /* * xhci_suspend() needs `do_wakeup` to know whether host is allowed @@ -315,7 +316,12 @@ static int xhci_plat_suspend(struct device *dev) * reconsider this when xhci_plat_suspend enlarges its scope, e.g., * also applies to runtime suspend. */ - return xhci_suspend(xhci, device_may_wakeup(dev)); + ret = xhci_suspend(xhci, device_may_wakeup(dev)); + + if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk)) + clk_disable_unprepare(xhci->clk); + + return ret; } static int xhci_plat_resume(struct device *dev) @@ -323,6 +329,9 @@ static int xhci_plat_resume(struct device *dev) struct usb_hcd *hcd = dev_get_drvdata(dev); struct xhci_hcd *xhci = hcd_to_xhci(hcd); + if (!device_may_wakeup(dev) && !IS_ERR(xhci->clk)) + clk_prepare_enable(xhci->clk); + return xhci_resume(xhci, 0); }
This patch enables the clk in resume timing when device_may_wakeup() is false. Otherwise, kernel panic happens when R-Car resumes the system from Suspend-to-RAM because the clk is disabled. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> --- drivers/usb/host/xhci-plat.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)