Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp464195rdb; Thu, 2 Nov 2023 08:36:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH/wYoRyO+KKmBWNZD+IFZEWdT2nXGvRpSbVI7/PtGMbrqpNO2NN1mKho+YQ/rreM4CjAVP X-Received: by 2002:a05:6358:788:b0:16b:4180:fb32 with SMTP id n8-20020a056358078800b0016b4180fb32mr887888rwj.32.1698939371803; Thu, 02 Nov 2023 08:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698939371; cv=none; d=google.com; s=arc-20160816; b=q5Pv7lx/d+ZCHvhUWfWpuQhxouOB9EtUxLFwfG9GKX3yp4wwDcD7dbmx5LHal+vF7Q KmE8z+DcZw7nc0kDQF41QzuavlOjKxi6n66Shn3oZRmo+ARpgnTNjPeoRAlI5VEuVvmm uf8AcNBc3BonUnvPDXsjf2OuIiGY0VXN5ay6w57cw73qFhYmhr7ST9h6oab19AgtTnCg +/IeMwIwEEZkiUljDQJh5xIsbEw7bTMW/TlLYIzrbtzske5cd1QfRi6NdBRulQrAJNuq ecY0174nqRrMciZzhYnX1lF/zpEslHjxHPh6Vs7Hi5wEVtum3howzCdCnuL3gdXz1D5c dQBA== 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=Z3chS4WFn6t5Osuo6EZKGIpuiS6r6Z9yZqIAr6Fa9kQ=; fh=Q7MMoO86Xq8aQJFZLo7eMhES8FfFCdDF7ougyZU2fp4=; b=Mog4xq+wWh9WbO37aI7qO2ZVNdG4Afs6dSt6JKv5ivEVBU8AtXxpxcm+QYKz0ISQ5O MIgHC+yn6aR78ZJbPlY/c4YPsive8Xeoi7jiLrKBtGJASt9VkbUyVVaq9QEANFe67xD7 FvRpz4qHD5kjnjHykbgFzbyQrqXFS8lnnAeHRU7Q7yFU+wm9oP7sRdS16z8QGxIvCHXA jt2gtwkwOe8ZqKHQ3KNh15aYp4DCZFGhf3+wBQUryqOBJ3IcpqHo8TsUmAF/91efDY19 PETjRQVbcjJWQI9JSNQ/sitQMqexlrFwPN6IsVnQYYL7ublLh/ow7jR/LuEi7W6gO7rw 0utw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w0Uwig8b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id f22-20020a63f116000000b005b8ee420006si1909310pgi.372.2023.11.02.08.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 08:36:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w0Uwig8b; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 45606808650C; Thu, 2 Nov 2023 08:35:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347622AbjKBPeq (ORCPT + 99 others); Thu, 2 Nov 2023 11:34:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235179AbjKBPeo (ORCPT ); Thu, 2 Nov 2023 11:34:44 -0400 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 EC174193 for ; Thu, 2 Nov 2023 08:34:35 -0700 (PDT) Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-5af6c445e9eso13073377b3.0 for ; Thu, 02 Nov 2023 08:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698939275; x=1699544075; 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=Z3chS4WFn6t5Osuo6EZKGIpuiS6r6Z9yZqIAr6Fa9kQ=; b=w0Uwig8boqWpKNGKZ6GiC7OEIfGZexyjAsA2QtWyupbB2Jrb5QCTqzxYpgIHpAERZH EINnjMxifjXdRUm0oxmFoWKl+dxqBXktwIH8DSWQ69StJzP0FnZO5rA0piZpzyz39isZ kRRQTcmD7nf+AJ5t/ec/eLLIVZEU7O9cXnMWww4s5tWPkgFNe1jnffZXfrVHiHTICpCW YKMA2wvdzvLMWh3elv0/DAjX8iUH0YUXJlh64u6lp8XoHUGShc/GUu5vE8VM187WWGi8 EciqCTPAaPhA3lf9X7qErnYo2THmIJ3ngEQRMbg+wTPUvaQTSL3aY4k/9Rlbxd5a2JFj CIVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698939275; x=1699544075; 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=Z3chS4WFn6t5Osuo6EZKGIpuiS6r6Z9yZqIAr6Fa9kQ=; b=enHwShOAIh173AAMUESyhhWuyjNIrYJDYXdjzzcNntV5KLcdt3FOf6MDQgnJZ3nxRA EzZnsuq/fVVfpuBVXqorZq6e9Il9XyO1kHkr0/IPCD12QhH4JzPsyEJWUP9Pdb8HxWiD 5NpIGCf+FzaWf0MPa9tVPXMkztvY1ASnpt52oH4JsxDGlxBI86c/D+8YHtDZ0ZjSC5Fk 4SulXw3oIrugxg6TjrHnUlmg5dEkR+M0DOiEN5Hx8IDeYq+QnaexK7SaRk/ES6MYf2jg Q5wQYPHv+x4ID7CWcTEAC+TCY6M56emfejC/7y++cxuiIVV79m8u0waTrDo6ZFrL67yR DHow== X-Gm-Message-State: AOJu0Yzug3Va5aYS49G62UOuTovqmPtQ3pj7kqia4Ec/9aH5f5g5IUgC IuAycIXN01mZB+rjRqhaJmOqkrgxV8ZTeo9OAI1mEA== X-Received: by 2002:a81:a08a:0:b0:5b3:3109:36f6 with SMTP id x132-20020a81a08a000000b005b3310936f6mr47533ywg.44.1698939275131; Thu, 02 Nov 2023 08:34:35 -0700 (PDT) MIME-Version: 1.0 References: <1698767186-5046-1-git-send-email-quic_msarkar@quicinc.com> <1698767186-5046-2-git-send-email-quic_msarkar@quicinc.com> In-Reply-To: <1698767186-5046-2-git-send-email-quic_msarkar@quicinc.com> From: Dmitry Baryshkov Date: Thu, 2 Nov 2023 17:34:24 +0200 Message-ID: Subject: Re: [PATCH v1 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,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Thu, 02 Nov 2023 08:35:50 -0700 (PDT) On Tue, 31 Oct 2023 at 17:46, Mrinmay Sarkar wrote: > > This change will enable cache snooping logic to support > cache coherency for SA8755P RC platform. > > Signed-off-by: Mrinmay Sarkar > --- > drivers/pci/controller/dwc/pcie-qcom.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c > index 6902e97..6f240fc 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,9 @@ > /* PARF_LTSSM register fields */ > #define LTSSM_EN BIT(8) > > +/* PARF_NO_SNOOP_OVERIDE register value */ > +#define NO_SNOOP_OVERIDE_EN 0xa > + > /* PARF_DEVICE_TYPE register fields */ > #define DEVICE_TYPE_RC 0x4 > > @@ -961,6 +965,13 @@ 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")) Obviously: please populate a flag in the data structures instead of doing of_device_is_compatible(). Same applies to the patch 2. > + writel(NO_SNOOP_OVERIDE_EN, pcie->parf + PCIE_PARF_NO_SNOOP_OVERIDE); > + > qcom_pcie_clear_hpc(pcie->pci); > > return 0; -- With best wishes Dmitry