tegra: hwpm: nvhwpm support on PROD builds

- CONFIG_TEGRA_LINUX_PROD is used to indicate if the build belongs
to that of Prod or Prod_Debug. Use the Config to compile mock
hwpm driver in case of Prod builds. The reason being, IPs like
PVA and NVDLA are dependent on tegra_soc_hwpm_ip_register and
tegra_soc_hwpm_ip_unregister Symbols during boot.

- The packaging files only look for the nvhwpm drivers on
all build flavor. Hence, keep the same name HWPM driver
regardless of how it is build, fully supported or mock.

Bug 4206386

Change-Id: Ic554a7e7a22d55adb802636fd669c7d1fcb82830
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit e2f7b1a75312cfe486d9b256aefa263c151ccb68)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2948941
Tested-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Vasuki Shankar <vasukis@nvidia.com>
Reviewed-by: Vedashree Vidwans <vvidwans@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Laxman Dewangan
2023-08-04 11:19:41 +00:00
committed by mobile promotions
parent 4a4774bc0a
commit 808f5666a0

View File

@@ -37,12 +37,13 @@ ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm
endif endif
ifeq ($(NV_BUILD_CONFIGURATION_IS_SAFETY),1) ifeq ($(or $(NV_BUILD_CONFIGURATION_IS_SAFETY),$(CONFIG_TEGRA_LINUX_PROD)),1)
obj-${NVHWPM_OBJ} += tegra_hwpm_mock.o nvhwpm-y := tegra_hwpm_mock.o
else else
# Add required objects to nvhwpm object variable # Add required objects to nvhwpm object variable
include $(srctree.hwpm)/drivers/tegra/hwpm/Makefile.sources include $(srctree.hwpm)/drivers/tegra/hwpm/Makefile.sources
obj-${NVHWPM_OBJ} += nvhwpm.o
endif endif
obj-${NVHWPM_OBJ} += nvhwpm.o