From nobody Sun Nov 24 22:39:31 2024 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8932319AD48; Fri, 1 Nov 2024 11:34:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730460875; cv=none; b=koXK0DTFA1U5cSwgi4zGyZOsavRxpz44IhdOSLcF2HfOsxdBuasVlenHOOLpFIQqwPJh8iO2aXRBJ6QaZVEFaAlbHcLOqlo6VLcJGSRXZn3p1CTG9vG/TumQOjH0rMf8sG/MGXlPtpPAERHOYdgI5CmAeON6bjF3u7XkHl9STE4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730460875; c=relaxed/simple; bh=rxsjN5zN+0oj7GrrzAsD74rm7vsPBW2CCIqtF70Un80=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=pb6kftjKcPiA+vMjJShrquXemBaftKYaUj4ADtc0Qx6/Zqc+j4AaJ6fX1YWVcEXQkGxgCc1/Ht74LK8YOdPzqQrrlxEHV2g8N9pjNvVeibEJPJLqqjGbdTVFmFj+02sRDjSTJD4shigb5HqhkOJgH+qOdGT3SxF97pk/6JvaK4Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=EwhWml0v; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="EwhWml0v" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A13YrUH020732; Fri, 1 Nov 2024 11:34:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 0pI2bqP+nnDJHjBTwr2hXe0ZgN8lGLZM/jAu6P274D0=; b=EwhWml0vwjsQ0JYI ZCnRjBMK4aoC/hDxSiOt5SgPTfQj9O3S/DOjf4xiaB+kdoNFQ9ZNcRGWuPuGkjzh +mRmVtc1ne/ELnk+GveK93zRbkidY3kYKhg+8hiFizyym5IsQ3FoYdS6Ajd+N+Ew bZtaAu9T5tFGBO6jzZ3fO3hUtxY7yzBdriLEy2SwMfepeTIgJToff3qrEhGXYaWW 0FA5/b4yOMDgb+HB1LXj+QkAxOL41XlanlPrmMcmRCx21jYQxO6TVAOtUzL/lY9G u/LTQ7EhCbNjUvuB1eOcuOh9S33X653kKqiBtJrziF8kbUOo9Fi103D0P5nrj0U3 0lm2qQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42kmp0q4xc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Nov 2024 11:34:24 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4A1BYO2H031472 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 1 Nov 2024 11:34:24 GMT Received: from hu-krichai-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 1 Nov 2024 04:34:20 -0700 From: Krishna chaitanya chundru Date: Fri, 1 Nov 2024 17:04:12 +0530 Subject: [PATCH v3 1/3] PCI: dwc: Skip waiting for link up if vendor drivers can detect Link up event Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20241101-remove_wait-v3-1-7accf27f7202@quicinc.com> References: <20241101-remove_wait-v3-0-7accf27f7202@quicinc.com> In-Reply-To: <20241101-remove_wait-v3-0-7accf27f7202@quicinc.com> To: Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas CC: , , , , , Krishna chaitanya chundru X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730460856; l=1804; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=rxsjN5zN+0oj7GrrzAsD74rm7vsPBW2CCIqtF70Un80=; b=AZSwHgPQUYimeqs9w/UjrdNwhIFOIEon0WGOBvCymuHnM5WLTJ0hJ2zXz+e0yQHZNKbAsy4xX wkCmBZgU425AGrxHkuHKnqXcnh/wZ+WDIgcKBEu4HKfCkHWM9dihFDn X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: MbXVJyYDkNedfSaOeJ3tBG9CwaAICEy_ X-Proofpoint-ORIG-GUID: MbXVJyYDkNedfSaOeJ3tBG9CwaAICEy_ 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 bulkscore=0 malwarescore=0 impostorscore=0 mlxscore=0 suspectscore=0 adultscore=0 clxscore=1015 phishscore=0 spamscore=0 mlxlogscore=817 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411010083 If the vendor drivers can detect the Link up event using mechanisms such as Link up IRQ and can the driver can enumerate downstream devices instead of waiting here, then waiting for Link up during probe is not needed here, which optimizes the boot time. So skip waiting for link to be up if the driver supports 'linkup_irq'. Signed-off-by: Krishna chaitanya chundru --- drivers/pci/controller/dwc/pcie-designware-host.c | 10 ++++++++-- drivers/pci/controller/dwc/pcie-designware.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pc= i/controller/dwc/pcie-designware-host.c index 3e41865c7290..26418873ce14 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -530,8 +530,14 @@ int dw_pcie_host_init(struct dw_pcie_rp *pp) goto err_remove_edma; } =20 - /* Ignore errors, the link may come up later */ - dw_pcie_wait_for_link(pci); + /* + * Note: The link up delay is skipped only when a link up IRQ is present. + * This flag should not be used to bypass the link up delay for arbitrary + * reasons. + */ + if (!pp->linkup_irq) + /* Ignore errors, the link may come up later */ + dw_pcie_wait_for_link(pci); =20 bridge->sysdata =3D pp; =20 diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/con= troller/dwc/pcie-designware.h index 347ab74ac35a..539c6d106bb0 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -379,6 +379,7 @@ struct dw_pcie_rp { bool use_atu_msg; int msg_atu_index; struct resource *msg_res; + bool linkup_irq; }; =20 struct dw_pcie_ep_ops { --=20 2.34.1 From nobody Sun Nov 24 22:39:31 2024 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BB2415F330; Fri, 1 Nov 2024 11:34:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730460882; cv=none; b=N14PmQ8D8eUzpSjWxW7ocYXedApqpxdTe4pJQVPt6GrV0Ha1J1313c+eiQRpNF5VmdPYjehhPsldrBGqX/dZiZiVsiFcYEmEy1DuirFXd/eLIUHCUygXAPg67KsLsQaVCZQ558iGsXq1ee0hlFEICdsTvGgQtTIC7YH0ubFR9x8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730460882; c=relaxed/simple; bh=ufOJLCActkFLj7Eefuq3LyPZ31PRj6Do4jEsG4+Ul+U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=UoAAw2aCR1PNs8U73RPh5l+cIVMsS8KnTz5zynGkkpbGMzd2uzyai+XITuXN0cs9p46P2+Qe0Rc9KG8t3CXmq7cpZvgSExKkK5dqxx90YtznVBDTwttVikoeuI59HmbMNxIY/p9v86uYRLobgBOPRccfTm94x06AQh74NIXEqp4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=DXrjFqCI; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="DXrjFqCI" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A14sYHM009544; Fri, 1 Nov 2024 11:34:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 24FYY6rD9PA41qaPwE7AbrcckRbR+ehk473LrJat09w=; b=DXrjFqCIAZoY8OaE MXLIIDBqpmH78MqFPCw6O+XtjaetQ4vMdZM6LQCMIUGKJDWU4uBkTV0QezeNfNNg uHOO1aSucjI0OHoHr1iESL8MJmzFGP7iiZQD1MwaWX2Z8IYOMgQMABY7zJsJL9s0 XAQQ/vqHEuA94F5Ff4hSgxpcTQEjyPO+obHD7TrSPqiQUlSH/t52kOyrAlcHRZN+ Trz7I1YqW+1noBo/12Wkbntptr2+8wwcJANjRJ/3b3Kq8J4bpX4QqlzKZ7XC3ItT zIJkFaL6AeOi3MCcBMi+8wM4Hsma/yB8TYY5QdvPvERoC4wHk6HLERV4LH3Sop1C 6Nj28g== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42mrce1a0g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Nov 2024 11:34:28 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4A1BYRHG031485 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 1 Nov 2024 11:34:27 GMT Received: from hu-krichai-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 1 Nov 2024 04:34:24 -0700 From: Krishna chaitanya chundru Date: Fri, 1 Nov 2024 17:04:13 +0530 Subject: [PATCH v3 2/3] PCI: qcom: Set linkup_irq if global IRQ handler is present Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20241101-remove_wait-v3-2-7accf27f7202@quicinc.com> References: <20241101-remove_wait-v3-0-7accf27f7202@quicinc.com> In-Reply-To: <20241101-remove_wait-v3-0-7accf27f7202@quicinc.com> To: Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas CC: , , , , , Krishna chaitanya chundru X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730460856; l=1458; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=ufOJLCActkFLj7Eefuq3LyPZ31PRj6Do4jEsG4+Ul+U=; b=xrCuwjclQW82d5Ve6JKGIpPgo1NNeuKbFWWyZQ/mXTRN6j56wXvrhMvu70z6prxxoCpqhFsXR jAqhXHoh0+qBUCd98WyqRD8spk+KXOe3MZCMvNenu2KM53FgihDafyH X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: MB2Cf9J33gKZxZLxjAKMUtJkLCU0O3Bw X-Proofpoint-ORIG-GUID: MB2Cf9J33gKZxZLxjAKMUtJkLCU0O3Bw 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 malwarescore=0 impostorscore=0 adultscore=0 priorityscore=1501 phishscore=0 mlxscore=0 spamscore=0 mlxlogscore=735 suspectscore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411010083 In cases where a global IRQ handler is present to manage link up interrupts, it may not be necessary to wait for the link to be up during PCI initialization which optimizes the bootup time. So, set linkup_irq flag if global IRQ is present and In order to set the linkup_irq flag before calling dw_pcie_host_init() API, which waits for link to be up, move platform_get_irq_byname_optional() API above dw_pcie_host_init(). Signed-off-by: Krishna chaitanya chundru --- drivers/pci/controller/dwc/pcie-qcom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controlle= r/dwc/pcie-qcom.c index ef44a82be058..474b7525442d 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1692,6 +1692,10 @@ static int qcom_pcie_probe(struct platform_device *p= dev) =20 platform_set_drvdata(pdev, pcie); =20 + irq =3D platform_get_irq_byname_optional(pdev, "global"); + if (irq > 0) + pp->linkup_irq =3D true; + ret =3D dw_pcie_host_init(pp); if (ret) { dev_err(dev, "cannot initialize host\n"); @@ -1705,7 +1709,6 @@ static int qcom_pcie_probe(struct platform_device *pd= ev) goto err_host_deinit; } =20 - irq =3D platform_get_irq_byname_optional(pdev, "global"); if (irq > 0) { ret =3D devm_request_threaded_irq(&pdev->dev, irq, NULL, qcom_pcie_global_irq_thread, --=20 2.34.1 From nobody Sun Nov 24 22:39:31 2024 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D44719DF40; Fri, 1 Nov 2024 11:34:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730460886; cv=none; b=m7TvSSf7W2ARqW3rdtgZkh7YvbQDq/FgujZd2A5Nd+kID3zkvPnO4T480QE6nSm0p+HGCt+YJwYexzH97vESKCobG/sQtKMEdC2z8v0x9azdBbtbg2UnT0k3CYokKVOZBGfF/aG25X0rhS/h/5513sKv21pK3hw3wU22gBJWPkw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730460886; c=relaxed/simple; bh=XK8jHN4bI6L37/KmZEIa9NFsKAQWG3YSYzP4qmstAdw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=K1T6oU1gyuzi+cOVj9vBHLt3nKJf8npGbsFkE0j5gxmDCRTe7cY21fbAdzQ2GrqKadcMdoKVsl29E4DcOjstKoFbwOiMaPEaI9cuupgauJoAio1memNsrzTsuQYnZcU2pJTdbOVF7Zcklk1k8PFmuq2AQ2/ZF2eXkYLHgPt9A48= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=kz9BuXze; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="kz9BuXze" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4A15AC7R004019; Fri, 1 Nov 2024 11:34:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= TkcsRg+Ahg9XchoRb/A5U1N77EYM0JB4I7gwzuiM8hw=; b=kz9BuXzeleLxXboQ eR8UoU6IV/j45Z1ysCeoEQidZUykH6lWVBxSpbSnwTRKkeAjSTxV1h7b0hsNDOZ1 wdFFSUOnbfaXv2hROVfA4eVMqC8fPbiERrDxNX18oWxeKvjey+sl25iXso4awg0x HnM3TuReKn9vlzLC5/x0dIBK8vxmq40JrthkWKcT88NEBwq8HlfEZds/0oYo4FVW 5j9dYlEcCiyddRmXJXaJYcTv7TxnckfcvCaYRSOUp1/9YOtBdMuQDBTCAYr4GeON 3LDzhb5xKoRqlVpD46VOLPh2wfpDXE+n2nHIfQohr00Jt9jdD2DBfsFyhgPy93Kw hxX31Q== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 42kns3q017-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Nov 2024 11:34:32 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4A1BYVBD028904 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 1 Nov 2024 11:34:31 GMT Received: from hu-krichai-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Fri, 1 Nov 2024 04:34:28 -0700 From: Krishna chaitanya chundru Date: Fri, 1 Nov 2024 17:04:14 +0530 Subject: [PATCH v3 3/3] PCI: qcom: Update ICC and OPP values during link up event Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20241101-remove_wait-v3-3-7accf27f7202@quicinc.com> References: <20241101-remove_wait-v3-0-7accf27f7202@quicinc.com> In-Reply-To: <20241101-remove_wait-v3-0-7accf27f7202@quicinc.com> To: Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas CC: , , , , , Krishna chaitanya chundru X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1730460856; l=882; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=XK8jHN4bI6L37/KmZEIa9NFsKAQWG3YSYzP4qmstAdw=; b=XkkMxLs+YEuteC76oljkF/p79nSlcg07xiDagQjnX0SINgiFrFaucBwPJS56k0xrNzaipVi06 blBVSc8RQGSAGB9Q3FeByd2mFm3XP8Q3PPwFQQlUkbXVhm+vYKUqTsh X-Developer-Key: i=quic_krichai@quicinc.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: C4026sBi7OmNr1YkqmVqEXOPQYtxN44V X-Proofpoint-ORIG-GUID: C4026sBi7OmNr1YkqmVqEXOPQYtxN44V 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 mlxscore=0 suspectscore=0 adultscore=0 spamscore=0 phishscore=0 mlxlogscore=698 malwarescore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2411010082 As part of the PCIe link up event, update ICC and OPP values as at this point only driver can know the link speed and width of the PCIe link. Signed-off-by: Krishna chaitanya chundru --- drivers/pci/controller/dwc/pcie-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controlle= r/dwc/pcie-qcom.c index 474b7525442d..5826c0e7ca0b 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -1558,6 +1558,8 @@ static irqreturn_t qcom_pcie_global_irq_thread(int ir= q, void *data) pci_lock_rescan_remove(); pci_rescan_bus(pp->bridge->bus); pci_unlock_rescan_remove(); + + qcom_pcie_icc_opp_update(pcie); } else { dev_WARN_ONCE(dev, 1, "Received unknown event. INT_STATUS: 0x%08x\n", status); --=20 2.34.1