Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp584035pxb; Thu, 21 Oct 2021 05:42:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxlUhqE4V4FsLnQNe9gyuvUk+0R0BHph2Aey//g9jU5SwsmgCPklSHt90g4cXjDpg7ER5NO X-Received: by 2002:a17:906:85c8:: with SMTP id i8mr7004924ejy.251.1634820155061; Thu, 21 Oct 2021 05:42:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634820155; cv=none; d=google.com; s=arc-20160816; b=Ak06mUTncwtGMrI6QduZhUVTRCcXnAFEAdudZ02SVR9TCFHlaZ/51gkGmP+rBeSVRv Uj4ULE1mUJsbdZO39vd9gAYHKccjWctL9AVU1DxZcxbBChNsSdHTfeApZkwAWd+3/OHC ARjExhyo6g9vfCRu791ouWb/XORrSs5y8AXKdM6qbv+IApVXlNWIdFnxTSQob0o8c7Jd Kdn9foxCtjG6KDTF8cj0iPNnpjdRBYNT++1oojFt6VoP/ZwmqBS8VO5FnwFJIL2V8Xbd 0nP2EtIkRDcWLIUp6AwoawEhrkV7iw8wMLDtNkvHkxNpbciahJRmsTlRQTpPVCXEQM/u C7UA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=st9LnTkKtNruXiN7mfV10l0XH0fTKwsPxGaGbQ9KJU0=; b=dQlbWQxD+lDP6iUTaDn9Ct+5X2b1au0y+tG3iG+QrD+5XhFmTae7OfY1ecjYCgu5EZ my02pF3NPJB+akGW5fkmA0A3jdcLoMDDFhrBl7icLQTZCpoftwkcRHs23HnsgNm2FLRL X85jbX9Cpmdy+1Por5bARGuZ0gmdj98KuaRMBT83vHHDLz3Pc4EGcINHdvNqnhoMOvnx 1Qu3R5y4tz9jjt6jFSSkT4hsHwmbqQnQ6k8ILTXwjumVJVduraFKqqnnhdlNJjugr+vU z3f+FUQq9P0o3EJXGBCgJqhSiHzk/XZVxi+NvV5Zqoe2Bp78GqEvM2Zcu3lamt9bREwG nCCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ui8SkaTA; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id aq24si8322669ejc.20.2021.10.21.05.42.10; Thu, 21 Oct 2021 05:42:35 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Ui8SkaTA; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230323AbhJUMmq (ORCPT + 99 others); Thu, 21 Oct 2021 08:42:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:42136 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230190AbhJUMmo (ORCPT ); Thu, 21 Oct 2021 08:42:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 973E860E97; Thu, 21 Oct 2021 12:40:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634820029; bh=gbmpXmeM0c4N6qsFqTfy8xE6riZVnWgkiKU8PU2YW3c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Ui8SkaTA47Wv1qCa5J3fF60indGFN1e/4dQfZoELT8KXpHXdVWGeCZ7979w6DyBpF MMajpXjrspCNPILc4dvZVeVuGOnt/51bNK+TFZwd9dVD72Wx36Sl4eIm03DK7YoEU7 WlOdE1ZRR6sJRTdan9VGKi+rqBKhlqGnnz4TrHCGL7lnVCGg0JSWjBD86vOs0JHjWr e84laDPHCKUvCkH3AFIlXay8pF+GQv1JW7kdAADSURF6nsIdjyY55myT23v7AHOXaK H1a0ts+Lkt6cJ2SITFYaeFzcOJ495gJl3fHGW/sDf10rqnXdaRTaoo6VK7zpNHmsmR Nz9KHqL7xWjrg== Date: Thu, 21 Oct 2021 13:40:18 +0100 From: Mauro Carvalho Chehab To: Lorenzo Pieralisi Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Krzysztof =?UTF-8?B?V2ls?= =?UTF-8?B?Y3p5xYRza2k=?= , 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: <20211021134018.58db2fcb@sal.lan> In-Reply-To: <20211021122728.GB12568@lpieralisi> References: <9a365cffe5af9ec5a1f79638968c3a2efa979b65.1634622716.git.mchehab+huawei@kernel.org> <20211021122728.GB12568@lpieralisi> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 21 Oct 2021 13:27:29 +0100 Lorenzo Pieralisi escreveu: > 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). IMO, having it on a separate patch has the advantage of better documenting this single line change, but yeah, this is part of the change needed to handle PERST# on a more portable way to work for both chipsets. > 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. Feel free to squash this patch if you prefer so. whatever works best for you. > Thanks for explaining it and apologies for the churn. No problem. > > 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 > >