mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-24 02:07:34 +03:00
tegra: hwpm: th500: Merge hwpm-th500 files in hwpm
This patch carefully merges approved TH500 files from kernel/hwpm-next into this public repo. Bug 4266701 Signed-off-by: Vishal Aslot <vaslot@nvidia.com> Change-Id: Ia869b75e1652c214e32c53f0edb3d4bf709d72f4 Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/2972033 Reviewed-by: Vasuki Shankar <vasukis@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
54ce334474
commit
c630042921
@@ -31,9 +31,6 @@
|
||||
#if defined(CONFIG_TEGRA_NEXT1_HWPM)
|
||||
#include <os/linux/next1_soc_utils.h>
|
||||
#endif
|
||||
#if defined(CONFIG_TEGRA_NEXT2_HWPM)
|
||||
#include <os/linux/next2_soc_utils.h>
|
||||
#endif
|
||||
#if defined(CONFIG_TEGRA_NEXT3_HWPM)
|
||||
#include <os/linux/next3_soc_utils.h>
|
||||
#endif
|
||||
@@ -51,11 +48,19 @@ static const struct hwpm_soc_chip_info t234_soc_chip_info = {
|
||||
.platform = PLAT_SI,
|
||||
};
|
||||
|
||||
#if !defined(CONFIG_ACPI)
|
||||
const struct hwpm_soc_chip_info th500_chip_info = {
|
||||
.chip_id = 0x50,
|
||||
.chip_id_rev = 0x0,
|
||||
.platform = PLAT_SI,
|
||||
};
|
||||
#endif
|
||||
|
||||
/* This function should be invoked only once before retrieving soc chip info */
|
||||
int tegra_hwpm_init_chip_info(struct tegra_hwpm_os_linux *hwpm_linux)
|
||||
{
|
||||
struct device *dev = hwpm_linux->dev;
|
||||
#if defined(CONFIG_ACPI)
|
||||
struct device *dev = hwpm_linux->dev;
|
||||
const struct acpi_device_id *id;
|
||||
#endif
|
||||
|
||||
@@ -82,13 +87,17 @@ int tegra_hwpm_init_chip_info(struct tegra_hwpm_os_linux *hwpm_linux)
|
||||
|
||||
goto complete;
|
||||
}
|
||||
#if defined(CONFIG_TEGRA_NEXT1_HWPM)
|
||||
if (tegra_hwpm_next1_get_chip_compatible(&chip_info) == 0) {
|
||||
#if !defined(CONFIG_ACPI)
|
||||
if (of_machine_is_compatible("nvidia,tegra500")) {
|
||||
chip_info.chip_id = th500_chip_info.chip_id;
|
||||
chip_info.chip_id_rev = th500_chip_info.chip_id_rev;
|
||||
chip_info.platform = th500_chip_info.platform;
|
||||
|
||||
goto complete;
|
||||
}
|
||||
#endif
|
||||
#if defined(CONFIG_TEGRA_NEXT2_HWPM)
|
||||
if (tegra_hwpm_next2_get_chip_compatible(&chip_info) == 0) {
|
||||
#endif /* CONFIG_ACPI */
|
||||
#if defined(CONFIG_TEGRA_NEXT1_HWPM)
|
||||
if (tegra_hwpm_next1_get_chip_compatible(&chip_info) == 0) {
|
||||
goto complete;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user