From 1cf1d3f858a1055b7566f5a153c753cb124c2f97 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Mon, 10 Jun 2024 10:29:39 +0000 Subject: [PATCH] pcie: private-soc: Add dummy driver for soc specific pcie driver The L4T packaging needs the soc specific dummy driver to be available always. However, it is not available in generic build and it creates the packaging/configuration fail. Add soc specific dummy driver for pcie so that the respective binary should be available always. Bug 4695516 Change-Id: Ic40e60a12de35cebc7e9acec9b09e39aa267276b Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3154314 Tested-by: Ashish Mhetre Reviewed-by: Bitan Biswas Tested-by: Laxman Dewangan GVS: buildbot_gerritrpt Reviewed-by: Laxman Dewangan --- drivers/pci/controller/private-soc/Makefile | 6 ++++++ .../controller/private-soc/pcie-tegra-soc-dummy.c | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 drivers/pci/controller/private-soc/pcie-tegra-soc-dummy.c diff --git a/drivers/pci/controller/private-soc/Makefile b/drivers/pci/controller/private-soc/Makefile index fd817aca..0327df74 100644 --- a/drivers/pci/controller/private-soc/Makefile +++ b/drivers/pci/controller/private-soc/Makefile @@ -8,3 +8,9 @@ # file is just place-holder for empty Makefile to avoid any build # issue when copy is not done from command line and building # the tree independent of source copy. + +# Exception: Adding the dummy driver for T264. It will be override by actual +# SOC specific driver. + +obj-m += pcie-tegra264.o +pcie-tegra264-objs := pcie-tegra-soc-dummy.o diff --git a/drivers/pci/controller/private-soc/pcie-tegra-soc-dummy.c b/drivers/pci/controller/private-soc/pcie-tegra-soc-dummy.c new file mode 100644 index 00000000..c9ebe960 --- /dev/null +++ b/drivers/pci/controller/private-soc/pcie-tegra-soc-dummy.c @@ -0,0 +1,15 @@ +// SPDX-License-Identifier: GPL-2.0-only +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved. + +#include + +/* Dummy implementation for module */ +static int __init pcie_tegra_soc_dummy_init(void) +{ + return 0; +} +device_initcall(pcie_tegra_soc_dummy_init); + +MODULE_AUTHOR("Laxman Dewangan "); +MODULE_DESCRIPTION("PCIE tegra dummy driver"); +MODULE_LICENSE("GPL");