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 X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45B79C4CEC5 for ; Fri, 13 Sep 2019 13:16:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1A573206BB for ; Fri, 13 Sep 2019 13:16:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568380568; bh=xfLMvEAb89BJvZFgrnyHbHexMVIDN8oo/7auQHJhcME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hZVSw/nb1yYeWjt82MeYrJyg6HOku55jKhtYlEjbkxb98b+iN9jlnT6ptOuRi1nNs uw/sIBjl0peJUyExKkBWuxXLfsv/Cfftuz2LR66qHxV+UVIWq6RoiVr05aAEDpCQOK 62K0hBPRT1wS+yu5WXPwF1EBMmqcOgmsmNOWPYGk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389785AbfIMNQC (ORCPT ); Fri, 13 Sep 2019 09:16:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:42514 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389198AbfIMNQB (ORCPT ); Fri, 13 Sep 2019 09:16:01 -0400 Received: from localhost (unknown [104.132.45.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 10746208C0; Fri, 13 Sep 2019 13:15:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568380560; bh=xfLMvEAb89BJvZFgrnyHbHexMVIDN8oo/7auQHJhcME=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ICpxHzXJyvaCuE4tVNMD5vP5t0OOsK+zsA0VGcINDgp5CX/S1B4PA8o2tioCWxd8f RVgeTc0aHuM2jWjQQ3eZVNdftvZQqbpYKin/wLYQAcZL63mC+iZlUDO/lXRjqj0PjX h3G1tbnSOUseDil1crN/qGV3vbZgn3BOKNXNCYFc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Bjorn Andersson , Lorenzo Pieralisi , Stanimir Varbanov , Sasha Levin Subject: [PATCH 4.19 104/190] PCI: qcom: Dont deassert reset GPIO during probe Date: Fri, 13 Sep 2019 14:05:59 +0100 Message-Id: <20190913130607.956163583@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190913130559.669563815@linuxfoundation.org> References: <20190913130559.669563815@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org [ Upstream commit 02b485e31d98265189b91f3e69c43df2ed50610c ] Acquiring the reset GPIO low means that reset is being deasserted, this is followed almost immediately with qcom_pcie_host_init() asserting it, initializing it and then finally deasserting it again, for the link to come up. Some PCIe devices requires a minimum time between the initial deassert and subsequent reset cycles. In a platform that boots with the reset GPIO asserted this requirement is being violated by this deassert/assert pulse. Acquire the reset GPIO high to prevent this situation by matching the state to the subsequent asserted state. Fixes: 82a823833f4e ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Bjorn Andersson [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi Acked-by: Stanimir Varbanov Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin --- drivers/pci/controller/dwc/pcie-qcom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 79f06c76ae071..e292801fff7fd 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1230,7 +1230,7 @@ static int qcom_pcie_probe(struct platform_device *pdev) pcie->ops = of_device_get_match_data(dev); - pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_LOW); + pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH); if (IS_ERR(pcie->reset)) { ret = PTR_ERR(pcie->reset); goto err_pm_runtime_put; -- 2.20.1