From nobody Thu Oct 2 05:08:10 2025 Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) (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 ABF6A2F3C2F; Mon, 22 Sep 2025 07:13:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525191; cv=none; b=eg9rCJ52rBY7CRo5egc1cfiCBwqqEjdI/r5reox0hPuugIfFWHD96sy0NiE+ljK5EXYePFnULonaPUBaZV3o8DsnR55sCRK+OHFY5VSx+PfiJ2WbTswsfHBy/EyMBbGe9hKU7t1ZO0bIluW99YF37wqiadJdCuCyT521PokL5Ko= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525191; c=relaxed/simple; bh=tgsnuTZQ+p+3FVYHZX88VPoMm3M4J2mOfqOv+mONVQo=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fzCDTWxNi4aRPKfdB1RPt+wkDkRZGyUyk48Er0q/lOEkDie7lgrNNlhSOnJC2+U6susqsGjsWU91cNfGSDTC3rpfrkEO1CUrrdBoe6qJPm5NMN3jTqlyX1i4U0VUdMII4EiwfSIVXWAnzoxpIX/qf27ZVWgQUB2dprpSV3u+ACk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=MRlNdfoG; arc=none smtp.client-ip=198.47.23.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="MRlNdfoG" Received: from lelvem-sh01.itg.ti.com ([10.180.77.71]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58M7CaSo1200440; Mon, 22 Sep 2025 02:12:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1758525156; bh=nf/R5npK7bn+6Y0fPXkVPUfGPQf+QEJ2cGcQG/nZiBI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MRlNdfoGn9HN3TwDEQANlLhDcMMghjDYljxT+VxGATiL+4Vmjh6M8vLNxtCwFx7vf eS6GSL6Tde2Ru48CYLCg7i89aufOXYmklwFZtccO+FdUaLMT8wxTMmqhMUuvjYr6TT BAwjvDO3SSuKCfp5ZIEFPtszWbJT7gk2Zcot4clo= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58M7Caff117942 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Mon, 22 Sep 2025 02:12:36 -0500 Received: from DFLE201.ent.ti.com (10.64.6.59) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Mon, 22 Sep 2025 02:12:35 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE201.ent.ti.com (10.64.6.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 22 Sep 2025 02:12:35 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.231.84]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58M7CN0S2369246; Mon, 22 Sep 2025 02:12:30 -0500 From: Siddharth Vadapalli To: , , , , , , , , , , , , , , , <18255117159@163.com>, , CC: , , , , Subject: [PATCH v3 1/4] PCI: Export pci_get_host_bridge_device() for use by pci-keystone Date: Mon, 22 Sep 2025 12:42:13 +0530 Message-ID: <20250922071222.2814937-2-s-vadapalli@ti.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250922071222.2814937-1-s-vadapalli@ti.com> References: <20250922071222.2814937-1-s-vadapalli@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" The pci-keystone.c driver uses the 'pci_get_host_bridge_device()' helper. In preparation for enabling the pci-keystone.c driver to be built as a loadable module, export 'pci_get_host_bridge_device()'. Signed-off-by: Siddharth Vadapalli --- v2 of this patch is at: https://lore.kernel.org/r/20250912122356.3326888-2-s-vadapalli@ti.com/ No changes since v2. drivers/pci/host-bridge.c | 1 + include/linux/pci.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index afa50b446567..be5ef6516cff 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -33,6 +33,7 @@ struct device *pci_get_host_bridge_device(struct pci_dev = *dev) kobject_get(&bridge->kobj); return bridge; } +EXPORT_SYMBOL_GPL(pci_get_host_bridge_device); =20 void pci_put_host_bridge_device(struct device *dev) { diff --git a/include/linux/pci.h b/include/linux/pci.h index d1fdf81fbe1e..b253cbc27d36 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -646,6 +646,7 @@ struct pci_host_bridge *pci_alloc_host_bridge(size_t pr= iv); struct pci_host_bridge *devm_pci_alloc_host_bridge(struct device *dev, size_t priv); void pci_free_host_bridge(struct pci_host_bridge *bridge); +struct device *pci_get_host_bridge_device(struct pci_dev *dev); struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); =20 void pci_set_host_bridge_release(struct pci_host_bridge *bridge, --=20 2.43.0 From nobody Thu Oct 2 05:08:10 2025 Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235]) (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 B93E82F5326; Mon, 22 Sep 2025 07:13:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525193; cv=none; b=SaFQeTaswUPhjSSW7ev4uUD8504RaDyO7jXaUrnbiHnTNpcFLfQOjW8WUraWm3BAm+4oZXUsS9mXsbP51zu5iCh7av0bAem85LsvZiUC9cIUC6Ex0xflhHp/XnHimBcc4D3pJIdO+zhd5ogg31p06eW6Vbsn4Yq6OkfYFbXqZrQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525193; c=relaxed/simple; bh=8KWHhTidiH2urEGsosGJ5Pg5i2u+LScKUBz6+Sgsu3M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KvqO2LoI4RtzqMsVUPmARo0RRjl6w6AznnY1yHRyEZZvdZLzN2EG3Q5oFH/GGgtlN1Y1iUBrqxrfTIGm4V01axbsOlOsAqNRFS0u809qfE5sTfJSaeeXxI4XFfl3oQmJUI9OmWNw/dFMcDkPtdh/xA4b35Zb7ofmDWGDPXVy0TI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=jjnmwLYu; arc=none smtp.client-ip=198.47.23.235 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="jjnmwLYu" Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58M7CgWu1200448; Mon, 22 Sep 2025 02:12:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1758525162; bh=8rj79GWsNpW2CQ2ZrT1cmfk62tg9m6ghIwphYqlalKQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jjnmwLYutk5dyJu+pFCFUwtheIr+TFK6STk9pnJbSwx080SkIWuzoVbL9dk/6CdvG hNwozCUzzP7jEXJ1DFQcCvw6/SOArywSNvMIx64QukX57bHd2CfCKtmZ8b6dTfYQnC d3iGsFOgkl9SHuZNtuEvhHwhxDcYPalKna26Zhiw= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58M7CgPT1800438 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Mon, 22 Sep 2025 02:12:42 -0500 Received: from DLEE209.ent.ti.com (157.170.170.98) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Mon, 22 Sep 2025 02:12:42 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DLEE209.ent.ti.com (157.170.170.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 22 Sep 2025 02:12:42 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.231.84]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58M7CN0T2369246; Mon, 22 Sep 2025 02:12:36 -0500 From: Siddharth Vadapalli To: , , , , , , , , , , , , , , , <18255117159@163.com>, , CC: , , , , Subject: [PATCH v3 2/4] PCI: dwc: Export dw_pcie_allocate_domains() and dw_pcie_ep_raise_msix_irq() Date: Mon, 22 Sep 2025 12:42:14 +0530 Message-ID: <20250922071222.2814937-3-s-vadapalli@ti.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250922071222.2814937-1-s-vadapalli@ti.com> References: <20250922071222.2814937-1-s-vadapalli@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" The pci-keystone.c driver uses the functions 'dw_pcie_allocate_domains()' and 'dw_pcie_ep_raise_msix_irq()'. In preparation for enabling the pci-keystone.c driver to be built as a loadable module, export them. Signed-off-by: Siddharth Vadapalli --- This patch is a combination of patches 02/10 and 04/10 of the v2 series: 02/10: https://lore.kernel.org/r/20250912122356.3326888-3-s-vadapalli@ti.co= m/ 04/10: https://lore.kernel.org/r/20250912122356.3326888-5-s-vadapalli@ti.co= m/ Except for merging the patches of the v2 series together, and updating the commit message, no other changes have been made to get to this v3 patch. drivers/pci/controller/dwc/pcie-designware-ep.c | 1 + drivers/pci/controller/dwc/pcie-designware-host.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/= controller/dwc/pcie-designware-ep.c index 7f2112c2fb21..19571ac2b961 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -797,6 +797,7 @@ int dw_pcie_ep_raise_msix_irq(struct dw_pcie_ep *ep, u8= func_no, =20 return 0; } +EXPORT_SYMBOL_GPL(dw_pcie_ep_raise_msix_irq); =20 /** * dw_pcie_ep_cleanup - Cleanup DWC EP resources after fundamental reset diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pc= i/controller/dwc/pcie-designware-host.c index 952f8594b501..3cc83d921376 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -229,6 +229,7 @@ int dw_pcie_allocate_domains(struct dw_pcie_rp *pp) =20 return 0; } +EXPORT_SYMBOL_GPL(dw_pcie_allocate_domains); =20 void dw_pcie_free_msi(struct dw_pcie_rp *pp) { --=20 2.43.0 From nobody Thu Oct 2 05:08:10 2025 Received: from fllvem-ot04.ext.ti.com (fllvem-ot04.ext.ti.com [198.47.19.246]) (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 9E4F92367B5; Mon, 22 Sep 2025 07:13:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.246 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525188; cv=none; b=it8L14NyVVDFdzlMxn8gQtjWACa1NkqBcColyVaQbLEe1B5/9YbwaGCsTB1UOk/wjzrD0gsKAxomMLLEQorq4ifcjqdt4Geu/xmfYD4xw8sI0lA68HWjHTmwe69h58wmXJPJdD8Zs9xje26eNTVHGFEbxbW87GqYIH/CTb4q/CA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525188; c=relaxed/simple; bh=uFc2miPfGpmCAPx9kuHAwYwqzPLQ8Z6Z9IujXoqNmL4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BpCG0xTAzd4WYTQCeduDQc9Ia61Dc6FwUBDFttmKWviFgErZb4TUvZzqwmh5adJ//GvSqxGEmuM37f6lcE/vEPYbzBoCjNt/zrSry9J3RpIfL8CUEbYlbPKhIPnoJn9K8lenOJppxb5XXujVZxj9fR6JCjZn6IUJbQhEx0vyzHw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=efGxgJBR; arc=none smtp.client-ip=198.47.19.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="efGxgJBR" Received: from fllvem-sh04.itg.ti.com ([10.64.41.54]) by fllvem-ot04.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58M7Cmxx1183988; Mon, 22 Sep 2025 02:12:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1758525169; bh=VV49ihaF8LjwLtRf5svh2loSSu7iyybrckUp+jaDzz0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=efGxgJBRBSJBPSG+Qi585Dxn5RzhIEU3l+rTUBOyqDYAmd4MpOrOZDng5q3AQ5SEi oTzvkG+eo3q3XIzQG+RfAKsJSlzeoAYySUFIZ4aoxViUHvp2GsZt5PyFCjD/8Xe59h WqZM31SHCD3TKKDcK9O7rc/1ksRQ8690+aSadakU= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58M7CmIZ1800486 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Mon, 22 Sep 2025 02:12:48 -0500 Received: from DLEE215.ent.ti.com (157.170.170.118) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Mon, 22 Sep 2025 02:12:48 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DLEE215.ent.ti.com (157.170.170.118) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 22 Sep 2025 02:12:48 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.231.84]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58M7CN0U2369246; Mon, 22 Sep 2025 02:12:42 -0500 From: Siddharth Vadapalli To: , , , , , , , , , , , , , , , <18255117159@163.com>, , CC: , , , , Subject: [PATCH v3 3/4] PCI: keystone: Exit ks_pcie_probe() for invalid mode Date: Mon, 22 Sep 2025 12:42:15 +0530 Message-ID: <20250922071222.2814937-4-s-vadapalli@ti.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250922071222.2814937-1-s-vadapalli@ti.com> References: <20250922071222.2814937-1-s-vadapalli@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" Commit under Fixes introduced support for PCIe EP mode on AM654x platforms. When the mode happens to be either "DW_PCIE_RC_TYPE" or "DW_PCIE_EP_TYPE", the PCIe Controller is configured accordingly. However, when the mode is neither of them, an error message is displayed but the driver probe succeeds. Since this "invalid" mode is not associated with a functional PCIe Controller, the probe should fail. Fix the behavior by exiting "ks_pcie_probe()" with the return value of "-EINVAL" in addition to displaying the existing error message when the mode is invalid. Fixes: 23284ad677a9 ("PCI: keystone: Add support for PCIe EP in AM654x Plat= forms") Signed-off-by: Siddharth Vadapalli --- v2 of this patch is at: https://lore.kernel.org/r/20250912122356.3326888-10-s-vadapalli@ti.com/ Changes since v2: - The commit subject and description has been updated to keep it concise and highlight the issue and the fix. - A "Fixes" tag has been added but 'stable' hasn't been CCed on purpose since backporting the patch isn't required - doesn't enable functionality. drivers/pci/controller/dwc/pci-keystone.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/contro= ller/dwc/pci-keystone.c index d03e95bf7d54..f9f8235ea3cd 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -1337,6 +1337,8 @@ static int ks_pcie_probe(struct platform_device *pdev) break; default: dev_err(dev, "INVALID device type %d\n", mode); + ret =3D -EINVAL; + goto err_get_sync; } =20 ks_pcie_enable_error_irq(ks_pcie); --=20 2.43.0 From nobody Thu Oct 2 05:08:10 2025 Received: from fllvem-ot04.ext.ti.com (fllvem-ot04.ext.ti.com [198.47.19.246]) (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 A20F72F2916; Mon, 22 Sep 2025 07:13:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.246 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525196; cv=none; b=dpAph+KWWenMxd16QtSEJhWxBb84joA7tWYOcx+BRKfin37FeJsxW7huQ32vOrA5SCGMEvnLPUsAjev2Qo1ir9KITTCP26lJC0K3nNiew1IQ89B2U7RsAmW+hep3zHihySIelUsmgew1zk3GPa+2ZF0fv32mqq05Owtm5OwHOiE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758525196; c=relaxed/simple; bh=8YCqD/X4C6XNr2qVICFl11I+6jGisDXmmkdkUVDT5Ek=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c+GLZkZGRJ71eAztmKvf3m2B99DFziJ5MuRRM2ncjgViG25VEUEv5/MfeofnRRx6lp/RJtNYLfR2CT5FBinzad3mOAVfQSLw6bMmBoqtVB05wB0Dpxn2aRWAVdWo7zVeEv2b4Lc2WePPkBbH7MkWVP4clwWHWokUVnPM/z6t7rk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=ODtkd9rv; arc=none smtp.client-ip=198.47.19.246 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ODtkd9rv" Received: from lelvem-sh01.itg.ti.com ([10.180.77.71]) by fllvem-ot04.ext.ti.com (8.15.2/8.15.2) with ESMTP id 58M7CtrF1183992; Mon, 22 Sep 2025 02:12:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1758525175; bh=j54wOZWYBv+WbN005PAbMoK18i+fCxKDRhnfRbi4+us=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ODtkd9rvjsNmSLZAf1hHJLQWGt8iDGDyUsmgQDF+VzVh6/eFBIgBsFplpdpj6cDzP WN8yOUfrnkMHZLZ0gYHyGPiqJqfWre+pQV/HXb6GZi/QOQ0v2pQXDsLJYImx7O+b63 x1aigCD7Ryelsnw/9wrcfsyHo9JNBnPmz/TQlKeo= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 58M7CtXs118005 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL); Mon, 22 Sep 2025 02:12:55 -0500 Received: from DFLE203.ent.ti.com (10.64.6.61) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.55; Mon, 22 Sep 2025 02:12:54 -0500 Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE203.ent.ti.com (10.64.6.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20 via Frontend Transport; Mon, 22 Sep 2025 02:12:54 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [172.24.231.84]) by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 58M7CN0V2369246; Mon, 22 Sep 2025 02:12:48 -0500 From: Siddharth Vadapalli To: , , , , , , , , , , , , , , , <18255117159@163.com>, , CC: , , , , Subject: [PATCH v3 4/4] PCI: keystone: Add support to build as a loadable module Date: Mon, 22 Sep 2025 12:42:16 +0530 Message-ID: <20250922071222.2814937-5-s-vadapalli@ti.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250922071222.2814937-1-s-vadapalli@ti.com> References: <20250922071222.2814937-1-s-vadapalli@ti.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea Content-Type: text/plain; charset="utf-8" The 'pci-keystone.c' driver is the application/glue/wrapper driver for the Designware PCIe Controllers on TI SoCs. Now that all of the helper APIs that the 'pci-keystone.c' driver depends upon have been exported for use, enable support to build the driver as a loadable module. Signed-off-by: Siddharth Vadapalli --- v2 of this patch is at: https://lore.kernel.org/r/20250912122356.3326888-11-s-vadapalli@ti.com/ Changes since v2: - Based on Mani's feedback, all code changes associated with driver removal have been discarded. drivers/pci/controller/dwc/Kconfig | 6 +++--- drivers/pci/controller/dwc/pci-keystone.c | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dw= c/Kconfig index 34abc859c107..46012d6a607e 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -482,10 +482,10 @@ config PCI_DRA7XX_EP This uses the DesignWare core. =20 config PCI_KEYSTONE - bool + tristate =20 config PCI_KEYSTONE_HOST - bool "TI Keystone PCIe controller (host mode)" + tristate "TI Keystone PCIe controller (host mode)" depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST depends on PCI_MSI select PCIE_DW_HOST @@ -497,7 +497,7 @@ config PCI_KEYSTONE_HOST DesignWare core functions to implement the driver. =20 config PCI_KEYSTONE_EP - bool "TI Keystone PCIe controller (endpoint mode)" + tristate "TI Keystone PCIe controller (endpoint mode)" depends on ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST depends on PCI_ENDPOINT select PCIE_DW_EP diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/contro= ller/dwc/pci-keystone.c index f9f8235ea3cd..2fbc714bb6e5 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1134,6 +1135,7 @@ static const struct of_device_id ks_pcie_of_match[] = =3D { }, { }, }; +MODULE_DEVICE_TABLE(of, ks_pcie_of_match); =20 static int ks_pcie_probe(struct platform_device *pdev) { @@ -1382,3 +1384,7 @@ static struct platform_driver ks_pcie_driver =3D { }, }; builtin_platform_driver(ks_pcie_driver); + +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("PCIe host controller driver for Texas Instruments Keys= tone SoCs"); +MODULE_AUTHOR("Murali Karicheri "); --=20 2.43.0