tegra: hwpm: add support for next2 chip

- add next2 init chip info logic
- add next2 device id
- Update logic of chip info functions to support next2 chip. Modify the
functions to use formal "if defined()" macro instead of "ifdef".
- Execute support-soc-tools property only on silicon platform
- Separate OOT module_init symbol from postcore_init call on previos
kernel.

Jira THWPM-64

Change-Id: I408c99ff84507a685db6195cb71364d939931d53
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2757457
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2022-08-15 22:21:25 -07:00
committed by mobile promotions
parent 170c9552c8
commit 5e116ff176
6 changed files with 79 additions and 23 deletions

View File

@@ -20,9 +20,13 @@
#include <tegra_hwpm.h>
#include <hal/t234/t234_init.h>
#ifdef CONFIG_TEGRA_NEXT1_HWPM
#include <tegra_hwpm_next1_init.h>
#endif
#ifdef CONFIG_TEGRA_NEXT2_HWPM
#include <tegra_hwpm_next2_init.h>
#endif
static int tegra_hwpm_init_chip_ip_structures(struct tegra_soc_hwpm *hwpm,
@@ -50,7 +54,12 @@ static int tegra_hwpm_init_chip_ip_structures(struct tegra_soc_hwpm *hwpm,
}
break;
default:
#ifdef CONFIG_TEGRA_NEXT2_HWPM
err = tegra_hwpm_next2_init_chip_info(
hwpm, chip_id, chip_id_rev);
#else
tegra_hwpm_err(hwpm, "Chip 0x%x not supported", chip_id);
#endif
break;
}