From patchwork Wed Jun 26 12:37:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya Chundru X-Patchwork-Id: 13712828 X-Patchwork-Delegate: kw@linux.com 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 DDF8B181D1B; Wed, 26 Jun 2024 12:38:35 +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=1719405517; cv=none; b=sTBKBUtUUdmTISK0lr0By40Jfyai0xk6VjIuScXSjcwzMLrtq7d4rtmHWlACEbRuUlwuf9k/dDRGZy7cWqBVNIeeZRYev18c/15q6ht7L+eI0Zwe+BWGG1uM8UYNc8nMo0R+l1cHp90tNoJVV55G/B2q/gtvmed3l42Gpa1R4hA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719405517; c=relaxed/simple; bh=s6rG0mWtGa+FPAtP4/Igwrj1RCMVNRU6WP+WJb8pOA8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=dovooKebqyxjCv6B3a3HWnU+iuY1VV00j9xoYhMF9kfQd1wS2LqTpa6c4qDDm1inEglPE6wzUK7vAOnxuLydtbdcmO785dE3wMhfSxEPQ7GGIkBmGLWk/MtM4cSkSrY7t7Gaij6b/uyA0iJyFKhWXc8FZ22GL2y9hxyroCL5ppg= 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=E9AcAwpW; 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="E9AcAwpW" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45QAfObW018807; Wed, 26 Jun 2024 12:38:24 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= MIGmQvfA8nGan3pLxUXweW3J30n/DGnXm12FB36EFUc=; b=E9AcAwpWYWYkNzco SEqSC5US/uhXs2eupDEyAeaExqOCGez6x7aRJ0NaHTiI45EXPYWlORLoSLji7AEg Yj+lTNEf0iRhUBWb+YJ0S9J1WsijS3K0Ti2EGok1GjHa+lg2vn1hsnbBjaV0HVsg ac3TbV38SYhQUd5uT7NB+fyZIUKxcgKVU4u9kdzqZvSBfmyZP1mtZuNEHiHgZhzQ mBnU77g0ysQvx2rEsRVMNZLqm1prW8bkn0s60jtrrqVcMWht8QVQVRAE4ST1c5nq fBdDNAszCJJx4svYwNg5Ugl90p9P3FFl1JvfIuP7GPjSLktQCI81Cj9A4bj7nWkL 9xYNtg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 400f90gqqe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Jun 2024 12:38:24 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45QCcNsI001560 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Jun 2024 12:38:23 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; Wed, 26 Jun 2024 05:38:17 -0700 From: Krishna chaitanya chundru Date: Wed, 26 Jun 2024 18:07:53 +0530 Subject: [PATCH RFC 5/7] pci: dwc: Add support for new pci function op Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240626-qps615-v1-5-2ade7bd91e02@quicinc.com> References: <20240626-qps615-v1-0-2ade7bd91e02@quicinc.com> In-Reply-To: <20240626-qps615-v1-0-2ade7bd91e02@quicinc.com> To: Bartosz Golaszewski , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Jingoo Han CC: , , , , , , , Krishna chaitanya chundru X-Mailer: b4 0.13-dev-83828 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719405471; l=1387; i=quic_krichai@quicinc.com; s=20230907; h=from:subject:message-id; bh=s6rG0mWtGa+FPAtP4/Igwrj1RCMVNRU6WP+WJb8pOA8=; b=7yxAHq5Pc5GMEyoPNM0ywyxXiqVNMFEF5Bw0+guQibBYurzOy13ErUNEZBgCNm3zcFOJUHAs2 +tIiOeh7eFDCHpp29zb74GVz2tHiKHndgCc3CK951yBZa53WlYVOUgl 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-ORIG-GUID: nz8xKRWWlP8dbfn9I7PoKQ4jwmnhirmf X-Proofpoint-GUID: nz8xKRWWlP8dbfn9I7PoKQ4jwmnhirmf X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-26_07,2024-06-25_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 spamscore=0 malwarescore=0 mlxlogscore=869 mlxscore=0 adultscore=0 impostorscore=0 lowpriorityscore=0 phishscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2406140001 definitions=main-2406260094 Add the support for stop_link & start_link function op. Signed-off-by: Krishna chaitanya chundru --- drivers/pci/controller/dwc/pcie-designware-host.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index d15a5c2d5b48..edf624768145 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -646,10 +646,29 @@ void __iomem *dw_pcie_own_conf_map_bus(struct pci_bus *bus, unsigned int devfn, } EXPORT_SYMBOL_GPL(dw_pcie_own_conf_map_bus); +static int dw_pcie_host_start_link(struct pci_bus *bus) +{ + struct dw_pcie_rp *pp = bus->sysdata; + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); + + return dw_pcie_start_link(pci); +} + +static int dw_pcie_host_stop_link(struct pci_bus *bus) +{ + struct dw_pcie_rp *pp = bus->sysdata; + struct dw_pcie *pci = to_dw_pcie_from_pp(pp); + + dw_pcie_stop_link(pci); + return 0; +} + static struct pci_ops dw_pcie_ops = { .map_bus = dw_pcie_own_conf_map_bus, .read = pci_generic_config_read, .write = pci_generic_config_write, + .start_link = dw_pcie_host_start_link, + .stop_link = dw_pcie_host_stop_link, }; static int dw_pcie_iatu_setup(struct dw_pcie_rp *pp)