nvidia-oot: tegra_bpmp: add dummy driver support

For some of the kernel tegra_bpmp is part of core kernel and
hence it is nto required to use the OOT tegra_bpmp driver.

However, some packaging still expect the tegra_bpmp.ko from
the OOT path. To trick the packaging file, add dummy tegra_bpmp
driver which does not have anything other than module_init/module_exit.

Bug 4551265

Change-Id: Ifae52acb63be009029c820b0ba7b15da6ea7a12e
Signed-off-by: Manish Bhardwaj <mbhardwaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3198304
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Manish Bhardwaj
2024-09-22 19:57:35 +00:00
committed by Jon Hunter
parent 150beca335
commit 1c3c34f33f
3 changed files with 28 additions and 0 deletions

View File

@@ -5,3 +5,4 @@
export NV_OOT_IVC_EXT_SKIP_BUILD=y
export NV_OOT_TEGRA_HV_SKIP_BUILD=y
export NV_OOT_TEGRA_BPMP_SKIP_BUILD=y

View File

@@ -11,9 +11,15 @@ else
obj-m += ivc_ext.o
ivc_ext-objs := ivc_ext_dummy.o
endif
ifneq ($(NV_OOT_TEGRA_BPMP_SKIP_BUILD),y)
tegra_bpmp-y += ../../clk/tegra/clk-bpmp.o
tegra_bpmp-y += ../../reset/tegra/reset-bpmp.o
tegra_bpmp-y += ../../soc/tegra/powergate-bpmp.o
tegra_bpmp-$(CONFIG_DEBUG_FS) += bpmp-debugfs.o
tegra_bpmp-y += bpmp-tegra186-hv.o
obj-m += tegra_bpmp.o
else
obj-m += tegra_bpmp.o
tegra_bpmp-objs += tegra_bpmp_dummy.o
endif

View File

@@ -0,0 +1,21 @@
// SPDX-License-Identifier: GPL-2.0-only
// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <linux/module.h>
static int __init tegra_bpmp_dummy_init(void)
{
pr_info("Inserting dummy tegra_bpmp.ko module");
return 0;
}
module_init(tegra_bpmp_dummy_init);
static void __exit tegra_bpmp_dummy_exit(void)
{
pr_info("Removing dummy tegra_bpmp.ko module");
}
module_exit(tegra_bpmp_dummy_exit);
MODULE_AUTHOR("Manish Bhardwaj <mbhardwaj@nvidia.com>");
MODULE_DESCRIPTION("Tegra BPMP Dummy Driver");
MODULE_LICENSE("GPL v2");