mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-24 10:13:00 +03:00
tegra: hwpm: update IP registration logic
HWPM supports various IPs which initialize at different times in boot flow. Some IPs such as MSS, NVLINK initialize before HWPM device and some IPs (VIC, OFA, NVDEC, NVDLA) are initialized after HWPM device. Modify IP register function to store registration requests in a linked list for IPs initialized before HWPM device is probed. The linked list will be traversed to complete pending IP register requests after HWPM device is initialized. - Add struct tegra_hwpm_ip_ops internal to HWPM driver to include only required ip_ops details. - Replace init_fs_info HAL with finalize_chip_info to register ip_ops, force enable IPs (if any). Jira THWPM-41 Change-Id: I916b4fa50679e79025a941a9c1fc113bdfe92b41 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2675472 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
09ca7098e4
commit
53f8d0799c
@@ -76,11 +76,11 @@ int tegra_hwpm_setup_sw(struct tegra_soc_hwpm *hwpm)
|
||||
|
||||
tegra_hwpm_fn(hwpm, " ");
|
||||
|
||||
if (hwpm->active_chip->init_fs_info == NULL) {
|
||||
tegra_hwpm_err(hwpm, "init_fs_info uninitialized");
|
||||
if (hwpm->active_chip->finalize_chip_info == NULL) {
|
||||
tegra_hwpm_err(hwpm, "finalize_chip_info uninitialized");
|
||||
goto enodev;
|
||||
}
|
||||
ret = hwpm->active_chip->init_fs_info(hwpm);
|
||||
ret = hwpm->active_chip->finalize_chip_info(hwpm);
|
||||
if (ret < 0) {
|
||||
tegra_hwpm_err(hwpm, "Unable to initialize chip fs_info");
|
||||
goto fail;
|
||||
@@ -221,6 +221,9 @@ fail:
|
||||
|
||||
void tegra_hwpm_release_sw_components(struct tegra_soc_hwpm *hwpm)
|
||||
{
|
||||
struct hwpm_ip_register_list *node = ip_register_list_head;
|
||||
struct hwpm_ip_register_list *tmp_node = NULL;
|
||||
|
||||
tegra_hwpm_fn(hwpm, " ");
|
||||
|
||||
if (hwpm->active_chip->release_sw_setup == NULL) {
|
||||
@@ -229,6 +232,12 @@ void tegra_hwpm_release_sw_components(struct tegra_soc_hwpm *hwpm)
|
||||
hwpm->active_chip->release_sw_setup(hwpm);
|
||||
}
|
||||
|
||||
while (node != NULL) {
|
||||
tmp_node = node;
|
||||
node = tmp_node->next;
|
||||
kfree(tmp_node);
|
||||
}
|
||||
|
||||
kfree(hwpm->active_chip->chip_ips);
|
||||
kfree(hwpm);
|
||||
tegra_soc_hwpm_pdev = NULL;
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_display_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_nvdisplay0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_display_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_isp_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_isp0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_isp_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_mgbe_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mgbe0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_mgbe_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mgbe1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -68,8 +64,6 @@ hwpm_ip_perfmon t234_mgbe_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mgbe2",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -89,8 +83,6 @@ hwpm_ip_perfmon t234_mgbe_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mgbe3",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -115,8 +107,6 @@ hwpm_ip_perfmux t234_mgbe_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -136,8 +126,6 @@ hwpm_ip_perfmux t234_mgbe_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -157,8 +145,6 @@ hwpm_ip_perfmux t234_mgbe_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -178,8 +164,6 @@ hwpm_ip_perfmux t234_mgbe_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_parta0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_parta1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -68,8 +64,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_parta2",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -89,8 +83,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_parta3",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -110,8 +102,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partb0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -131,8 +121,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partb1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -152,8 +140,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partb2",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -173,8 +159,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partb3",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -194,8 +178,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partc0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -215,8 +197,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partc1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -236,8 +216,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partc2",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -257,8 +235,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partc3",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -278,8 +254,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partd0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -299,8 +273,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partd1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -320,8 +292,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partd2",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -341,8 +311,6 @@ hwpm_ip_perfmon t234_mss_channel_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msschannel_partd3",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -367,8 +335,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -388,8 +354,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -408,8 +372,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -429,8 +391,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -450,8 +410,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -471,8 +429,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -492,8 +448,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -513,8 +467,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -534,8 +486,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -555,8 +505,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -576,8 +524,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -597,8 +543,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -618,8 +562,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -639,8 +581,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -660,8 +600,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -681,8 +619,6 @@ hwpm_ip_perfmux t234_mss_channel_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_mss_gpu_hub_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mssnvlhsh0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -73,8 +69,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -94,8 +88,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -115,8 +107,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -136,8 +126,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -157,8 +145,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -178,8 +164,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -199,8 +183,6 @@ hwpm_ip_perfmux t234_mss_gpu_hub_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_mss_iso_niso_hubs_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msshub0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_mss_iso_niso_hubs_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_msshub1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -73,8 +69,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -94,8 +88,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -116,8 +108,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -138,8 +128,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -160,8 +148,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -182,8 +168,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -204,8 +188,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -226,8 +208,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -248,8 +228,6 @@ hwpm_ip_perfmux t234_mss_iso_niso_hubs_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_mss_mcf_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mssmcfclient0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_mss_mcf_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mssmcfmem0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -68,8 +64,6 @@ hwpm_ip_perfmon t234_mss_mcf_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_mssmcfmem1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -94,8 +88,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -115,8 +107,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -136,8 +126,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -157,8 +145,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -178,8 +164,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -199,8 +183,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -220,8 +202,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -241,8 +221,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -262,8 +240,6 @@ hwpm_ip_perfmux t234_mss_mcf_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_nvdec_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_nvdeca0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_nvdec_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_nvdla_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_nvdlab0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_nvdla_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_nvdlab1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -73,8 +69,6 @@ hwpm_ip_perfmux t234_nvdla_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -94,8 +88,6 @@ hwpm_ip_perfmux t234_nvdla_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_nvenc_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_nvenca0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_nvenc_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_ofa_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_ofaa0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_ofa_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -68,8 +64,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie2",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -89,8 +83,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie3",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -110,8 +102,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie4",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -131,8 +121,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie5",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -152,8 +140,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie6",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -173,8 +159,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie7",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -194,8 +178,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie8",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -215,8 +197,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie9",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -236,8 +216,6 @@ hwpm_ip_perfmon t234_pcie_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pcie10",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -262,8 +240,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -283,8 +259,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -304,8 +278,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -325,8 +297,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -346,8 +316,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -367,8 +335,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -388,8 +354,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -409,8 +373,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -430,8 +392,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -451,8 +411,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -472,8 +430,6 @@ hwpm_ip_perfmux t234_pcie_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_pma_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_sys0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_pma_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "pma",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_pva_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pvav0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_pva_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pvav1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -68,8 +64,6 @@ hwpm_ip_perfmon t234_pva_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_pvac0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -94,8 +88,6 @@ hwpm_ip_perfmux t234_pva_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -32,8 +32,6 @@ hwpm_ip_perfmux t234_rtr_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "rtr",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -54,8 +52,6 @@ hwpm_ip_perfmux t234_rtr_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "pma",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_scf_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_scf",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_vi_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_vi0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -47,8 +45,6 @@ hwpm_ip_perfmon t234_vi_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_vi1",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -73,8 +69,6 @@ hwpm_ip_perfmux t234_vi_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -94,8 +88,6 @@ hwpm_ip_perfmux t234_vi_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -26,8 +26,6 @@ hwpm_ip_perfmon t234_vic_perfmon_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = "perfmon_vica0",
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
@@ -52,8 +50,6 @@ hwpm_ip_perfmux t234_vic_perfmux_static_array[
|
||||
.dt_mmio = NULL,
|
||||
.name = {'\0'},
|
||||
.ip_ops = {
|
||||
.ip_base_address = 0ULL,
|
||||
.ip_index = 0U,
|
||||
.ip_dev = NULL,
|
||||
.hwpm_ip_pm = NULL,
|
||||
.hwpm_ip_reg_op = NULL,
|
||||
|
||||
@@ -28,7 +28,7 @@ struct tegra_soc_hwpm_chip t234_chip_info = {
|
||||
.is_resource_active = t234_hwpm_is_resource_active,
|
||||
|
||||
.extract_ip_ops = t234_hwpm_extract_ip_ops,
|
||||
.init_fs_info = t234_hwpm_init_fs_info,
|
||||
.finalize_chip_info = t234_hwpm_finalize_chip_info,
|
||||
.get_fs_info = t234_hwpm_get_fs_info,
|
||||
|
||||
.init_prod_values = t234_hwpm_init_prod_values,
|
||||
|
||||
@@ -75,7 +75,7 @@ bool t234_hwpm_is_resource_active(struct tegra_soc_hwpm *hwpm,
|
||||
|
||||
int t234_hwpm_extract_ip_ops(struct tegra_soc_hwpm *hwpm,
|
||||
struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops, bool available);
|
||||
int t234_hwpm_init_fs_info(struct tegra_soc_hwpm *hwpm);
|
||||
int t234_hwpm_finalize_chip_info(struct tegra_soc_hwpm *hwpm);
|
||||
int t234_hwpm_get_fs_info(struct tegra_soc_hwpm *hwpm,
|
||||
u32 ip_index, u64 *fs_mask, u8 *ip_status);
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ static int t234_hwpm_update_ip_ops_info(struct tegra_soc_hwpm *hwpm,
|
||||
u32 perfmux_idx, max_num_perfmux = 0U;
|
||||
struct tegra_soc_hwpm_chip *active_chip = hwpm->active_chip;
|
||||
struct hwpm_ip *chip_ip = active_chip->chip_ips[ip_idx];
|
||||
struct tegra_soc_hwpm_ip_ops *ip_ops;
|
||||
struct tegra_hwpm_ip_ops *ip_ops;
|
||||
hwpm_ip_perfmux *given_perfmux = chip_ip->ip_perfmux[ip_perfmux_idx];
|
||||
hwpm_ip_perfmux *perfmux = NULL;
|
||||
|
||||
@@ -128,15 +128,10 @@ static int t234_hwpm_update_ip_ops_info(struct tegra_soc_hwpm *hwpm,
|
||||
ip_ops = &perfmux->ip_ops;
|
||||
|
||||
if (available) {
|
||||
ip_ops->ip_base_address = hwpm_ip_ops->ip_base_address;
|
||||
ip_ops->ip_index = hwpm_ip_ops->ip_index;
|
||||
ip_ops->ip_dev = hwpm_ip_ops->ip_dev;
|
||||
ip_ops->hwpm_ip_pm = hwpm_ip_ops->hwpm_ip_pm;
|
||||
ip_ops->hwpm_ip_reg_op = hwpm_ip_ops->hwpm_ip_reg_op;
|
||||
} else {
|
||||
/* Do I need a check to see if the ip_ops are set ? */
|
||||
ip_ops->ip_base_address = 0ULL;
|
||||
ip_ops->ip_index = TEGRA_SOC_HWPM_IP_INACTIVE;
|
||||
ip_ops->ip_dev = NULL;
|
||||
ip_ops->hwpm_ip_pm = NULL;
|
||||
ip_ops->hwpm_ip_reg_op = NULL;
|
||||
@@ -443,6 +438,8 @@ int t234_hwpm_set_fs_info(struct tegra_soc_hwpm *hwpm, u64 base_address,
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* TODO: Check if force enable is required */
|
||||
|
||||
ret = t234_hwpm_update_floorsweep_mask(
|
||||
hwpm, ip_idx, perfmux_idx, available);
|
||||
if (ret != 0) {
|
||||
@@ -455,13 +452,9 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some IPs don't register with HWPM driver at the moment. Force set available
|
||||
* instances of such IPs.
|
||||
*/
|
||||
int t234_hwpm_init_fs_info(struct tegra_soc_hwpm *hwpm)
|
||||
static int t234_hwpm_force_enable_ips(struct tegra_soc_hwpm *hwpm)
|
||||
{
|
||||
u32 i;
|
||||
u32 i = 0U;
|
||||
int ret = 0;
|
||||
struct tegra_soc_hwpm_chip *active_chip = hwpm->active_chip;
|
||||
struct hwpm_ip *chip_ip = NULL;
|
||||
@@ -644,6 +637,51 @@ fail:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int t234_hwpm_complete_ip_register(struct tegra_soc_hwpm *hwpm)
|
||||
{
|
||||
int ret = 0;
|
||||
struct hwpm_ip_register_list *node = ip_register_list_head;
|
||||
|
||||
tegra_hwpm_fn(hwpm, " ");
|
||||
|
||||
while (node != NULL) {
|
||||
tegra_hwpm_dbg(hwpm, hwpm_info, "IP ext idx %d info",
|
||||
node->ip_ops.ip_index);
|
||||
ret = t234_hwpm_extract_ip_ops(hwpm, &node->ip_ops, true);
|
||||
if (ret != 0) {
|
||||
tegra_hwpm_err(hwpm, "Failed to extract IP ops");
|
||||
return ret;
|
||||
}
|
||||
node = node->next;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Some IPs don't register with HWPM driver at the moment. Force set available
|
||||
* instances of such IPs.
|
||||
*/
|
||||
int t234_hwpm_finalize_chip_info(struct tegra_soc_hwpm *hwpm)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
tegra_hwpm_fn(hwpm, " ");
|
||||
|
||||
ret = t234_hwpm_complete_ip_register(hwpm);
|
||||
if (ret != 0) {
|
||||
tegra_hwpm_err(hwpm, "Failed register IPs");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = t234_hwpm_force_enable_ips(hwpm);
|
||||
if (ret != 0) {
|
||||
tegra_hwpm_err(hwpm, "Failed to force enable IPs");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int t234_hwpm_get_fs_info(struct tegra_soc_hwpm *hwpm,
|
||||
u32 ip_index, u64 *fs_mask, u8 *ip_status)
|
||||
{
|
||||
|
||||
@@ -48,6 +48,56 @@
|
||||
timeout_expired; \
|
||||
})
|
||||
|
||||
struct hwpm_ip_register_list {
|
||||
struct tegra_soc_hwpm_ip_ops ip_ops;
|
||||
struct hwpm_ip_register_list *next;
|
||||
};
|
||||
extern struct hwpm_ip_register_list *ip_register_list_head;
|
||||
|
||||
/*
|
||||
* This structure is copy of struct tegra_soc_hwpm_ip_ops uapi structure.
|
||||
* This is not a hard requirement as tegra_hwpm_validate_ip_ops conversion
|
||||
* function.
|
||||
*/
|
||||
struct tegra_hwpm_ip_ops {
|
||||
/*
|
||||
* Opaque ip device handle used for callback from
|
||||
* SOC HWPM driver to IP drivers. This handle can be used
|
||||
* to access IP driver functionality with the callbacks.
|
||||
*/
|
||||
void *ip_dev;
|
||||
/*
|
||||
* hwpm_ip_pm is callback function to disable/enable
|
||||
* IP driver power management. Before SOC HWPM doing
|
||||
* perf measuremnts, this callback is called with
|
||||
* "disable = true ", so that IP driver will disable IP specific
|
||||
* power management to keep IP driver responsive. Once SOC HWPM is
|
||||
* done with perf measurement, this callaback is called
|
||||
* with "disable = false", so that IP driver can restore back
|
||||
* it's orignal power management.
|
||||
*/
|
||||
int (*hwpm_ip_pm)(void *dev, bool disable);
|
||||
/*
|
||||
* hwpm_ip_reg_op is callback function to do IP
|
||||
* register 32 bit read or write.
|
||||
* For read:
|
||||
* input : dev - IP device handle
|
||||
* input : reg_op - TEGRA_SOC_HWPM_IP_REG_OP_READ
|
||||
* input : reg_offset - register offset
|
||||
* output: reg_data - u32 read value
|
||||
* For write:
|
||||
* input : dev - IP device handle
|
||||
* input : reg_op - TEGRA_SOC_HWPM_IP_REG_OP_WRITE
|
||||
* input : reg_offset - register offset
|
||||
* output: reg_data - u32 write value
|
||||
* Return:
|
||||
* reg_op success / failure
|
||||
*/
|
||||
int (*hwpm_ip_reg_op)(void *dev,
|
||||
enum tegra_soc_hwpm_ip_reg_op reg_op,
|
||||
__u64 reg_offset, __u32 *reg_data);
|
||||
};
|
||||
|
||||
struct hwpm_ip_aperture {
|
||||
/*
|
||||
* Indicates which domain (HWPM or IP) aperture belongs to,
|
||||
@@ -65,7 +115,7 @@ struct hwpm_ip_aperture {
|
||||
char name[64];
|
||||
|
||||
/* IP ops - only populated for perfmux */
|
||||
struct tegra_soc_hwpm_ip_ops ip_ops;
|
||||
struct tegra_hwpm_ip_ops ip_ops;
|
||||
|
||||
/* Allowlist */
|
||||
struct allowlist *alist;
|
||||
@@ -165,7 +215,7 @@ struct tegra_soc_hwpm_chip {
|
||||
|
||||
int (*extract_ip_ops)(struct tegra_soc_hwpm *hwpm,
|
||||
struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops, bool available);
|
||||
int (*init_fs_info)(struct tegra_soc_hwpm *hwpm);
|
||||
int (*finalize_chip_info)(struct tegra_soc_hwpm *hwpm);
|
||||
int (*get_fs_info)(struct tegra_soc_hwpm *hwpm,
|
||||
u32 ip_index, u64 *fs_mask, u8 *ip_status);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ static u32 ip_readl(struct tegra_soc_hwpm *hwpm,
|
||||
return fake_readl(hwpm, aperture, offset);
|
||||
} else {
|
||||
u32 reg_val = 0U;
|
||||
struct tegra_soc_hwpm_ip_ops *ip_ops_ptr = &aperture->ip_ops;
|
||||
struct tegra_hwpm_ip_ops *ip_ops_ptr = &aperture->ip_ops;
|
||||
if (ip_ops_ptr->hwpm_ip_reg_op != NULL) {
|
||||
int err = 0;
|
||||
|
||||
@@ -117,7 +117,7 @@ static void ip_writel(struct tegra_soc_hwpm *hwpm,
|
||||
if (hwpm->fake_registers_enabled) {
|
||||
fake_writel(hwpm, aperture, offset, val);
|
||||
} else {
|
||||
struct tegra_soc_hwpm_ip_ops *ip_ops_ptr = &aperture->ip_ops;
|
||||
struct tegra_hwpm_ip_ops *ip_ops_ptr = &aperture->ip_ops;
|
||||
if (ip_ops_ptr->hwpm_ip_reg_op != NULL) {
|
||||
int err = 0;
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
* more details.
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
#include <soc/tegra/fuse.h>
|
||||
#include <uapi/linux/tegra-soc-hwpm-uapi.h>
|
||||
|
||||
@@ -19,19 +20,76 @@
|
||||
#include <tegra_hwpm.h>
|
||||
|
||||
struct platform_device *tegra_soc_hwpm_pdev;
|
||||
struct hwpm_ip_register_list *ip_register_list_head;
|
||||
|
||||
#define REGISTER_IP true
|
||||
#define UNREGISTER_IP false
|
||||
|
||||
static int tegra_hwpm_alloc_ip_register_list_node(
|
||||
struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops,
|
||||
struct hwpm_ip_register_list **node_ptr)
|
||||
{
|
||||
struct hwpm_ip_register_list *new_node = NULL;
|
||||
|
||||
new_node = kzalloc(sizeof(struct hwpm_ip_register_list), GFP_KERNEL);
|
||||
if (new_node == NULL) {
|
||||
tegra_hwpm_err(NULL,
|
||||
"struct hwpm_ip_register_list node allocation failed");
|
||||
return -ENOMEM;
|
||||
}
|
||||
new_node->next = NULL;
|
||||
|
||||
/* Copy given ip register details to node */
|
||||
memcpy(&new_node->ip_ops, hwpm_ip_ops,
|
||||
sizeof(struct tegra_soc_hwpm_ip_ops));
|
||||
(*node_ptr) = new_node;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tegra_hwpm_note_ip_register(
|
||||
struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops)
|
||||
{
|
||||
int err = 0;
|
||||
struct hwpm_ip_register_list *node;
|
||||
|
||||
if (ip_register_list_head == NULL) {
|
||||
err = tegra_hwpm_alloc_ip_register_list_node(hwpm_ip_ops,
|
||||
&ip_register_list_head);
|
||||
if (err != 0) {
|
||||
tegra_hwpm_err(NULL,
|
||||
"failed to note ip registration");
|
||||
return err;
|
||||
}
|
||||
} else {
|
||||
node = ip_register_list_head;
|
||||
while (node->next != NULL) {
|
||||
node = node->next;
|
||||
}
|
||||
|
||||
err = tegra_hwpm_alloc_ip_register_list_node(hwpm_ip_ops,
|
||||
&node->next);
|
||||
if (err != 0) {
|
||||
tegra_hwpm_err(NULL,
|
||||
"failed to note ip registration");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void tegra_soc_hwpm_ip_register(struct tegra_soc_hwpm_ip_ops *hwpm_ip_ops)
|
||||
{
|
||||
struct tegra_soc_hwpm *hwpm = NULL;
|
||||
int ret = 0;
|
||||
|
||||
if (tegra_soc_hwpm_pdev == NULL) {
|
||||
tegra_hwpm_dbg(hwpm, hwpm_info,
|
||||
"IP %d trying to register. HWPM device not available",
|
||||
hwpm_ip_ops->ip_index);
|
||||
ret = tegra_hwpm_note_ip_register(hwpm_ip_ops);
|
||||
if (ret != 0) {
|
||||
tegra_hwpm_err(NULL,
|
||||
"Couldn't save IP register details");
|
||||
}
|
||||
} else {
|
||||
if (hwpm_ip_ops->ip_dev == NULL) {
|
||||
tegra_hwpm_err(hwpm, "IP dev to register is NULL");
|
||||
|
||||
Reference in New Issue
Block a user