Message ID | 1529915453-4633-6-git-send-email-adouglas@cadence.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show
Return-Path: <linux-pci-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 5E2016031B for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 25 Jun 2018 08:31:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48D9D28912 for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 25 Jun 2018 08:31:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D8B528914; Mon, 25 Jun 2018 08:31:32 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, 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 BEAD628912 for <patchwork-linux-pci@patchwork.kernel.org>; Mon, 25 Jun 2018 08:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754419AbeFYIb3 (ORCPT <rfc822;patchwork-linux-pci@patchwork.kernel.org>); Mon, 25 Jun 2018 04:31:29 -0400 Received: from mail-eopbgr710076.outbound.protection.outlook.com ([40.107.71.76]:5857 "EHLO NAM05-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754682AbeFYIbX (ORCPT <rfc822;linux-pci@vger.kernel.org>); Mon, 25 Jun 2018 04:31:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y4uEnGXXQ2I3q+AZwvFf2pDyBKmS1XV6x+48UQG+8ZU=; b=CnWKF0rpZ0UxNp1UrTqSRsodtN08TlwS8iZgiMbhH85emh1unKDt2wRD0SdYJ3hCA3Xg70xIFm5G4PFACqbWTW08x5YV+vvMETbYJClYH2o2RagXuYM1RBAJn8U7HFzTl+XUPfhyNh3Z6Dx0anbwv00/ARwtrh4bDm1pGMGbUzA= Received: from DM6PR07CA0030.namprd07.prod.outlook.com (2603:10b6:5:94::43) by BN3PR0701MB1329.namprd07.prod.outlook.com (2a01:111:e400:4019::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.884.20; Mon, 25 Jun 2018 08:31:19 +0000 Received: from DM3NAM05FT062.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::201) by DM6PR07CA0030.outlook.office365.com (2603:10b6:5:94::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.884.20 via Frontend Transport; Mon, 25 Jun 2018 08:31:19 +0000 Authentication-Results: spf=softfail (sender IP is 158.140.1.28) smtp.mailfrom=cadence.com; arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=fail action=none header.from=cadence.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 158.140.1.28 as permitted sender) Received: from sjmaillnx1.cadence.com (158.140.1.28) by DM3NAM05FT062.mail.protection.outlook.com (10.152.98.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.906.10 via Frontend Transport; Mon, 25 Jun 2018 08:31:18 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by sjmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id w5P8VGqk008416 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Mon, 25 Jun 2018 01:31:17 -0700 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 25 Jun 2018 10:31:32 +0200 Received: from lvloginb.cadence.com (10.165.177.11) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Mon, 25 Jun 2018 10:31:32 +0200 Received: from lvloginb.cadence.com (localhost [127.0.0.1]) by lvloginb.cadence.com (8.14.4/8.14.4) with ESMTP id w5P8VFxC006827; Mon, 25 Jun 2018 09:31:15 +0100 Received: (from adouglas@localhost) by lvloginb.cadence.com (8.14.4/8.14.4/Submit) id w5P8VFw3006812; Mon, 25 Jun 2018 09:31:15 +0100 From: Alan Douglas <adouglas@cadence.com> To: <bhelgaas@google.com>, <kishon@ti.com>, <lorenzo.pieralisi@arm.com> CC: <linux-pci@vger.kernel.org>, <devicetree@vger.kernel.org>, <robh+dt@kernel.org>, Alan Douglas <adouglas@cadence.com> Subject: [PATCH 5/5] PCI: cadence: Add shutdown callback to host driver Date: Mon, 25 Jun 2018 09:30:53 +0100 Message-ID: <1529915453-4633-6-git-send-email-adouglas@cadence.com> X-Mailer: git-send-email 2.2.2 In-Reply-To: <1529915453-4633-1-git-send-email-adouglas@cadence.com> References: <1529915453-4633-1-git-send-email-adouglas@cadence.com> MIME-Version: 1.0 Content-Type: text/plain X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:158.140.1.28; IPV:CAL; SCL:-1; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(396003)(39380400002)(39860400002)(376002)(2980300002)(3190300001)(189003)(199004)(36092001)(11346002)(426003)(126002)(87636003)(478600001)(2201001)(186003)(486006)(476003)(26826003)(356003)(7636002)(446003)(107886003)(305945005)(47776003)(86362001)(8936002)(50226002)(48376002)(50466002)(336012)(246002)(8676002)(4326008)(16586007)(26005)(76176011)(54906003)(42186006)(110136005)(316002)(51416003)(106466001)(36756003)(2616005)(105596002)(5660300001)(2906002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1329; H:sjmaillnx1.cadence.com; FPR:; SPF:SoftFail; LANG:en; PTR:corp.cadence.com; MX:1; A:1; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM05FT062; 1:xCUfm1bpQS7CG0rUic9BqRhp8ymm0PK5QS5xidZitpvF7P0jTaVD2PmgwOHHscwdU0vYr4jlZ2yj9b0PzC0H5INz+6Fv/KYYdzfT7lUGm82MXEINA+JAgsWL/dSb05B7 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fdb85d03-874e-4930-0028-08d5da760689 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600026)(711020)(2017052603328)(7153060); SRVR:BN3PR0701MB1329; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1329; 3:Mpr6oHYOfTwBq2hfRm59H+WLySy8KnNI+cg9Nl/Rht2kxZI8wvOK+gMe7U6dAEnfoFqZ5xevwU6GIT9VCoHi224ddP5zyD1BH4EdSoqjwdgYMGWNVIu35DMyh9PcxncMgKfUPilDLt/gWfQfjFtdXl8cbodSCuywVtL7I8b4Wht/8GbHz4NqZJcycPUT9/KPi2WcLWTRBemvLBX/m7acRWC4liZpKHGX8+9T2IF9EvhzsYKgUsSn2EytaxEkECWESsh5wgVrwV7JvAn5bezPloLixNb10ELuZfFmoJPlavinuw3zpoGIq6mG8WHwI0vjtdH5lOPwwSrEh9+/jvs5geTK3y+swlAOHsvwWTnZUlw=; 25:QbJw2ROzsP7PTDaoxEwt5HU2Hb2sm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LxHuVJkKsbPbmeAL4MmLG2AL0mDVR6z5NS/vhndfDL66nWeb/MwYsxV/9VunXsIvfzmT X-Microsoft-Antispam-PRVS: <BN3PR0701MB1329ABD5024A48B78C24056DD84A0@BN3PR0701MB1329.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(72806322054110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93003095)(10201501046)(3002001)(3231254)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(20161123564045)(20161123558120)(6072148)(201708071742011)(7699016); SRVR:BN3PR0701MB1329; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1329; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1329; 4:afNRZcb7tbTXkzIYHABK+CBA+GtE9f4H9vTcR9Vgjm9qHy1Xf41Fp9Ud8xggVQrpXlJHW/XGo48oyJLDDYjFdt/Vi/OHvWxHhoMvgzIEhJkzkwTIaLPkFCw6ykLZKSVbjs+am7hSUKGmqrrGuMfxf5LTJ4nu7s7jhHE0A36hn9YgliA24ayid92+F5BJ5iGlik7cO4lhV6WaqbdXLFmAOYxG3o5nNnNY3Bv/z7QXgb0+kp7215xXmm36dKHYoVpXjw6dCLndZ76+A4qMNQkdvvyzKcpGO5SaAsJ94fDEW/xKKk22YdmhUxI2uy8G17YV X-Forefront-PRVS: 0714841678 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1329; 23:DeOAwyBF93uJIu5P6p4MUVuEMXPFaNOoOvtbnIi?= =?us-ascii?Q?YSFsQXvcoZ0QMii91MjGPTOx2wEzTBss1793ORIQ7YImcDmualIs6WwyVals?= =?us-ascii?Q?FEZNBeN97cvjJ3noxPRj9ax45bRooIWodbUdJ3YUQbCwtCZx7xFczSJOhNOm?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5:MZHyaDYBsQyhEkk4aPZg+7hIEg4+8Z8yCJ3UMDYwJYMZUNOYL1zhTWS8UHda5Ug7v7qkgCh1feX8I46yBDk+yM+E+z86v4x9JTlWSwruLi7vGPVXRGX7uzGkp7c9V3td0dYp4pAnWGLDCv56S2/Q91cyZoN/XZ7P5yci5COXwsM=; 24:q5WCSNeT2KdByq6qarYDNIi3DOd+nhUzwM7hcwz4Emr2WDjWmsPMGki1YqicCnT7VpRpEXlUKcq6aPu4M+jK4jKgOk5MPz5/y6yOPSrEkvE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1329; 7:7fdEsWwe2uKIGLGl8Umjs7Qm8Ql444s+YtDcl6mvaVZy7G8F20CzDYJwhhLBpA1lKF/7CF/Fer9pA23PrkG161jjNsE7Lg2zb+d8lWRLoCzUcgDa3/wWPKCO7SwKg1EZpjqItDkziOVd8/Y4sq0obFV8xWWyteZslLxl0869tgiCwo9Vseu0GCfGpgzYGQ7ke7W9uVSCbeV1Sw5SHTHGMBY4626gyD3IllRngyaFkPB2alz08wK5O1uodShB90wX; 20:nYlZtZBEMbAEzmqFlDht3zGj3alOrqIDK7Nh2T/q6FpKXxidNXYg9lH+gONTP3GpxUgmXpgcGlmTS/YBwnLgLDDIUbN6FneH9jL33BJqq5TOcGhFHrSWXIIU0ycmPBEuQqwtV5irdbdvuIndTmmwWiDntZOLfhvgOsLUZrCFVgWJZo7zjrMo9P6dW6oktS+y5pH2Fx6s80euF3XglABmI/W9M5d3CxZM9wJXmh688VJyzXdfB1EiIwwmNuzIyaRG X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2018 08:31:18.9368 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fdb85d03-874e-4930-0028-08d5da760689 X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9; Ip=[158.140.1.28]; Helo=[sjmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1329 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: <linux-pci.vger.kernel.org> X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/pci/controller/pcie-cadence-host.c b/drivers/pci/controller/pcie-cadence-host.c index e3e9b7d..ec394f6 100644 --- a/drivers/pci/controller/pcie-cadence-host.c +++ b/drivers/pci/controller/pcie-cadence-host.c @@ -343,6 +343,20 @@ static int cdns_pcie_host_probe(struct platform_device *pdev) return ret; } +static void cdns_pcie_shutdown(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct cdns_pcie *pcie = dev_get_drvdata(dev); + int ret; + + ret = pm_runtime_put_sync(dev); + if (ret < 0) + dev_dbg(dev, "pm_runtime_put_sync failed\n"); + + pm_runtime_disable(dev); + cdns_pcie_disable_phy(pcie); +} + static struct platform_driver cdns_pcie_host_driver = { .driver = { .name = "cdns-pcie-host", @@ -350,5 +364,6 @@ static int cdns_pcie_host_probe(struct platform_device *pdev) .pm = &cdns_pcie_pm_ops, }, .probe = cdns_pcie_host_probe, + .shutdown = cdns_pcie_shutdown, }; builtin_platform_driver(cdns_pcie_host_driver);
Add shutdown callback to host driver which will disable PHY and PM runtime. Signed-off-by: Alan Douglas <adouglas@cadence.com> --- drivers/pci/controller/pcie-cadence-host.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-)