mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-25 10:43:14 +03:00
tegra: hwpm: set IP config as per fuse setting
Performance monitoring of IPs is dependent on the build config. Read SOC fuses and set IP override_enable accordingly. Jira THWPM-41 Change-Id: Id289a3e6763d3f3a7852e098b8a12be2eeec8e62 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2677058 Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Vasuki Shankar <vasukis@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
146211284c
commit
5518c6ea4c
@@ -23,6 +23,24 @@
|
||||
#include <tegra_hwpm_log.h>
|
||||
#include <tegra_hwpm_static_analysis.h>
|
||||
|
||||
int tegra_hwpm_read_sticky_bits(struct tegra_soc_hwpm *hwpm,
|
||||
u64 reg_base, u64 reg_offset, u32 *val)
|
||||
{
|
||||
void __iomem *ptr = NULL;
|
||||
u64 reg_addr = tegra_hwpm_safe_add_u64(reg_base, reg_offset);
|
||||
|
||||
ptr = ioremap(reg_addr, 0x4);
|
||||
if (!ptr) {
|
||||
tegra_hwpm_err(hwpm, "Failed to map register(0x%llx)",
|
||||
reg_addr);
|
||||
return -ENODEV;
|
||||
}
|
||||
*val = __raw_readl(ptr);
|
||||
iounmap(ptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fake_readl(struct tegra_soc_hwpm *hwpm,
|
||||
struct hwpm_ip_aperture *aperture, u64 offset, u32 *val)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user