Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2893753pxb; Mon, 4 Apr 2022 01:52:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJYofh6ZZLparRc+wbsLGc2num6KppT1hVZUnY33dLrxpJvYzSJlmJB8t5W+tjZaNbMKQC X-Received: by 2002:a05:6a00:234f:b0:4fa:f52b:46a1 with SMTP id j15-20020a056a00234f00b004faf52b46a1mr22979436pfj.32.1649062366746; Mon, 04 Apr 2022 01:52:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649062366; cv=none; d=google.com; s=arc-20160816; b=GEUNkZOvmiKmLzY6KB4Ccle9tGfwl3mFpayzdjMRufTRn7XmAR2TyKXVJxy0uY+lZA W+dH7mx2l7CmaZPw0E7wE72bvRugpgUenOdNzY0vwZkRmRuK88omX6+22bJMBvprfIHr sxKMcpCp+kAYuuf+otCpfmmouqXmtnHL4zKK7VtsKsMnw2frzRvNpVsrfZUtMN/b2n+V j5yEHfdQj4wxec/Q1cQIIdL3pZVEUIBgbQNIewSGOrzL6SBZc5877PqakDw8q0K4I+14 02P1Doax0qdwesWdOWzKVyS3oOlE/fMC1xtHJctKvcC68bPqo/pzpGtemeldnV+n1Oa1 xLag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=N3xbxIsihnw4oXJozyN90P0wNGtopT5Pu6MNxYvZxzs=; b=M7yg/9LM8aXgrsa54o41dRsO+SjxJerMltZT6zvtpWkab9zbPIO0SAU9/ORyWI5FSE hz4DQotIOHpJOgMjbKI7YZ89C/XjmoLkDpeWHWQeTK+jcdyr3gm7nnEJ8LZ34jOPAq/m AWiNgUJq6UZvpJLoDmhilqABEm1WLEJgoXiY45Gy1Uj+PBgzjddiQVUEmVKMwjik/dvb nqa8wMZfwQD3dKIa3FXa3MKPTK+4C5BuMRSDiVqbWjW+j9iuobbNh1XugMBQ0UUeNmY2 0oxOWJoMcIbQW6NLmobHAxzxBUHa3Ca1GCIXY3TQnKkkruuVqfhKf+Uum2or47D+f/go mZPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U8kPmkGz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a633c07000000b00381640e9bdbsi9470425pga.515.2022.04.04.01.52.33; Mon, 04 Apr 2022 01:52:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=U8kPmkGz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346390AbiDANgm (ORCPT + 99 others); Fri, 1 Apr 2022 09:36:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245196AbiDANgl (ORCPT ); Fri, 1 Apr 2022 09:36:41 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DCB315DA98; Fri, 1 Apr 2022 06:34:51 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 295D561B33; Fri, 1 Apr 2022 13:34:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87EA5C340EC; Fri, 1 Apr 2022 13:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648820090; bh=RVL0O4S/hfFXNZm/0gRGl40ZHTehWVbfCwmjbxXvNVk=; h=From:To:Cc:Subject:Date:From; b=U8kPmkGzpgKuAjC5et7CoGaXJC738aSBSBpE3g5hOfg9tCqXH9/xKHqBJNVxAIugc oLTIibB1ddbaEqHcyBoUURCSyvT6sxaTSNqjcITgWUiQO6J4D3hbAV/I9+bd91fedg RL7Hq3blqSLfDJVKTuRWR2qnELw6mRyzK4l8QkW0e4AiQBT6qZAKY9MtGCu2OFHAPq Bk71HzM/K3rlelJDFzqen7r72mmxc2GUvG6KAwPltkoQLKUZpNcP63sZ7WLH71IKwp R76NKxqqm30rrbWVKH+7iYnwgouuv4bI5tMtPu49eoA7GoH6cwCOiXgiY/eAU2tqxm q2Nmhh9TFyEgA== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1naHQP-0002dz-Ss; Fri, 01 Apr 2022 15:34:50 +0200 From: Johan Hovold To: Lorenzo Pieralisi , Stanimir Varbanov , Andy Gross , Bjorn Andersson Cc: Rob Herring , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Dmitry Baryshkov , linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold , stable@vger.kernel.org Subject: [PATCH v2] PCI: qcom: Fix pipe clock imbalance Date: Fri, 1 Apr 2022 15:33:51 +0200 Message-Id: <20220401133351.10113-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit ed8cc3b1fc84 ("PCI: qcom: Add support for SDM845 PCIe controller") introduced a clock imbalance by enabling the pipe clock both in init() and in post_init() but only disabling in post_deinit(). Note that the pipe clock was also never disabled in the init() error paths and that enabling the clock before powering up the PHY looks questionable. Fixes: ed8cc3b1fc84 ("PCI: qcom: Add support for SDM845 PCIe controller") Cc: stable@vger.kernel.org # 5.6 Cc: Bjorn Andersson Signed-off-by: Johan Hovold --- Changes in v2 - Capitalise "Fix" in subject line according to PCI subsystem convention drivers/pci/controller/dwc/pcie-qcom.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index b79d98e5e228..20a0e6533a1c 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1238,12 +1238,6 @@ static int qcom_pcie_init_2_7_0(struct qcom_pcie *pcie) goto err_disable_clocks; } - ret = clk_prepare_enable(res->pipe_clk); - if (ret) { - dev_err(dev, "cannot prepare/enable pipe clock\n"); - goto err_disable_clocks; - } - /* Wait for reset to complete, required on SM8450 */ usleep_range(1000, 1500); -- 2.35.1