From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AF34C433EF for ; Fri, 15 Oct 2021 18:52:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F53A60F70 for ; Fri, 15 Oct 2021 18:52:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2F53A60F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=qF7F0PH+NLOtjiMEHcXeQofpP1jOXQ6eUMGZrXnhtcY=; b=laJ/tT7MGu9ggG KICHsKrg5pisR4FapTPtEF7oCVjeBxl5cZ4qJaVfeYWGCHwFEfLERR5IB7WE0f6G5Tcj2JQI0qWlJ /Bq2a5XN7uXzVF37tMYoMC9nYFvmXzpm/TJjUGs8u4yAG7H7Io0Fe995A2siEbOZQUMiPD/4KvhrI 78n1rjfl9YOwvxyr2BzcmnXb5OihxZCLspxhYaoB+xiuF/mCmFZ8StZA16baL90YBq8zO20xIXjRC Sp5RFk1RKOXfcFnQPwaVrivRHS4viySEZTsBi72UteWiYBkrtyhirPYWuIKBZDea8aW2wCgaXNtON iecx92A7SX9NKi2yMVpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbSJ0-008Uqa-9I; Fri, 15 Oct 2021 18:51:46 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbSIx-008Upv-6X for linux-arm-kernel@lists.infradead.org; Fri, 15 Oct 2021 18:51:44 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 857D160F56; Fri, 15 Oct 2021 18:51:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634323902; bh=TQmj55y7eunqvNATXkqXYrIJmoAAD05XhzrJljA7J5g=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=We7LgKd2Hk9dPOpOXVmJG9arRaMlkYVsvIYXVH0l1WFgiwlNXweMoN2eK3GL+LkpU YnVHEjZLHZaIyxxI/ApMDJVs/i4AwGX/WSeQXy2wLkmcBODqMV4lPDV4RMpWabfX69 dQeHEONicd3cvjFExiccCMnGDZOB2TebHHJ3uWrq0hjuHs8EpuTNOoAQps6IeGnkgz 44aCKt4Sa/9i+TmyB7eKeCrrxLJZcK76+zk64Vmm4ziJIE+Pcvo6dqeIc4hD2cYrQC on1YYbIpYynQihZLb2YnnFYIcNvRbNOcgEknDI2Y5ayYX7Ji73Dq5rv7OYXlHPDEaV V+xWrAK0nTDmQ== Date: Fri, 15 Oct 2021 13:51:41 -0500 From: Bjorn Helgaas To: Richard Zhu Cc: l.stach@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, linux-pci@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: Re: [RESEND v2 4/5] PCI: imx6: Fix the clock reference handling unbalance when link never came up Message-ID: <20211015185141.GA2139462@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211015184943.GA2139079@bhelgaas> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211015_115143_282250_9E6F777D X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 15, 2021 at 01:49:45PM -0500, Bjorn Helgaas wrote: > On Fri, Oct 15, 2021 at 02:05:40PM +0800, Richard Zhu wrote: > > When link never came up, driver probe would be failed with error -110. > > To keep usage counter balance of the clocks, disable the previous > > enabled clocks when link is down. > > Move definitions of the imx6_pcie_clk_disable() function to the proper > > place. Because it wouldn't be used in imx6_pcie_suspend_noirq() only. > > -static void imx6_pcie_clk_disable(struct imx6_pcie *imx6_pcie) > > -{ > > - clk_disable_unprepare(imx6_pcie->pcie); > > - clk_disable_unprepare(imx6_pcie->pcie_phy); > > - clk_disable_unprepare(imx6_pcie->pcie_bus); > > - > > - switch (imx6_pcie->drvdata->variant) { > > - case IMX6SX: > > - clk_disable_unprepare(imx6_pcie->pcie_inbound_axi); > > - break; > > - case IMX7D: > > - regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12, > > - IMX7D_GPR12_PCIE_PHY_REFCLK_SEL, > > - IMX7D_GPR12_PCIE_PHY_REFCLK_SEL); > > - break; > > - case IMX8MQ: > > - clk_disable_unprepare(imx6_pcie->pcie_aux); > > - break; > > - default: > > - break; While you're at it, this "default: break;" thing is pointless. Normally it's better to just *move* something without changing it at all, but this is such a simple thing I think you could drop this at the same time as the move. > > - } > > -} _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel