tegra: hwpm: move regops functions to os folder

Regops functions refer to linux uapi structures. As an effort to make
HWPM driver OS agnostic, move regops functions to os linux folder.

Jira THWPM-59

Change-Id: Ia06c4da5c91a59b088678daaaf6063d70af99177
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2738155
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:
Vedashree Vidwans
2022-06-29 21:29:26 -07:00
committed by mobile promotions
parent 221e73d921
commit c893ae2cd9
5 changed files with 26 additions and 5 deletions

View File

@@ -16,11 +16,11 @@ obj-y += os/linux/ioctl.o
obj-y += os/linux/kmem.o obj-y += os/linux/kmem.o
obj-y += os/linux/log.o obj-y += os/linux/log.o
obj-y += os/linux/mem_mgmt_utils.o obj-y += os/linux/mem_mgmt_utils.o
obj-y += os/linux/regops_utils.o
obj-y += common/allowlist.o obj-y += common/allowlist.o
obj-y += common/aperture.o obj-y += common/aperture.o
obj-y += common/ip.o obj-y += common/ip.o
obj-y += common/regops.o
obj-y += common/resource.o obj-y += common/resource.o
obj-y += common/init.o obj-y += common/init.o

View File

@@ -65,8 +65,6 @@ int tegra_hwpm_ip_handle_power_mgmt(struct tegra_soc_hwpm *hwpm,
int tegra_hwpm_get_allowlist_size(struct tegra_soc_hwpm *hwpm); int tegra_hwpm_get_allowlist_size(struct tegra_soc_hwpm *hwpm);
int tegra_hwpm_combine_alist(struct tegra_soc_hwpm *hwpm, u64 *alist); int tegra_hwpm_combine_alist(struct tegra_soc_hwpm *hwpm, u64 *alist);
int tegra_hwpm_exec_regops(struct tegra_soc_hwpm *hwpm,
struct tegra_soc_hwpm_exec_reg_ops *exec_reg_ops);
int tegra_hwpm_setup_hw(struct tegra_soc_hwpm *hwpm); int tegra_hwpm_setup_hw(struct tegra_soc_hwpm *hwpm);
int tegra_hwpm_setup_sw(struct tegra_soc_hwpm *hwpm); int tegra_hwpm_setup_sw(struct tegra_soc_hwpm *hwpm);

View File

@@ -30,6 +30,7 @@
#include <tegra_hwpm.h> #include <tegra_hwpm.h>
#include <tegra_hwpm_common.h> #include <tegra_hwpm_common.h>
#include <os/linux/mem_mgmt_utils.h> #include <os/linux/mem_mgmt_utils.h>
#include <os/linux/regops_utils.h>
#define LA_CLK_RATE 625000000UL #define LA_CLK_RATE 625000000UL

View File

@@ -11,8 +11,6 @@
* more details. * more details.
*/ */
#include <soc/tegra/fuse.h>
#include <uapi/linux/tegra-soc-hwpm-uapi.h> #include <uapi/linux/tegra-soc-hwpm-uapi.h>
#include <tegra_hwpm.h> #include <tegra_hwpm.h>
@@ -20,6 +18,7 @@
#include <tegra_hwpm_log.h> #include <tegra_hwpm_log.h>
#include <tegra_hwpm_common.h> #include <tegra_hwpm_common.h>
#include <tegra_hwpm_static_analysis.h> #include <tegra_hwpm_static_analysis.h>
#include <os/linux/regops_utils.h>
static int tegra_hwpm_exec_reg_ops(struct tegra_soc_hwpm *hwpm, static int tegra_hwpm_exec_reg_ops(struct tegra_soc_hwpm *hwpm,
struct tegra_soc_hwpm_reg_op *reg_op) struct tegra_soc_hwpm_reg_op *reg_op)

23
os/linux/regops_utils.h Normal file
View File

@@ -0,0 +1,23 @@
/*
* Copyright (c) 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef TEGRA_HWPM_OS_LINUX_REGOPS_UTILS_H
#define TEGRA_HWPM_OS_LINUX_REGOPS_UTILS_H
struct tegra_soc_hwpm;
struct tegra_soc_hwpm_exec_reg_ops;
int tegra_hwpm_exec_regops(struct tegra_soc_hwpm *hwpm,
struct tegra_soc_hwpm_exec_reg_ops *exec_reg_ops);
#endif /* TEGRA_HWPM_OS_LINUX_REGOPS_UTILS_H */