From patchwork Fri Oct 11 10:41:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 13832450 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C6ACCFD362 for ; Fri, 11 Oct 2024 12:01:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nT+A8nUlQA0ErcQcvgnyg1sygEI3MjtBwk690qO0WVc=; b=d9wSyayNwQJUeu x/N1ZDvGjqE8l+1FddgqoN7Ijm5M/867N0eMUdVMiKwq8R4UXy8WhnqUDPBgAKcsvS+wxawbkHvi8 BeMhLCyhM6e8HYQTA4tfVoyG2gbiCEC1vPpysJ1GgpzZfwgfVOOYBs+AArwwENvWRtiHy9eQerUCC vkDmQOBOuQ9loXfNUgKkD5lC0lKenC1e1bWtnlS+Xgnft/DEDmv3fUhAzIrNT+M4YwL/XPy9BfsXQ EGCNZdsS9wAndQLPhf9RebVoAONsyQ1EXcASMUO81xdCnQWk1qUcC9VL49bfJHffzSYTczSc7yaD/ dcDh8q37+Ry4b5x8VgpA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szEKt-0000000GChT-1Rb9; Fri, 11 Oct 2024 12:01:35 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szD8n-0000000G2hn-3lv2 for linux-phy@bombadil.infradead.org; Fri, 11 Oct 2024 10:45:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=bPogcdfqVv16bWCk+Z9Y1/hcsIco/NtXF8dpbiKItgQ=; b=hva9bgHgLZM3GbdUrA87IqLaHi T0QFBUgSKqRvk4cjCdShh1jhohkECArHlYkLDZcJsrdCt+fq7akIleQ1yztF5U/Sm4J4JMsKAN9tb 2dJb7/B5CUsYd92hK/4vvyzS5EdJznrywqsZGw2zxkHTwDis6EB6Qs8pQTqFJB6OR8TASKscB+Yl+ GpPt0uVu1qKjalaUDydXLM7R085orJHkPZsxSjMA4Na6HNgbqe3rt1WrzJ8/NTX8ogxVbiGycE77y 1jPpJGXnU2DHuf+3VV26RHdI5pVffmV0mR27TMump4KvCpF2UG5R/UovCpsNb+CLvCIX3aLlaToAK dKVHL3Og==; Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szD8k-00000005rRe-32nJ for linux-phy@lists.infradead.org; Fri, 11 Oct 2024 10:45:00 +0000 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49B869w7014211; Fri, 11 Oct 2024 10:41:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=bPogcdfqVv1 6bWCk+Z9Y1/hcsIco/NtXF8dpbiKItgQ=; b=gOFcQYSswC5raprfpva1X2kviHM Nc55+LpArIygaOtEQRbq19kivJaw1+RF3LDKfpcXYV1DKwvxtYAsf1Kq3cN+EZ/t kuojKmqgYu9M8yiwJeN6KupXNzisWN6yxtwh3Ne87YiGbLmqMgBhhUkUMV0JStx6 1Pr88Y34+HwpfVEdLadY/y0Q4OQkri9Vp8yRpW+LKk21RWM35GQJ8vhYz04zfCYi rJ8kl/P2CtyBKJHI/XcHtsFUa53lJsqBFMPAkQ97oHxcpQlL63IMabd2A1yGKruk ZIKPvGwOkqiEegrlG6xVWQmg7/AmF9PD65UcSAlhi7jXglO+i5i4N256ZlQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 427077ggc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 10:41:49 +0000 (GMT) Received: from pps.filterd (NALASPPMTA05.qualcomm.com [127.0.0.1]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 49BAfmA8026308; Fri, 11 Oct 2024 10:41:48 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA05.qualcomm.com (PPS) with ESMTPS id 426wp7ac3h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 10:41:48 +0000 Received: from NALASPPMTA05.qualcomm.com (NALASPPMTA05.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 49BAflXS026294; Fri, 11 Oct 2024 10:41:48 GMT Received: from hu-devc-lv-u22-c.qualcomm.com (hu-qianyu-lv.qualcomm.com [10.81.25.114]) by NALASPPMTA05.qualcomm.com (PPS) with ESMTPS id 49BAfl5L026290 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 10:41:47 +0000 Received: by hu-devc-lv-u22-c.qualcomm.com (Postfix, from userid 4098150) id 9AD20651; Fri, 11 Oct 2024 03:41:47 -0700 (PDT) From: Qiang Yu To: manivannan.sadhasivam@linaro.org, vkoul@kernel.org, kishon@kernel.org, robh@kernel.org, andersson@kernel.org, konradybcio@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, mturquette@baylibre.com, sboyd@kernel.org, abel.vesa@linaro.org, quic_msarkar@quicinc.com, quic_devipriy@quicinc.com Cc: dmitry.baryshkov@linaro.org, kw@linux.com, lpieralisi@kernel.org, neil.armstrong@linaro.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Qiang Yu Subject: [PATCH v6 6/8] PCI: qcom: Fix the ops for SC8280X family SoC Date: Fri, 11 Oct 2024 03:41:40 -0700 Message-Id: <20241011104142.1181773-7-quic_qianyu@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011104142.1181773-1-quic_qianyu@quicinc.com> References: <20241011104142.1181773-1-quic_qianyu@quicinc.com> MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: pk8frON1jYYhTsPVdgXVgN5VIrUcpjji X-Proofpoint-ORIG-GUID: pk8frON1jYYhTsPVdgXVgN5VIrUcpjji X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 impostorscore=0 bulkscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 spamscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410110073 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241011_114459_314646_3A89F72F X-CRM114-Status: UNSURE ( 9.96 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On SC8280X family SoC, PCIe controllers are connected to SMMUv3, hence they don't need the config_sid() callback in ops_1_9_0 struct. Fix it by introducing a new ops struct, namely ops_1_21_0, so that BDF2SID mapping won't be configured during init. Fixes: d1997c987814 ("PCI: qcom: Disable ASPM L0s for sc8280xp, sa8540p and sa8295p") Signed-off-by: Qiang Yu Reviewed-by: Dmitry Baryshkov Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pcie-qcom.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 88a98be930e3..468bd4242e61 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1367,6 +1367,16 @@ static const struct qcom_pcie_ops ops_2_9_0 = { .ltssm_enable = qcom_pcie_2_3_2_ltssm_enable, }; +/* Qcom IP rev.: 1.21.0 */ +static const struct qcom_pcie_ops ops_1_21_0 = { + .get_resources = qcom_pcie_get_resources_2_7_0, + .init = qcom_pcie_init_2_7_0, + .post_init = qcom_pcie_post_init_2_7_0, + .host_post_init = qcom_pcie_host_post_init_2_7_0, + .deinit = qcom_pcie_deinit_2_7_0, + .ltssm_enable = qcom_pcie_2_3_2_ltssm_enable, +}; + static const struct qcom_pcie_cfg cfg_1_0_0 = { .ops = &ops_1_0_0, }; @@ -1405,7 +1415,7 @@ static const struct qcom_pcie_cfg cfg_2_9_0 = { }; static const struct qcom_pcie_cfg cfg_sc8280xp = { - .ops = &ops_1_9_0, + .ops = &ops_1_21_0, .no_l0s = true, };