mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
tegra: hwpm: next4: Add next4 chip support
Add HWPM driver support for Next4 chip. Jira MSST-821 Signed-off-by: vasukis <vasukis@nvidia.com> Change-Id: Idc9c99653fa814a24fcab22735ae258f6f1a3f1c Reviewed-on: https://git-master.nvidia.com/r/c/linux-hwpm/+/3250030 GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: Besar Wicaksono <bwicaksono@nvidia.com> Reviewed-by: Seema Khowala <seemaj@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
f4b7bb9ead
commit
cda058bccc
@@ -37,6 +37,10 @@
|
|||||||
#include <tegra_hwpm_next1_init.h>
|
#include <tegra_hwpm_next1_init.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_TEGRA_NEXT4_HWPM
|
||||||
|
#include <tegra_hwpm_next4_init.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static int tegra_hwpm_init_chip_ip_structures(struct tegra_soc_hwpm *hwpm,
|
static int tegra_hwpm_init_chip_ip_structures(struct tegra_soc_hwpm *hwpm,
|
||||||
u32 chip_id, u32 chip_id_rev)
|
u32 chip_id, u32 chip_id_rev)
|
||||||
{
|
{
|
||||||
@@ -86,6 +90,20 @@ static int tegra_hwpm_init_chip_ip_structures(struct tegra_soc_hwpm *hwpm,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_TEGRA_NEXT4_HWPM
|
||||||
|
case 0x41:
|
||||||
|
switch (chip_id_rev) {
|
||||||
|
case 0x0:
|
||||||
|
err = tegra_hwpm_next4_init_chip_ip_structures(
|
||||||
|
hwpm, chip_id, chip_id_rev);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
tegra_hwpm_err(hwpm, "Chip 0x%x rev 0x%x not supported",
|
||||||
|
chip_id, chip_id_rev);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
tegra_hwpm_err(hwpm, "Chip 0x%x not supported", chip_id);
|
tegra_hwpm_err(hwpm, "Chip 0x%x not supported", chip_id);
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ static const struct of_device_id tegra_soc_hwpm_of_match[] = {
|
|||||||
},
|
},
|
||||||
#ifdef CONFIG_TEGRA_NEXT1_HWPM
|
#ifdef CONFIG_TEGRA_NEXT1_HWPM
|
||||||
#include <os/linux/next1_driver.h>
|
#include <os/linux/next1_driver.h>
|
||||||
|
#endif
|
||||||
|
#ifdef CONFIG_TEGRA_NEXT4_HWPM
|
||||||
|
#include <os/linux/next4_driver.h>
|
||||||
#endif
|
#endif
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -31,6 +31,9 @@
|
|||||||
#if defined(CONFIG_TEGRA_NEXT1_HWPM)
|
#if defined(CONFIG_TEGRA_NEXT1_HWPM)
|
||||||
#include <os/linux/next1_soc_utils.h>
|
#include <os/linux/next1_soc_utils.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(CONFIG_TEGRA_NEXT4_HWPM)
|
||||||
|
#include <os/linux/next4_soc_utils.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct hwpm_soc_chip_info chip_info = {
|
static struct hwpm_soc_chip_info chip_info = {
|
||||||
.chip_id = CHIP_ID_UNKNOWN,
|
.chip_id = CHIP_ID_UNKNOWN,
|
||||||
@@ -113,6 +116,12 @@ int tegra_hwpm_init_chip_info(struct tegra_hwpm_os_linux *hwpm_linux)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_TEGRA_NEXT4_HWPM)
|
||||||
|
if (tegra_hwpm_next4_get_chip_compatible(&chip_info) == 0) {
|
||||||
|
goto complete;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
complete:
|
complete:
|
||||||
chip_info_initialized = true;
|
chip_info_initialized = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user