Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2365131ybi; Sat, 25 May 2019 22:51:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqxtEEccj2tUgWmPMQNBqcktKZ1mq4azLSDShEs2cEPcINp9EOTxo0H8tlRmyWiGESZCKBZ8 X-Received: by 2002:aa7:8d89:: with SMTP id i9mr125325092pfr.77.1558849873044; Sat, 25 May 2019 22:51:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558849873; cv=none; d=google.com; s=arc-20160816; b=uV9PBTr4ykr06LmzaTRSdkDXMIz6elZFHGtRO+qcPFzD0kqu+iTReYpCwPFgZuCbzG E7hi1snGyiThiYjy+5WClvp/+WJVQjUpfhdR0rihK2HODYWN9FMqO1nU4qyJJ4j7qiNX +B3/B8xhpaOd6MoGsoBzqKwjdP+iPFdMXTyXWU5hMPcaqF8kDSoZQ0uU4kDWMYqWQLkQ Mfdg+Zh27McIR2yawi4Zhjk0xoW0vuGdSJHlejB/JIbyvEH64p5k0lX4RnwzT8b4pB8o YlLMrSRYjatELsbCVoMsS5I0oY5fHFjRfX+hgbQV+H4ZNyzPE5pvkYSyphqx5/t6HPxJ bgvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/1mbn5gY5Ly2COk6hSx+B8iGsTtL0c4swiFd6dIhVpI=; b=qAG8tuivZyKOTfChW58bfQ/gpmidUnBEUx171lC6EagymvlXdTB6Uog+82JPguK8SG ATjZGtVhEItKPJvTIQ9IbuyExnqYmjTSQiENi3VzMau0QQqQxh0LUwT5ev6bph7xmQw6 CmrNx/s/YIqP2Dg1uS/KnJmbG7DNZkQE6/Sm2e/q+pKc9kpswn8FH1E40zNAnbbfnpe1 +gA2D+BH4q7xSO5kuSTmc4YKa3Xdg9R6yCPxsAQcSVeJI95dUfPG3BIpK4uVgriDrwbx Cl6RWr4YMmPwlqXX5f3gxroqkBjE/nJulvWuJanI2dyQy7tFwfigrkW9n5LdwlZVCFTA y/PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q32mHuXk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s18si4713213pgh.121.2019.05.25.22.50.57; Sat, 25 May 2019 22:51:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=q32mHuXk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727438AbfEZFsv (ORCPT + 99 others); Sun, 26 May 2019 01:48:51 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45665 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726435AbfEZFsv (ORCPT ); Sun, 26 May 2019 01:48:51 -0400 Received: by mail-pf1-f194.google.com with SMTP id s11so7677301pfm.12 for ; Sat, 25 May 2019 22:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=/1mbn5gY5Ly2COk6hSx+B8iGsTtL0c4swiFd6dIhVpI=; b=q32mHuXkhsVRJi5P75fk+cYqfmL5FYaU2EF/MxwHcRp5689RwAVCmsRikxIY4pi5Os jRC09tMdpss013NPDY6S/WUfPWL/Q+Fde/yTlTluNTt0rXSlTGXLfUE7ubdjuCu5yruQ N66RDYti9ea4YxawCDNI2wj6sa/l37+gmuYQN4xreG+KF7xRwiaOUyW6Psf//3Kioyuy H1FuCPNP0nvU2h11Ous1UzCDezt+ypwRxbsDWqTxH8oyux37LYhSw3guRTKJ6rKoPqi+ 92w9tBRnCMs52U4X7eRsGGWbD0nd4H7+sM1tutRdYHz8P1oDsn12KcKpriutYq8xhwul QhGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=/1mbn5gY5Ly2COk6hSx+B8iGsTtL0c4swiFd6dIhVpI=; b=asSY2f+vmmH/7GJlDCFCMGbQnQqxbelWw7osMGCl9aSkBbJkqfsmdgIipb0u1uByis JO0sgftdBQ4IfqUJnQDUosmbGt/MylxCMczEkfU7L92FunmPKFUlkfRvYsaGNP4P5QC4 yGmHnqUEaJadxrjj/9MQTCPtS9KPN0fqejf7O2DDvJ7cfUkFwTE657mVaKdZDtXsFERz OdTgCAwpubIt21cqbb4RYKMF/SxIHPgmpnExES7+WgH4JDcCSnollVWNTuNv58kFoyos JsEyj03FPfV+hXeAHvPdtmsa1ygDAD78deZQzd8y0MEhT+9i34YDYpn3KFxgljAOtY0r gVZA== X-Gm-Message-State: APjAAAVoE9IORqGAdUAHZmY9YMdMznoSlmOMCbkIMNiS+ITdq2EJjb6g 63p1XJ2C9Fjwhth7BPSZ+2l8BA== X-Received: by 2002:a62:82c1:: with SMTP id w184mr11245400pfd.171.1558849730290; Sat, 25 May 2019 22:48:50 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id a64sm6011216pgc.53.2019.05.25.22.48.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 May 2019 22:48:49 -0700 (PDT) Date: Sat, 25 May 2019 22:49:18 -0700 From: Bjorn Andersson To: Niklas Cassel Cc: Stanimir Varbanov , Andy Gross , David Brown , Lorenzo Pieralisi , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: qcom: Ensure that PERST is asserted for at least 100 ms Message-ID: <20190526054918.GK2085@tuxbook-pro> References: <20190523194409.17718-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190523194409.17718-1-niklas.cassel@linaro.org> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 23 May 12:44 PDT 2019, Niklas Cassel wrote: > Currently, there is only a 1 ms sleep after asserting PERST. > > Reading the datasheets for different endpoints, some require PERST to be > asserted for 10 ms in order for the endpoint to perform a reset, others > require it to be asserted for 50 ms. > > Several SoCs using this driver uses PCIe Mini Card, where we don't know > what endpoint will be plugged in. > > The PCI Express Card Electromechanical Specification specifies: > "On power up, the deassertion of PERST# is delayed 100 ms (TPVPERL) from > the power rails achieving specified operating limits." > > Add a sleep of 100 ms before deasserting PERST, in order to ensure that > we are compliant with the spec. > > Signed-off-by: Niklas Cassel Reviewed-by: Bjorn Andersson > --- > drivers/pci/controller/dwc/pcie-qcom.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index 0ed235d560e3..cae24376237c 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -1110,6 +1110,8 @@ static int qcom_pcie_host_init(struct pcie_port *pp) > if (IS_ENABLED(CONFIG_PCI_MSI)) > dw_pcie_msi_init(pp); > > + /* Ensure that PERST has been asserted for at least 100 ms */ > + msleep(100); > qcom_ep_reset_deassert(pcie); > > ret = qcom_pcie_establish_link(pcie); > -- > 2.21.0 >