mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
host1x: do not use CONFIG_TEGRA_SOC_HWPM
OOT kerel builds do not use Kconfig files to define required config flags. Thus, CONFIG_TEGRA_SOC_HWPM is not defined for OOT configs. Remove use of CONFIG_TEGRA_SOC_HWPM flag from PVA, DLA and FLCN drivers. For OOT builds, HWPM driver is always compiled independent of CONFIG_TEGRA_SOC_HWPM flag. For safety builds where HWPM functionality is not allowed, mock HWPM functions will be used. Bug 4061775 Change-Id: I49d8df6d3293e9bde9e233561363872fc41742f4 Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2920819 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Adeel Raza <araza@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d20bc7c188
commit
3ee67f0ee5
@@ -20,9 +20,7 @@
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <soc/tegra/fuse-helper.h>
|
||||
#include <uapi/linux/nvhost_nvdla_ioctl.h>
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
#include <uapi/linux/tegra-soc-hwpm-uapi.h>
|
||||
#endif
|
||||
|
||||
#if (IS_ENABLED(CONFIG_TEGRA_HSIERRRPTINJ))
|
||||
#include <linux/tegra-hsierrrptinj.h>
|
||||
@@ -760,7 +758,6 @@ static int nvdla_alloc_window_size_memory(struct platform_device *pdev)
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
static int nvdla_hwpm_ip_pm(void *ip_dev, bool disable)
|
||||
{
|
||||
int err = 0;
|
||||
@@ -798,7 +795,6 @@ static int nvdla_hwpm_ip_reg_op(void *ip_dev,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static uint32_t nvdla_read_soft_sku_scratch_register(void)
|
||||
{
|
||||
@@ -982,9 +978,7 @@ static int nvdla_probe(struct platform_device *pdev)
|
||||
struct nvdla_device *nvdla_dev = NULL;
|
||||
struct device *dev = &pdev->dev;
|
||||
uint32_t soft_fuse_ret = 0U;
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
struct tegra_soc_hwpm_ip_ops hwpm_ip_ops;
|
||||
#endif
|
||||
|
||||
#if !IS_ENABLED(CONFIG_TEGRA_GRHOST)
|
||||
struct kobj_attribute *attr = NULL;
|
||||
@@ -1128,7 +1122,6 @@ static int nvdla_probe(struct platform_device *pdev)
|
||||
if (err)
|
||||
goto err_alloc_window_size_mem;
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
nvdla_dbg_info(pdev, "hwpm ip %s register", pdev->name);
|
||||
hwpm_ip_ops.ip_dev = (void *)pdev;
|
||||
hwpm_ip_ops.ip_base_address = pdev->resource[0].start;
|
||||
@@ -1136,7 +1129,6 @@ static int nvdla_probe(struct platform_device *pdev)
|
||||
hwpm_ip_ops.hwpm_ip_pm = &nvdla_hwpm_ip_pm;
|
||||
hwpm_ip_ops.hwpm_ip_reg_op = &nvdla_hwpm_ip_reg_op;
|
||||
tegra_soc_hwpm_ip_register(&hwpm_ip_ops);
|
||||
#endif
|
||||
|
||||
#if (IS_ENABLED(CONFIG_TEGRA_HSIERRRPTINJ))
|
||||
err = nvdla_error_inj_handler_init(nvdla_dev);
|
||||
@@ -1195,9 +1187,7 @@ err_clk_cap_fail:
|
||||
#endif
|
||||
#if (IS_ENABLED(CONFIG_TEGRA_HSIERRRPTINJ))
|
||||
err_inj_handler_init:
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
tegra_soc_hwpm_ip_unregister(&hwpm_ip_ops);
|
||||
#endif /* CONFIG_TEGRA_SOC_HWPM */
|
||||
nvdla_free_window_size_memory(pdev);
|
||||
#endif /* CONFIG_TEGRA_HSIERRRPTINJ */
|
||||
err_alloc_window_size_mem:
|
||||
@@ -1227,6 +1217,7 @@ static int __exit nvdla_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct nvhost_device_data *pdata = platform_get_drvdata(pdev);
|
||||
struct nvdla_device *nvdla_dev = pdata->private_data;
|
||||
struct tegra_soc_hwpm_ip_ops hwpm_ip_ops;
|
||||
|
||||
#if !IS_ENABLED(CONFIG_TEGRA_GRHOST)
|
||||
int i;
|
||||
@@ -1242,8 +1233,6 @@ static int __exit nvdla_remove(struct platform_device *pdev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
struct tegra_soc_hwpm_ip_ops hwpm_ip_ops;
|
||||
nvdla_dbg_info(pdev, "hwpm ip %s unregister", pdev->name);
|
||||
hwpm_ip_ops.ip_dev = (void *)pdev;
|
||||
hwpm_ip_ops.ip_base_address = pdev->resource[0].start;
|
||||
@@ -1251,7 +1240,6 @@ static int __exit nvdla_remove(struct platform_device *pdev)
|
||||
hwpm_ip_ops.hwpm_ip_pm = NULL;
|
||||
hwpm_ip_ops.hwpm_ip_reg_op = NULL;
|
||||
tegra_soc_hwpm_ip_unregister(&hwpm_ip_ops);
|
||||
#endif
|
||||
|
||||
#if (IS_ENABLED(CONFIG_TEGRA_HSIERRRPTINJ))
|
||||
nvdla_error_inj_handler_deinit(nvdla_dev);
|
||||
|
||||
@@ -925,7 +925,6 @@ int pva_prepare_poweroff(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
int pva_hwpm_ip_pm(void *ip_dev, bool disable)
|
||||
{
|
||||
int err = 0;
|
||||
@@ -970,7 +969,6 @@ int pva_hwpm_ip_reg_op(void *ip_dev, enum tegra_soc_hwpm_ip_reg_op reg_op,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !IS_ENABLED(CONFIG_TEGRA_GRHOST)
|
||||
static ssize_t clk_cap_store(struct kobject *kobj,
|
||||
@@ -1042,10 +1040,7 @@ static int pva_probe(struct platform_device *pdev)
|
||||
struct pva *pva;
|
||||
int err = 0;
|
||||
size_t i;
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
u32 offset;
|
||||
#endif
|
||||
|
||||
#if !IS_ENABLED(CONFIG_TEGRA_GRHOST)
|
||||
struct kobj_attribute *attr = NULL;
|
||||
@@ -1270,7 +1265,6 @@ static int pva_probe(struct platform_device *pdev)
|
||||
|
||||
++(pva->sid_count);
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
offset = hwpm_get_offset();
|
||||
|
||||
if ((UINT_MAX - offset) < pdev->resource[0].start) {
|
||||
@@ -1285,7 +1279,6 @@ static int pva_probe(struct platform_device *pdev)
|
||||
pva->hwpm_ip_ops.hwpm_ip_pm = &pva_hwpm_ip_pm;
|
||||
pva->hwpm_ip_ops.hwpm_ip_reg_op = &pva_hwpm_ip_reg_op;
|
||||
tegra_soc_hwpm_ip_register(&pva->hwpm_ip_ops);
|
||||
#endif
|
||||
|
||||
#if !IS_ENABLED(CONFIG_TEGRA_GRHOST)
|
||||
if (pdata->num_clks > 0) {
|
||||
@@ -1377,9 +1370,7 @@ static int __exit pva_remove(struct platform_device *pdev)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
tegra_soc_hwpm_ip_unregister(&pva->hwpm_ip_ops);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
pva_debugfs_deinit(pva);
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
#include "pva_vpu_app_auth.h"
|
||||
#include "pva_fw_carveout.h"
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
#include <uapi/linux/tegra-soc-hwpm-uapi.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* PVA Host1x class IDs
|
||||
@@ -441,9 +439,7 @@ struct pva {
|
||||
|
||||
struct pva_vpu_dbg_block vpu_dbg_blocks[NUM_VPU_BLOCKS];
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
struct tegra_soc_hwpm_ip_ops hwpm_ip_ops;
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,8 +38,6 @@ int pva_finalize_poweron(struct platform_device *pdev);
|
||||
*/
|
||||
int pva_prepare_poweroff(struct platform_device *pdev);
|
||||
|
||||
#ifdef CONFIG_TEGRA_SOC_HWPM
|
||||
|
||||
enum tegra_soc_hwpm_ip_reg_op;
|
||||
|
||||
/**
|
||||
@@ -78,4 +76,3 @@ int pva_hwpm_ip_reg_op(void *ip_dev,
|
||||
u32 inst_element_index, u64 reg_offset,
|
||||
u32 *reg_data);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user