Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9180154pxu; Mon, 28 Dec 2020 08:34:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJyl1F6uh0yfQ71uyzswkF1HhRDzTEPqQssXz47WJDyXR2vmkA47nijfOn9hT9BId/GiT6EV X-Received: by 2002:a17:906:3a98:: with SMTP id y24mr40595810ejd.436.1609173254264; Mon, 28 Dec 2020 08:34:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173254; cv=none; d=google.com; s=arc-20160816; b=O34xLfw7taaPydwlfDQYOwyTagX5oHyqZhLzXbByUVeU4ul9jNsmUNGh+JV59RuQWi /W4mzNHZ3gAETfckgiWDW0JODTBmpGwwJUyTfC0coKgpXx0csvlLu1UmbDZP/oGEEuwf YDJy8KuL//tlG4R3gUA/fYhzBcd37h4jY8bg7102ZyoQE0pjM8LkxQnfws9ul6utmL3b IwN1J0TVzTlhPkG41WoT+HVKvjNhmZjVEa89ghqE73f0TsmZ/iJo+aevZrgD+bYo/2Ww y0QprT+oHJiMFdQpmVCERVBYBmp2QnyoeZ5Z8U4EgtbeCBc5hP0+i7nnr0FKKfavs/ZP 4mwg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/TdcRxyVfcOf7G+axNzm++6p9AS9fnP5FxW4IUuED0Q=; b=eEaVBAf4JTCD+evwen0eI4h86MAaK0Z5rYShg965mK6W9ldfEGBwZ4v/US0fKMPtg5 0qE7mkvoPjIWVcaVl8Z1W32kILWJ5BBIoVOeIjns0ueAJeHnws2d6OyzPaSqCo3VT1oN AO7cVBbid6HfBWJR/BcCn0MKes3RbKly90LhrbGZbJ2wr/UEJOnd3I7rgiozZdTL4nid /5bUexv8u/OF+8iSazkCcAto3pnuq8280HyQOkV9UOYcKUeasabsdPIdI94iIapMpdrG 8Uw1dFzL4Nf6ZZ4l5w/Vyr2idRlG47I8FlGMZIpSAFPsR98Ii1wikuiP7UoChfdZvmv1 RjFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vb4fBGGo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sa7si19171473ejb.706.2020.12.28.08.33.51; Mon, 28 Dec 2020 08:34:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vb4fBGGo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633499AbgL1Q17 (ORCPT + 99 others); Mon, 28 Dec 2020 11:27:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:35794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730852AbgL1NIK (ORCPT ); Mon, 28 Dec 2020 08:08:10 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id BBF12208D5; Mon, 28 Dec 2020 13:07:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160849; bh=n0o6RzYqTERzxrjp6qPUpmSwczJeTeWEnJv7cBdq1Ug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vb4fBGGomwVZNbIk0vzG57xlWF3WVDxGr9zrWT6DASObwJGVgoGjfHPbirFrUWnEv AbQEiCB9fUz5fCsOViTnY05LogQyHMNeSbnyEFNa237ExqQ0UiuMcev5z+a0Yjf/ZZ Snhr/vVFb0V/lOfkzTtW11xPWaiOWMP82ZQsSdSo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sham Muthayyan , Ansuel Smith , Lorenzo Pieralisi , Rob Herring , Philipp Zabel , Stanimir Varbanov , Sudip Mukherjee Subject: [PATCH 4.14 016/242] PCI: qcom: Add missing reset for ipq806x Date: Mon, 28 Dec 2020 13:47:01 +0100 Message-Id: <20201228124905.467239437@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ansuel Smith commit ee367e2cdd2202b5714982739e684543cd2cee0e upstream Add missing ext reset used by ipq8064 SoC in PCIe qcom driver. Link: https://lore.kernel.org/r/20200615210608.21469-5-ansuelsmth@gmail.com Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Sham Muthayyan Signed-off-by: Ansuel Smith Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Reviewed-by: Philipp Zabel Acked-by: Stanimir Varbanov Cc: stable@vger.kernel.org # v4.5+ [sudip: manual backport] Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman --- drivers/pci/dwc/pcie-qcom.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) --- a/drivers/pci/dwc/pcie-qcom.c +++ b/drivers/pci/dwc/pcie-qcom.c @@ -96,6 +96,7 @@ struct qcom_pcie_resources_2_1_0 { struct reset_control *ahb_reset; struct reset_control *por_reset; struct reset_control *phy_reset; + struct reset_control *ext_reset; struct regulator *vdda; struct regulator *vdda_phy; struct regulator *vdda_refclk; @@ -265,6 +266,10 @@ static int qcom_pcie_get_resources_2_1_0 if (IS_ERR(res->por_reset)) return PTR_ERR(res->por_reset); + res->ext_reset = devm_reset_control_get_optional_exclusive(dev, "ext"); + if (IS_ERR(res->ext_reset)) + return PTR_ERR(res->ext_reset); + res->phy_reset = devm_reset_control_get_exclusive(dev, "phy"); return PTR_ERR_OR_ZERO(res->phy_reset); } @@ -277,6 +282,7 @@ static void qcom_pcie_deinit_2_1_0(struc reset_control_assert(res->axi_reset); reset_control_assert(res->ahb_reset); reset_control_assert(res->por_reset); + reset_control_assert(res->ext_reset); reset_control_assert(res->pci_reset); clk_disable_unprepare(res->iface_clk); clk_disable_unprepare(res->core_clk); @@ -342,6 +348,12 @@ static int qcom_pcie_init_2_1_0(struct q goto err_deassert_ahb; } + ret = reset_control_deassert(res->ext_reset); + if (ret) { + dev_err(dev, "cannot deassert ext reset\n"); + goto err_deassert_ahb; + } + /* enable PCIe clocks and resets */ val = readl(pcie->parf + PCIE20_PARF_PHY_CTRL); val &= ~BIT(0);