Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp573792pxb; Thu, 21 Oct 2021 05:30:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycffSVEJ6pysLGYExTaaZhdT2EcDD4x6mCrn/jGhH1jfqsecO2gqynwdT3DATX51Enhfeq X-Received: by 2002:a17:907:7ba2:: with SMTP id ne34mr2926431ejc.506.1634819408622; Thu, 21 Oct 2021 05:30:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634819408; cv=none; d=google.com; s=arc-20160816; b=iR+NA8w6TRJPleTSYyv9rYGqD37nVi5Q3E6z0GV8k+TgxjthprJxm95URTdnkZmWh4 JgVGChpLbHLfTe5GJpVLdtRQCWF4uoAFb+k+eLyvMcbkMtsclo3qHaHRVWn12X3sfQ1m SsYMMOZS4vtduvHRXM0GnAiiTuCGN7XcqftYHQSqyjsnCbcMXTS1pXjPRNAX9H23uCc/ TqRFNUhJV88wt1aHzzPUXM/JI7G6uou+F47754Yvf54D9lKJQ6MMRmoOd3BYTZFMjytC xE53nFoVcfCjF6XIxQOgL9Ud/MsiBLy6D61KPADFhUz0KDkAgnSMUMNWy2QBhfJJi13b J/ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=nSESp5/7RSq2HewXRdM85BbOALNKnZIIpeeOjwdzQPQ=; b=ENe6wRTyZUBaltjwFk1mdIDwYsKl1KRjQCO2xCBuzpSQkHQNTJJxFUenC4lBoL6Foh R7EqCu8KlwsDabDMdSVoDe5uFnjrPixJqKjs3kkp7F/7xiecGM/i/rlGxio4Hh40SKYS 2nY1SorhY9bjs/P+4YjFfacCxzSaFQFlc52L0x7n0PaAA57bMNGAyuz8RGVzno64Kb01 QKVuyLSvjuvVRw76Ial1PWh9Vakq7gsit7KlG5j4Mg4jqMb/wA2oS/WgVBwPUe+gyZXR J2h9a5Q4tNbI7lfASeTcLdVLESdD2ohWSwoHo6ZVSaE8ZOPzBvc/jqC/v5z28LIPAqBq IEMA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id di10si1304256ejc.325.2021.10.21.05.29.44; Thu, 21 Oct 2021 05:30:08 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbhJUM3t (ORCPT + 99 others); Thu, 21 Oct 2021 08:29:49 -0400 Received: from foss.arm.com ([217.140.110.172]:42006 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231297AbhJUM3t (ORCPT ); Thu, 21 Oct 2021 08:29:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B7424ED1; Thu, 21 Oct 2021 05:27:32 -0700 (PDT) Received: from lpieralisi (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 663083F73D; Thu, 21 Oct 2021 05:27:31 -0700 (PDT) Date: Thu, 21 Oct 2021 13:27:29 +0100 From: Lorenzo Pieralisi To: Mauro Carvalho Chehab Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Songxiaowei , Binghui Wang , Bjorn Helgaas , Rob Herring , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: [PATCH v14 05/11] PCI: kirin: give more time for PERST# reset to finish Message-ID: <20211021122728.GB12568@lpieralisi> References: <9a365cffe5af9ec5a1f79638968c3a2efa979b65.1634622716.git.mchehab+huawei@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9a365cffe5af9ec5a1f79638968c3a2efa979b65.1634622716.git.mchehab+huawei@kernel.org> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 19, 2021 at 07:06:42AM +0100, Mauro Carvalho Chehab wrote: > Before code refactor, the PERST# signals were sent at the > end of the power_on logic. Then, the PCI core would probe for > the buses and add them. > > The new logic changed it to send PERST# signals during > add_bus operation. That altered the timings. > > Also, HiKey 970 require a little more waiting time for > the PCI bridge - which is outside the SoC - to finish > the PERST# reset, and then initialize the eye diagram. > Ok, now you explained it and we should move this explanation in the commit log that this change is affecting (I mean we should squash this patch with the patch that actually requires it - I am not sure whether it is patch 6 or another one). I can do it for you; I thought it would be a standalone change but it actually isn't, because it is brought about by the changes you are making and therefore there it belongs. Thanks for explaining it and apologies for the churn. Lorenzo > So, increase the waiting time for the PERST# signals to > what's required for it to also work with HiKey 970. > > Signed-off-by: Mauro Carvalho Chehab > --- > > See [PATCH v14 00/11] at: https://lore.kernel.org/all/cover.1634622716.git.mchehab+huawei@kernel.org/ > > drivers/pci/controller/dwc/pcie-kirin.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/dwc/pcie-kirin.c b/drivers/pci/controller/dwc/pcie-kirin.c > index de375795a3b8..bc329673632a 100644 > --- a/drivers/pci/controller/dwc/pcie-kirin.c > +++ b/drivers/pci/controller/dwc/pcie-kirin.c > @@ -113,7 +113,7 @@ struct kirin_pcie { > #define CRGCTRL_PCIE_ASSERT_BIT 0x8c000000 > > /* Time for delay */ > -#define REF_2_PERST_MIN 20000 > +#define REF_2_PERST_MIN 21000 > #define REF_2_PERST_MAX 25000 > #define PERST_2_ACCESS_MIN 10000 > #define PERST_2_ACCESS_MAX 12000 > -- > 2.31.1 >