Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2587171rdb; Wed, 15 Nov 2023 05:19:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcUGef+xJfEOLyJUUc3owvUpEnnWd5SudbEjAbhXim/gX3I35REwkl60k1fGtfVtT5rvc+ X-Received: by 2002:aa7:8b5a:0:b0:6c6:ad85:4abb with SMTP id i26-20020aa78b5a000000b006c6ad854abbmr8401771pfd.23.1700054358421; Wed, 15 Nov 2023 05:19:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700054358; cv=none; d=google.com; s=arc-20160816; b=vhwapyrvSjwHaMgLp0KAONNzrhn4LkaKi4Du1hOqFJkGLVt4Net0Ucuz8/DZGBdBRO DNsDKfuV+eKb2ftOtghACuVRkGLDajaEefn0oT7vvxOGK87afNN83ixe8TZaVZVWVOG1 pbaxlr2wDa8E1T32zWYzBYYt3j/1JfhnBpfpxnXQEBQqNeoakmKAOzscM62H1hqVJC6W t/7REzfpTmn7QvLzxsPkEot/0UBccsspyX80aw3KRCZZI3zc2nOSOrFsOcROwGouq7t/ b1p60hcjdY0+5ANmhNXz5Ay7XtiixAW8ZWvMizEINOWpLoKkzBpjiJdcPazUd8+Mc6Ip aWvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+vRJLB0hwLsR22GJa22gbqqqBV/RS9yq52QAFcn89A4=; fh=Q7MMoO86Xq8aQJFZLo7eMhES8FfFCdDF7ougyZU2fp4=; b=Q7HJStvAtsJIENBroqc+xeY/GsVmgtyNRhItmdDK1fB5T3ie8ZUFXChD2KJVDst7Ot /dgVcG0/oSjsXexwnKNkv2l1t56V5D0RXvr+NmeSsc3pegXRDYvWIdu3+zYkiJaWrCcQ 7HCO24sB/viS0CrgTBicw81i+l8AUDqf7WqG/7qNep9USpyaDfdvrjur1Ft8IBODFQfS pWtpHV7HlwS60Y7NavlQKb6TcPTpNJG6qanKqTWDdtvDz+qVAasfsN1e5KlcZ7yD1+8G VYbbGfrhjdOrQbWfI3xrzzYgcZ1q65TvWrDonnYb2KSLkW9qaRcZr99Wor1uKMz1aR3L yXUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AT7Il+4/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q8-20020a63e208000000b005898b0b851asi9887667pgh.530.2023.11.15.05.19.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 05:19:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AT7Il+4/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 0B59E8028FAE; Wed, 15 Nov 2023 05:19:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343904AbjKONTE (ORCPT + 99 others); Wed, 15 Nov 2023 08:19:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343875AbjKONTD (ORCPT ); Wed, 15 Nov 2023 08:19:03 -0500 Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49B47120 for ; Wed, 15 Nov 2023 05:19:00 -0800 (PST) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5a7d9d357faso75236837b3.0 for ; Wed, 15 Nov 2023 05:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700054339; x=1700659139; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+vRJLB0hwLsR22GJa22gbqqqBV/RS9yq52QAFcn89A4=; b=AT7Il+4/Vc9UMl7zKbOkhp9mIgRyNWa8lM5Pd5eDBpLTyIG6c5EWykCy4Jz2nDN2Xw rCugxvs0nwP9rwOXLpjShAHPOU4haXwozNKnkWAFpFEsUti1JGEx88MU1C1GB6s1+PRF 595kxfXGWFFY6d1BVaXveIsYXGJggay8ln4KYO6r7OPa3XToPtnAX4YAmSGuUk3o0e7C b1014Z3DW40hvucUrn+pCcpLanshl0SpRsxfRqVKU43bEikI1VkmpAgqBWxmXDl52rFF k+0OFYt5ubo5I2MDjAYkdKWAAeGybDbZ6vCI6sZeSy1UOjzT4Qnf0GFYW9owr2skASW1 VZuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700054339; x=1700659139; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+vRJLB0hwLsR22GJa22gbqqqBV/RS9yq52QAFcn89A4=; b=ImVLIGagzv79EruYtXPMJbToZyUAQI/1l+DH7+kM5yPOGttkrUXSypypskasYg0Ehz 6laNquDhxQC2V8vqgZBCZMyyo1kPECyrrx35j1BxTk0hgwA044/ls7TunNeHlrtrYifu CC9jXX1J2W60eiVd37SdwAjdnNCnUjjbdzMzd2LHqj0RmgWQOtGbzesiAk+Kix57L/3l WcyGxJPpvpbhlbRkNDL8CWhcVZnhQ/9YE8FN3SwLwzL0fH5vPJMnvzv0rJ8XsN/usaur QjARdhUfKw3j/EntzQ8AzLayrra8GzAK+ixS5oPaWSVuwgYMfCEHxOiy7NqxsHZDGBMq frWQ== X-Gm-Message-State: AOJu0YwDTDiaEFaf/lVmm0jcZN6z+5R6+EZv94x+Jv8E/oxwIlqyt00Q Vl86OPGV1UDyNgZT9BUopkug3TwaLRThzk2mUs2koA== X-Received: by 2002:a25:db90:0:b0:d7f:1749:9e59 with SMTP id g138-20020a25db90000000b00d7f17499e59mr13214940ybf.11.1700054339341; Wed, 15 Nov 2023 05:18:59 -0800 (PST) MIME-Version: 1.0 References: <1700051821-1087-1-git-send-email-quic_msarkar@quicinc.com> <1700051821-1087-2-git-send-email-quic_msarkar@quicinc.com> In-Reply-To: <1700051821-1087-2-git-send-email-quic_msarkar@quicinc.com> From: Dmitry Baryshkov Date: Wed, 15 Nov 2023 15:18:48 +0200 Message-ID: Subject: Re: [PATCH v3 1/3] PCI: qcom: Enable cache coherency for SA8775P RC To: Mrinmay Sarkar Cc: agross@kernel.org, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, konrad.dybcio@linaro.org, mani@kernel.org, robh+dt@kernel.org, quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, robh@kernel.org, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_parass@quicinc.com, quic_schintav@quicinc.com, quic_shijjose@quicinc.com, Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 15 Nov 2023 05:19:16 -0800 (PST) On Wed, 15 Nov 2023 at 14:37, Mrinmay Sarkar wrote: > > This change will enable cache snooping logic to support > cache coherency for 8775 RC platform. > > Signed-off-by: Mrinmay Sarkar > --- > drivers/pci/controller/dwc/pcie-qcom.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index 6902e97..b82ccd1 100644 > --- a/drivers/pci/controller/dwc/pcie-qcom.c > +++ b/drivers/pci/controller/dwc/pcie-qcom.c > @@ -51,6 +51,7 @@ > #define PARF_SID_OFFSET 0x234 > #define PARF_BDF_TRANSLATE_CFG 0x24c > #define PARF_SLV_ADDR_SPACE_SIZE 0x358 > +#define PCIE_PARF_NO_SNOOP_OVERIDE 0x3d4 > #define PARF_DEVICE_TYPE 0x1000 > #define PARF_BDF_TO_SID_TABLE_N 0x2000 > > @@ -117,6 +118,10 @@ > /* PARF_LTSSM register fields */ > #define LTSSM_EN BIT(8) > > +/* PARF_NO_SNOOP_OVERIDE register fields */ > +#define WR_NO_SNOOP_OVERIDE_EN BIT(1) > +#define RD_NO_SNOOP_OVERIDE_EN BIT(3) > + > /* PARF_DEVICE_TYPE register fields */ > #define DEVICE_TYPE_RC 0x4 > > @@ -961,6 +966,14 @@ static int qcom_pcie_init_2_7_0(struct qcom_pcie *pcie) > > static int qcom_pcie_post_init_2_7_0(struct qcom_pcie *pcie) > { > + struct dw_pcie *pci = pcie->pci; > + struct device *dev = pci->dev; > + > + /* Enable cache snooping for SA8775P */ > + if (of_device_is_compatible(dev->of_node, "qcom,pcie-sa8775p")) Quoting my feedback from v1: Obviously: please populate a flag in the data structures instead of doing of_device_is_compatible(). Same applies to the patch 2. > + writel(WR_NO_SNOOP_OVERIDE_EN | RD_NO_SNOOP_OVERIDE_EN, > + pcie->parf + PCIE_PARF_NO_SNOOP_OVERIDE); > + > qcom_pcie_clear_hpc(pcie->pci); > > return 0; > -- > 2.7.4 > -- With best wishes Dmitry