mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 01:31:30 +03:00
dla: kmd: Update fuse register read for K5.15
+ Enabled the logic to read the DLA Fuse registers directly for K5.15 + Required for setting up the correct DLA instance on fused boards like TA983 Bug 4156086 Change-Id: I23addb28c54466979fd88a1b3c65960b10f946ca Signed-off-by: Akshata Bhat <akshatab@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2929422 Reviewed-by: Maxim Grigoriev (SW-GPU) <maximg@nvidia.com> Reviewed-by: Arvind M <am@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1a471a12b5
commit
25b08cb82d
@@ -19,6 +19,7 @@
|
||||
#include <linux/nvmem-consumer.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <soc/tegra/fuse-helper.h>
|
||||
#include <soc/tegra/fuse.h>
|
||||
#include <uapi/linux/nvhost_nvdla_ioctl.h>
|
||||
#include <uapi/linux/tegra-soc-hwpm-uapi.h>
|
||||
|
||||
@@ -978,6 +979,8 @@ 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;
|
||||
int fuse_register_ret = 0U;
|
||||
uint32_t register_value = 0U;
|
||||
struct tegra_soc_hwpm_ip_ops hwpm_ip_ops;
|
||||
|
||||
#if !IS_ENABLED(CONFIG_TEGRA_GRHOST)
|
||||
@@ -1037,26 +1040,26 @@ static int nvdla_probe(struct platform_device *pdev)
|
||||
err = -ENODEV;
|
||||
goto err_no_ip;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(5, 11, 0) >= LINUX_VERSION_CODE
|
||||
} else {
|
||||
|
||||
err = nvhost_nvdla_read_chip_option_register(pdev);
|
||||
|
||||
if ((err & FUSE_OPT_DLA_0_DISABLED)
|
||||
#if KERNEL_VERSION(5, 11, 0) >= LINUX_VERSION_CODE
|
||||
fuse_register_ret = nvhost_nvdla_read_chip_option_register(pdev);
|
||||
#else
|
||||
err = tegra_fuse_readl(NVDLA_DISABLE_FUSE_REGISTER_OFFSET, ®ister_value);
|
||||
fuse_register_ret = (int)register_value;
|
||||
#endif
|
||||
if ((fuse_register_ret & FUSE_OPT_DLA_0_DISABLED)
|
||||
&& (pdata->class == NV_DLA0_CLASS_ID)) {
|
||||
dev_err(dev, "NVDLA0 IP is disabled in Fuse\n");
|
||||
err = -ENODEV;
|
||||
goto err_no_ip;
|
||||
}
|
||||
|
||||
if ((err & FUSE_OPT_DLA_1_DISABLED)
|
||||
if ((fuse_register_ret & FUSE_OPT_DLA_1_DISABLED)
|
||||
&& (pdata->class == NV_DLA1_CLASS_ID)) {
|
||||
dev_err(dev, "NVDLA1 IP is disabled in Fuse\n");
|
||||
err = -ENODEV;
|
||||
goto err_no_ip;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,13 @@
|
||||
|
||||
#endif /* CONFIG_TEGRA_HSIERRRPTINJ */
|
||||
|
||||
/* DLA FUSE REGISTER
|
||||
* Corresponds to the offset of "opt-dla-disable" - part of the
|
||||
* struct tegra_fuse_cells of type nvmem_cell_info.
|
||||
*/
|
||||
|
||||
#define NVDLA_DISABLE_FUSE_REGISTER_OFFSET 0x3f0
|
||||
|
||||
/*
|
||||
* macro to encode firmware version
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user