From patchwork Mon Sep 23 12:57:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qiang Yu X-Patchwork-Id: 13809570 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 845B3CF9C69 for ; Mon, 23 Sep 2024 12:57: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=R5T4iJhZMF1eyXRa3PPNprM9qixcyTdPI6ks5xpdaAI=; b=45fQ+7/IWCuCS3 x8uQ3w1udnydRwxEC4GpWqjYgoCUWzsejmKX+7ihYT8mdBNqJhjhRuL6vvhG1OgGrqDpLi73W70lu 0MrjvDNOxnINO9LhiQ3WkSTpbzhvpkfHxzcVx6sON2Lq+D6+cEiIcffA2FBU1pG81+il9w64p+Nov qBdTF/tIQRCs8m/i0TEO3FQ5ZCryBC1pUaFotVHDyX9CrtZ+mkDkHp3JuU51T7FPFFvUFbH4+eRYH 0tuDm7ZOu8qMIGg/4lN8J3CQPsd1mYUw7gH7ZQJ0IvG+PGa3Kjf/hsVy9ThL/4aAAqVP/1zwqKpWP 6tKmQVQ2vhaEhyNey/hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1ssidD-0000000HDmZ-0Xen; Mon, 23 Sep 2024 12:57:35 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1ssid9-0000000HDlM-2JVY for linux-phy@lists.infradead.org; Mon, 23 Sep 2024 12:57:32 +0000 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48NB8E2F006815; Mon, 23 Sep 2024 12:57:20 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=ZSlX92bF8DV z/4B82xZDaoGeSNygOEwjEjlqzPvlRDY=; b=ChRuMCZ5Pz2gBnbin5LVvTJF37d luMZnmg2Fm06S63wMNowSWa4WoatxWRRPfNz7tFjJzwbg5ZlpLmouNVaeRFVvfAG A2EiCajwOF0GcbAcOaShdytaZxme1k1GBnS1oOqMxziR17XsbVCTEv3T/Pqz60tM WPsW2JdfKREIotzumThHmhgP1tsBl7bijO2MynGzIhfbPBB2acN3MUTiBRd4NEZj WTA/36RBLZLGGhwywLdgO/hrXs5Dw7MuWgPN/yB8FVMUllyLl+68pJ8+cocNLw+8 KK10hrF9BPPieUnXIbvUxDi5b9d0COqQSgcUQz3tpZ9sH+do4wDxrfEIbeg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41sn3s4t78-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Sep 2024 12:57:19 +0000 (GMT) Received: from pps.filterd (NALASPPMTA04.qualcomm.com [127.0.0.1]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 48NCvIRP018898; Mon, 23 Sep 2024 12:57:18 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 41sq7ktqd5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Sep 2024 12:57:18 +0000 Received: from NALASPPMTA04.qualcomm.com (NALASPPMTA04.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 48NCvI95018867; Mon, 23 Sep 2024 12:57:18 GMT Received: from hu-devc-lv-u22-c.qualcomm.com (hu-qianyu-lv.qualcomm.com [10.81.25.114]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 48NCvIVw018861 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Sep 2024 12:57:18 +0000 Received: by hu-devc-lv-u22-c.qualcomm.com (Postfix, from userid 4098150) id 4822E65F; Mon, 23 Sep 2024 05:57:18 -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 v3 5/6] PCI: qcom: Add new cfg and ops without config_sid callback for X1E80100 Date: Mon, 23 Sep 2024 05:57:12 -0700 Message-Id: <20240923125713.3411487-6-quic_qianyu@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240923125713.3411487-1-quic_qianyu@quicinc.com> References: <20240923125713.3411487-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: tF1VXCEXKtvknYLwXvvAAv9QyGG1DLMM X-Proofpoint-ORIG-GUID: tF1VXCEXKtvknYLwXvvAAv9QyGG1DLMM 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 adultscore=0 phishscore=0 mlxscore=0 impostorscore=0 spamscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409230095 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240923_055731_615570_88EE597F X-CRM114-Status: GOOD ( 11.43 ) 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 Currently the ops_1_9_0 which is being used for X1E80100 has config_sid callback to config BDF to SID table. However, this callback is not required for X1E80100 because it has smmuv3 support and BDF to SID table will be not present. Hence introduce cfg_1_38_0 and ops_1_38_0 with config_sid callback being NULL since X1E80100 has IP version 1.38.0. Signed-off-by: Qiang Yu --- drivers/pci/controller/dwc/pcie-qcom.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c index 88a98be930e3..56ba8bc72f78 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.38.0 */ +static const struct qcom_pcie_ops ops_1_38_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, }; @@ -1409,6 +1419,10 @@ static const struct qcom_pcie_cfg cfg_sc8280xp = { .no_l0s = true, }; +static const struct qcom_pcie_cfg cfg_1_38_0 = { + .ops = &ops_1_38_0, +}; + static const struct dw_pcie_ops dw_pcie_ops = { .link_up = qcom_pcie_link_up, .start_link = qcom_pcie_start_link, @@ -1837,7 +1851,7 @@ static const struct of_device_id qcom_pcie_match[] = { { .compatible = "qcom,pcie-sm8450-pcie0", .data = &cfg_1_9_0 }, { .compatible = "qcom,pcie-sm8450-pcie1", .data = &cfg_1_9_0 }, { .compatible = "qcom,pcie-sm8550", .data = &cfg_1_9_0 }, - { .compatible = "qcom,pcie-x1e80100", .data = &cfg_1_9_0 }, + { .compatible = "qcom,pcie-x1e80100", .data = &cfg_1_38_0 }, { } };