mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
tegra: hwpm: update makefile, add debug log mask
- Modify condition to include TH500 files for correct config. Since TH500 is only supported with BaseOS and TinyLinux, the TH500 HWPM config flag will be defined as part of the BaseOS/TinyLinux builds. - Add new debug log mask for active debugs. This will allow us to enable debug messages related to active debugs reducing amount of logs. - Add condition to check ARCH_TEGRA config required for kernel specific APIs. Jira THWPM-69 Change-Id: I637bdbd2e5d72808611f63f4f719e5072f85ca34 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2978365 GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com> Reviewed-by: Vasuki Shankar <vasukis@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> Tested-by: Vasuki Shankar <vasukis@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6a90ec671c
commit
2068126fb2
@@ -1,4 +1,24 @@
|
|||||||
# Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
|
# -*- mode: makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
# DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
# Tegra SOC HWPM
|
# Tegra SOC HWPM
|
||||||
#
|
#
|
||||||
@@ -30,7 +50,11 @@ ccflags-y += -I$(srctree.hwpm)/include
|
|||||||
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm/include
|
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm/include
|
||||||
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm
|
ccflags-y += -I$(srctree.hwpm)/drivers/tegra/hwpm
|
||||||
|
|
||||||
ifeq ($(or $(NV_BUILD_CONFIGURATION_IS_SAFETY),$(CONFIG_TEGRA_LINUX_PROD)),1)
|
ifeq ($(CONFIG_TEGRA_LINUX_PROD),1)
|
||||||
|
nvhwpm-objs := tegra_hwpm_mock.o
|
||||||
|
else ifeq ($(NV_BUILD_CONFIGURATION_IS_SAFETY),1)
|
||||||
|
nvhwpm-objs := tegra_hwpm_mock.o
|
||||||
|
else ifneq ($(CONFIG_ARCH_TEGRA),y)
|
||||||
nvhwpm-objs := tegra_hwpm_mock.o
|
nvhwpm-objs := tegra_hwpm_mock.o
|
||||||
else
|
else
|
||||||
# Add required objects to nvhwpm object variable
|
# Add required objects to nvhwpm object variable
|
||||||
|
|||||||
@@ -1,4 +1,24 @@
|
|||||||
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
|
# -*- mode: makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
# copy of this software and associated documentation files (the "Software"),
|
||||||
|
# to deal in the Software without restriction, including without limitation
|
||||||
|
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||||
|
# and/or sell copies of the Software, and to permit persons to whom the
|
||||||
|
# Software is furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
# DEALINGS IN THE SOFTWARE.
|
||||||
#
|
#
|
||||||
# Tegra SOC HWPM Sources
|
# Tegra SOC HWPM Sources
|
||||||
#
|
#
|
||||||
@@ -24,9 +44,11 @@ else
|
|||||||
srctree.hwpm-next := ${NV_SOURCE}/kernel/hwpm-next
|
srctree.hwpm-next := ${NV_SOURCE}/kernel/hwpm-next
|
||||||
endif
|
endif
|
||||||
ifneq ($(origin srctree.hwpm-next), undefined)
|
ifneq ($(origin srctree.hwpm-next), undefined)
|
||||||
|
ifneq ($(wildcard ${srctree.hwpm-next}/drivers/tegra/Makefile.hwpm-next.sources),)
|
||||||
include ${srctree.hwpm-next}/drivers/tegra/Makefile.hwpm-next.sources
|
include ${srctree.hwpm-next}/drivers/tegra/Makefile.hwpm-next.sources
|
||||||
nvhwpm-objs += ${nvhwpm-next-objs}
|
nvhwpm-objs += ${nvhwpm-next-objs}
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
endif # CONFIG_TEGRA_OOT_MODULE
|
endif # CONFIG_TEGRA_OOT_MODULE
|
||||||
|
|
||||||
@@ -51,14 +73,11 @@ nvhwpm-objs += ${nvhwpm-t234-objs}
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# TH500 HWPM is only supported with BaseOS as an OOT module.
|
# TH500 HWPM is only supported with BaseOS as an OOT module.
|
||||||
ifeq ($(CONFIG_TEGRA_OOT_MODULE),m) # also check BaseOS build here
|
# Check for TH500 HWPM config flag defined in BaseOS
|
||||||
CONFIG_TEGRA_TH500_HWPM := y
|
ifeq ($(CONFIG_TEGRA_TH500_HWPM),y)
|
||||||
ccflags-y += -DCONFIG_TEGRA_TH500_HWPM
|
ccflags-y += -DCONFIG_TEGRA_TH500_HWPM
|
||||||
|
|
||||||
ifeq ($(CONFIG_TEGRA_TH500_HWPM),y)
|
|
||||||
# Include TH500 files
|
# Include TH500 files
|
||||||
include ${srctree.hwpm}/drivers/tegra/hwpm/Makefile.th500.sources
|
include ${srctree.hwpm}/drivers/tegra/hwpm/Makefile.th500.sources
|
||||||
nvhwpm-objs += ${nvhwpm-th500-objs}
|
nvhwpm-objs += ${nvhwpm-th500-objs}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
endif # CONFIG_TEGRA_OOT_MODULE
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* SPDX-License-Identifier: MIT */
|
/* SPDX-License-Identifier: MIT */
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
* SPDX-FileCopyrightText: Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
* copy of this software and associated documentation files (the "Software"),
|
* copy of this software and associated documentation files (the "Software"),
|
||||||
@@ -75,6 +75,8 @@ enum tegra_soc_hwpm_log_type {
|
|||||||
#define hwpm_dbg_driver_release BIT(16)
|
#define hwpm_dbg_driver_release BIT(16)
|
||||||
/* Kmem debug prints */
|
/* Kmem debug prints */
|
||||||
#define hwpm_dbg_kmem BIT(17)
|
#define hwpm_dbg_kmem BIT(17)
|
||||||
|
/* Active debug prints */
|
||||||
|
#define hwpm_dbg_active BIT(18)
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user