Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp13442091rwd; Fri, 23 Jun 2023 23:54:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5s8BzhogeHfvlWuzCJy1DKuOdTUyZdVYxkel290ktEfZlnJu/nDzc24gZfKz64IdNaTTLG X-Received: by 2002:a17:902:bd8e:b0:1b2:a63:95aa with SMTP id q14-20020a170902bd8e00b001b20a6395aamr1163004pls.54.1687589673130; Fri, 23 Jun 2023 23:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687589673; cv=none; d=google.com; s=arc-20160816; b=T0s74lMJSo3pU/O5AoW3863jlx7zg6+F43n37HR7QX0cVOlL6p9AEEJD8ToV7VA1Fo ja9RaIDy71OWt0bUVTbdBSygOrcGTK6JX2b+SI7ucga97nghpy7CDOi7xbuv0/FagF14 +6JI26twJRfZPS27Abg/vvibuKIskP+M912/UsDiKeJj4KLAr64B+lWXRuvXcgZijR4u mp5danjAFRDg6n0pLDN8dHY8i/VbV9O2S7b0flg+1u26m/I6KY9pVXH2KvthUFEns+iU 8mzL0PXQ648lgO6AmnLzCnVyonMUUj8xxrZsBlw/62cL32bgLkoU9ECWNV3iali1iKS/ HLpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uj3bEMYpzldAG+K13i3xdklZjpUGxL2w7AkRRaf5Wmw=; fh=pIMl/GhyilQ/51L5y0Lf9puTvHaC7vgmhRHh34rVK1c=; b=NACU9izrjx/AWKuowyj4MvzMRi0MVBeuMXua++iYEgK2AaoxXBpbnVPlsoCOijsrNh 2HLfJP8x0lAuzBBbFVCqEtYSpT4pcz98SO0Ua8RZqyOFbdgNDtST+snj7gS66Z5cTnc7 5PzzUWfs5gTO0X2WVK1l88U8L9KFldPM0e5gE3huyLHTtgD/XUS5tFwFmPA3SxDMNPA4 bII6pgSWocPj8n/DEc0WlMlwAgOvX7mqDaFtb/Vl3/JkN7iQIeLprVM9LWUSud6Dc017 q3sKav0ukKZq24F6Qnh0u0PANvmexJ4IhJESmNMTkWOV9nsD/iyzHBBw34FQfjJVq7md 01/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GTKvzTXB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170902c40700b001b04c92cb42si846259plk.357.2023.06.23.23.54.18; Fri, 23 Jun 2023 23:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GTKvzTXB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229615AbjFXGYB (ORCPT + 99 others); Sat, 24 Jun 2023 02:24:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbjFXGYA (ORCPT ); Sat, 24 Jun 2023 02:24:00 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E63A0170E; Fri, 23 Jun 2023 23:23:58 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5364260A0C; Sat, 24 Jun 2023 06:23:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B52F7C433C8; Sat, 24 Jun 2023 06:23:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687587837; bh=Vvc6aaM/nDD725+H8QjXiJcNnQHAEI+iO8wwxMNbNnQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GTKvzTXBu2v/UDMvwm+nA3R75N5kHouOXl72VkZYpnEinFYe6+yOKxbtZgrqjq/x6 xM84xdKqi2O9qATrMFmu+bteLW9a0t5TLa6lJgad4gPkTwsd/iod/rtF9GkHOY2Jl5 cY8Vui30GZOc1c3KT9k+9Xxw11D/JBRrnVDvukiM6x9Qqm2z5Weij18VnhSTyNjOO5 ex9mF7R9MwyBNPtDptoH0WBM3xl2pfMsixl39aF1wP6OQ/IIOqkiyZGWIdka5uFmSc C4PyOaSepQCta1d0RWHB4vVZ5X9vxH1zEp4M8XA1cbmkmQjogC3hAkvtgQHz1kKC5O iPsfPz+vB3hjA== Date: Sat, 24 Jun 2023 11:53:44 +0530 From: Manivannan Sadhasivam To: Devi Priya Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, quic_srichara@quicinc.com, quic_sjaganat@quicinc.com, quic_kathirav@quicinc.com, quic_anusha@quicinc.com, quic_ipkumar@quicinc.com Subject: Re: [PATCH] PCI: qcom: configure the parf halt window size to 1GB Message-ID: <20230624062344.GE5611@thinkpad> References: <20230623045731.29397-1-quic_devipriy@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230623045731.29397-1-quic_devipriy@quicinc.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 23, 2023 at 10:27:31AM +0530, Devi Priya wrote: > Configure the ADDR_BIT_INDEX of PARF_AXI_MSTR_WR_ADDR_HALT_V2 register with > 0x1E to increase the halt window size to 1GB so that, when new inbound > posted write transactions whose address crosses 1G address range, the > controller would halt all the incoming writes until all the previous AXI > responses are received. > Can you explain how the value of 0x1e corresponds to 1GB window size? > Signed-off-by: Devi Priya > --- > This patch depends on the below series which adds support for PCIe > controllers in IPQ9574 > https://lore.kernel.org/linux-arm-msm/20230519090219.15925-1-quic_devipriy@quicinc.com/ > > drivers/pci/controller/dwc/pcie-qcom.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index c7579dfa5b1c..26c40e006120 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -116,6 +116,8 @@ > > /* PARF_AXI_MSTR_WR_ADDR_HALT register fields */ > #define EN BIT(31) > +#define ADDR_BIT_INDEX (BIT(0) | BIT(1) | BIT(2) | \ > + BIT(3) | BIT(4) | BIT(5)) GENMASK(5, 0) > > /* PARF_LTSSM register fields */ > #define LTSSM_EN BIT(8) > @@ -154,6 +156,8 @@ > > #define QCOM_PCIE_CRC8_POLYNOMIAL (BIT(2) | BIT(1) | BIT(0)) > > +#define PARF_AXI_MSTR_WR_ADDR_HALT_WINDOW_SIZE 0x1e GENMASK(4, 1) as these are address bits. - Mani > + > #define QCOM_PCIE_1_0_0_MAX_CLOCKS 4 > struct qcom_pcie_resources_1_0_0 { > struct clk_bulk_data clks[QCOM_PCIE_1_0_0_MAX_CLOCKS]; > @@ -1126,6 +1130,11 @@ static int qcom_pcie_post_init(struct qcom_pcie *pcie) > > writel(0, pcie->parf + PARF_Q2A_FLUSH); > > + val = readl(pcie->parf + PARF_AXI_MSTR_WR_ADDR_HALT_V2); > + val &= ~ADDR_BIT_INDEX; > + writel(val | PARF_AXI_MSTR_WR_ADDR_HALT_WINDOW_SIZE, pcie->parf + > + PARF_AXI_MSTR_WR_ADDR_HALT_V2); > + > dw_pcie_dbi_ro_wr_en(pci); > writel(PCIE_CAP_SLOT_VAL, pci->dbi_base + offset + PCI_EXP_SLTCAP); > > -- > 2.17.1 > -- மணிவண்ணன் சதாசிவம்