Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp4182068rdh; Fri, 29 Sep 2023 13:54:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHXQ0IHpvnUPK0CSVFrvhQR+Kmsaa1FUOdjmIIwezFy02pLOEpbJqpT/7zRXWIYJdAYUqVQ X-Received: by 2002:a05:6a21:a599:b0:15b:2125:890f with SMTP id gd25-20020a056a21a59900b0015b2125890fmr6470196pzc.37.1696020847213; Fri, 29 Sep 2023 13:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696020847; cv=none; d=google.com; s=arc-20160816; b=JBS6YgE5ZkxhB/gMnSl7+6IKq2ID1NBBlFOTBJSjExClSHLcUNXOAgsOoijh3u8HqT RKFzyd2t8e34kGNZOg1XRSTX1xPLFLmcsdwrIfajrfsY7/oYre1PKjeoSTEcHERpjYu6 6MXZ+jmELVlBNaR6iCM5BscQ2tkNe9wdLwJCuOFhHHGnJcwUuljd1qcsNbxNXyY1xDFx g1vQ7WbM9gJ7xVOQTo9nBGrvagSTJrZB7TBqRNES8K3R8DFpYazNE4XtvkVITqx/TMQz /qO+ft9fWjJnXbZs+5ZFdZCN06WwOTGSlOLGSDFJuBMPbqj3/wggwB+TRc4RKImL43bh QgqQ== 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-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=7dUAZcuKSxKcRMjOwDY/dSq+hZi8mcEVxwwgDVkA42I=; fh=3ZTeDbxs9DAbugzX9yF7VKfnYeof/ctw7Cjm+Y9gItA=; b=rzaeI3PlA0pPytnr+JX03n1Sth/0tTYA8u6m8yMS+PIVqbSkkDiZVhFIP+yUKPSXB/ IsYpzCMK8lozV6yhxgNSrQEBgCkUOlhKevhpAUbPjyPpLop4tdJenVVsT/76jRaSHz12 etQWLyQd+i+4KXsgspH77x1MHPNpv7ceU8ZhkqDkQYigeYkrVvdCMzAgHc7ZuYuj3JvL 881nTKU/73q9pbeOj3UgiXfttaXtBW6yDJ1VZo+7Jhc1s4hLnCz3BPd23pFW4YlKyeyf ZJ7KnuAdpGTZzOqid+k5GqPgckd7quOL7CCzZEWQzbnlhgo8g6yQWjJOh9fzhrAlQMHK B+Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tdCCKVkw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 36-20020a631564000000b00565617189e2si22092215pgv.839.2023.09.29.13.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 13:54:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tdCCKVkw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D32998351839; Fri, 29 Sep 2023 13:48:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233779AbjI2UsS (ORCPT + 99 others); Fri, 29 Sep 2023 16:48:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232748AbjI2UsQ (ORCPT ); Fri, 29 Sep 2023 16:48:16 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCCAA1A7; Fri, 29 Sep 2023 13:48:14 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BF49C433C9; Fri, 29 Sep 2023 20:48:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696020494; bh=8Oeq2oyvclFb8e5vneLF5O4C3f3cxRlcpro2BcWHes4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=tdCCKVkwLs8N/mkl3LWPdO47xAroH163igwOK4121omnkF3zit2PjnHPyFyuQa3JJ PXsc9FWOpRPA7HOdlwRviTYwenh/GaL1KGo187fLHcYs+ODFlYqgQy6DyDwA8ArVMG RN03+3cjx2oII8/ai9bkeIUhqWiXxUiL0YQxGh2IrY1uXvWHNzSETDA1/+sWc+eQko sHHJe1IdhYjKAuH/4c3WcsD4sixUmFxxxvqd+8ACcu6FykHqZJvjHzjnhnzijXhgqW Jw4b5m9tjYtk+qVKdBM8IpY9Ao/h7xDouDu3E4E+ivoM7K3HbTEGV089tvuOI7ttJm 7IZEd8jF9V97A== Date: Fri, 29 Sep 2023 15:48:12 -0500 From: Bjorn Helgaas To: Sricharan Ramabadhran Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, robh@kernel.org, mani@kernel.org, lpieralisi@kernel.org, bhelgaas@google.com, kw@linux.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, gregkh@linuxfoundation.org, dmitry.baryshkov@linaro.org, stable@vger.kernel.org, robimarko@gmail.com Subject: Re: [PATCH V6] PCI: qcom: Fix broken pcie enumeration for 2_3_3 configs ops Message-ID: <20230929204812.GA553836@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230919102948.1844909-1-quic_srichara@quicinc.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 29 Sep 2023 13:48:43 -0700 (PDT) On Tue, Sep 19, 2023 at 03:59:48PM +0530, Sricharan Ramabadhran wrote: > PARF_SLV_ADDR_SPACE_SIZE_2_3_3 macro is used for qcom_pcie_post_init_2_3_3. > PCIe slave address space size register offset is 0x358, but was wrongly > changed to 0x16c as a part of commit 39171b33f652 ("PCI: qcom: Remove > PCIE20_ prefix from register definitions"). Fixing it, by using the right > macro and remove the unused PARF_SLV_ADDR_SPACE_SIZE_2_3_3. > > Without this access to the registers of slave addr space like iATU etc > are broken leading to PCIe enumeration failure on IPQ8074. > > Fixes: 39171b33f652 ("PCI: qcom: Remove PCIE20_ prefix from register definitions") > Cc: > Reviewed-by: Manivannan Sadhasivam > Reviewed-by: Konrad Dybcio > Tested-by: Robert Marko > Signed-off-by: Sricharan Ramabadhran Applied to for-linus for v6.6, thanks! > --- > [V6] Fixed subject and commit text as per Bjorn Helgaas > > drivers/pci/controller/dwc/pcie-qcom.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index e2f29404c84e..64420ecc24d1 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -43,7 +43,6 @@ > #define PARF_PHY_REFCLK 0x4c > #define PARF_CONFIG_BITS 0x50 > #define PARF_DBI_BASE_ADDR 0x168 > -#define PARF_SLV_ADDR_SPACE_SIZE_2_3_3 0x16c /* Register offset specific to IP ver 2.3.3 */ > #define PARF_MHI_CLOCK_RESET_CTRL 0x174 > #define PARF_AXI_MSTR_WR_ADDR_HALT 0x178 > #define PARF_AXI_MSTR_WR_ADDR_HALT_V2 0x1a8 > @@ -797,8 +796,7 @@ static int qcom_pcie_post_init_2_3_3(struct qcom_pcie *pcie) > u16 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); > u32 val; > > - writel(SLV_ADDR_SPACE_SZ, > - pcie->parf + PARF_SLV_ADDR_SPACE_SIZE_2_3_3); > + writel(SLV_ADDR_SPACE_SZ, pcie->parf + PARF_SLV_ADDR_SPACE_SIZE); > > val = readl(pcie->parf + PARF_PHY_CTRL); > val &= ~PHY_TEST_PWR_DOWN; > -- > 2.34.1 >