diff --git a/Makefile b/Makefile index 90cd2cf..078f93f 100644 --- a/Makefile +++ b/Makefile @@ -16,11 +16,11 @@ obj-y += os/linux/ioctl.o obj-y += os/linux/kmem.o obj-y += os/linux/log.o obj-y += os/linux/mem_mgmt_utils.o +obj-y += os/linux/regops_utils.o obj-y += common/allowlist.o obj-y += common/aperture.o obj-y += common/ip.o -obj-y += common/regops.o obj-y += common/resource.o obj-y += common/init.o diff --git a/include/tegra_hwpm_common.h b/include/tegra_hwpm_common.h index dc36ded..c80c660 100644 --- a/include/tegra_hwpm_common.h +++ b/include/tegra_hwpm_common.h @@ -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_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_sw(struct tegra_soc_hwpm *hwpm); diff --git a/os/linux/ioctl.c b/os/linux/ioctl.c index 06c217c..eedec54 100644 --- a/os/linux/ioctl.c +++ b/os/linux/ioctl.c @@ -30,6 +30,7 @@ #include #include #include +#include #define LA_CLK_RATE 625000000UL diff --git a/common/regops.c b/os/linux/regops_utils.c similarity index 99% rename from common/regops.c rename to os/linux/regops_utils.c index 4ce975e..417f445 100644 --- a/common/regops.c +++ b/os/linux/regops_utils.c @@ -11,8 +11,6 @@ * more details. */ -#include - #include #include @@ -20,6 +18,7 @@ #include #include #include +#include static int tegra_hwpm_exec_reg_ops(struct tegra_soc_hwpm *hwpm, struct tegra_soc_hwpm_reg_op *reg_op) diff --git a/os/linux/regops_utils.h b/os/linux/regops_utils.h new file mode 100644 index 0000000..afeb658 --- /dev/null +++ b/os/linux/regops_utils.h @@ -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 */ \ No newline at end of file