mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
soc/tegra: Clean-up fuse-helper
The option CONFIG_TEGRA_FUSE_UPSTREAM is not needed any longer because we always want to enable this for Linux v5.15. Therefore, remove this option completely. The function tegra_fuse_control_read() is not used anywhere and so we can also remove this too. Bug 3777983 Change-Id: I37888bc1f615f72b245c027e5c1a9251aca08af4 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2925233 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
eab559cc9d
commit
ad2857ccaa
2
Makefile
2
Makefile
@@ -1,8 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
|
||||||
|
|
||||||
# Enable upstream fuse helper functions
|
|
||||||
ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM
|
|
||||||
LINUXINCLUDE += -I$(srctree.nvidia-oot)/include
|
LINUXINCLUDE += -I$(srctree.nvidia-oot)/include
|
||||||
|
|
||||||
obj-m += drivers/
|
obj-m += drivers/
|
||||||
|
|||||||
@@ -7,12 +7,8 @@ ifdef CONFIG_TEGRA_GRHOST
|
|||||||
ccflags-y += -DCONFIG_TEGRA_NVDLA_CHANNEL
|
ccflags-y += -DCONFIG_TEGRA_NVDLA_CHANNEL
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Enable FUSE UPSTREAM
|
|
||||||
CONFIG_TEGRA_FUSE_UPSTREAM := y
|
|
||||||
|
|
||||||
ccflags-y += -Werror
|
ccflags-y += -Werror
|
||||||
ccflags-y += -DCONFIG_TEGRA_HOST1X
|
ccflags-y += -DCONFIG_TEGRA_HOST1X
|
||||||
ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM
|
|
||||||
|
|
||||||
nvhost-nvdla-objs = \
|
nvhost-nvdla-objs = \
|
||||||
nvdla.o \
|
nvdla.o \
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
|
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
|
|
||||||
ifeq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),)
|
ifeq ($(findstring ack_src,$(NV_BUILD_KERNEL_OPTIONS)),)
|
||||||
# Enable UPSTREAM FUSE Driver always
|
|
||||||
CONFIG_TEGRA_FUSE_UPSTREAM := y
|
|
||||||
|
|
||||||
GCOV_PROFILE := y
|
GCOV_PROFILE := y
|
||||||
ccflags-y += -I$(srctree.nvidia-oot)/drivers/video/tegra/host/pva
|
ccflags-y += -I$(srctree.nvidia-oot)/drivers/video/tegra/host/pva
|
||||||
@@ -11,7 +9,6 @@ ccflags-y += -I$(srctree.nvidia-oot)/drivers/video/tegra/host/pva/fw_include
|
|||||||
ccflags-y += -Werror
|
ccflags-y += -Werror
|
||||||
|
|
||||||
ccflags-y += -DCONFIG_TEGRA_HOST1X
|
ccflags-y += -DCONFIG_TEGRA_HOST1X
|
||||||
ccflags-y += -DCONFIG_TEGRA_FUSE_UPSTREAM
|
|
||||||
ccflags-y += -DTEGRA_OOT_MODULE
|
ccflags-y += -DTEGRA_OOT_MODULE
|
||||||
|
|
||||||
nvhost-pva-objs = \
|
nvhost-pva-objs = \
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#include <soc/tegra/fuse.h>
|
#include <soc/tegra/fuse.h>
|
||||||
|
|
||||||
#define FUSE_SKU_INFO 0x10
|
#define FUSE_SKU_INFO 0x10
|
||||||
#define FUSE_BEGIN 0x100
|
|
||||||
|
|
||||||
static inline u32 tegra_get_sku_id(void)
|
static inline u32 tegra_get_sku_id(void)
|
||||||
{
|
{
|
||||||
@@ -18,8 +17,6 @@ static inline u32 tegra_get_sku_id(void)
|
|||||||
return tegra_sku_info.sku_id;
|
return tegra_sku_info.sku_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_TEGRA_FUSE_UPSTREAM
|
|
||||||
|
|
||||||
static inline bool tegra_platform_is_silicon(void)
|
static inline bool tegra_platform_is_silicon(void)
|
||||||
{
|
{
|
||||||
const struct soc_device_attribute tegra_soc_attrs[] = {
|
const struct soc_device_attribute tegra_soc_attrs[] = {
|
||||||
@@ -63,33 +60,3 @@ static inline bool tegra_platform_is_vdk(void)
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* tegra_fuse_control_read() - allows reading fuse offsets < 0x100.
|
|
||||||
* @offset: Offset to be read.
|
|
||||||
* @value: Pointer to an unsigned integer where the value is stored.
|
|
||||||
*
|
|
||||||
* Function tegra_fuse_control_read() allows reading fuse_offsets < 0x100
|
|
||||||
* by using the already upstreamed tegra_fuse_readl() function.
|
|
||||||
*
|
|
||||||
* Return: Returns a negative integer in case of error, 0 in case
|
|
||||||
* of success.
|
|
||||||
*/
|
|
||||||
static inline int tegra_fuse_control_read(unsigned long offset, u32 *value)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Allow reading offsets between 0x0 - 0xff.
|
|
||||||
* For offsets > 0xff, use tegra_fuse_readl instead.
|
|
||||||
*/
|
|
||||||
if (WARN_ON(offset > 0xff))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* This will overflow the offset value, which is safe as
|
|
||||||
* tegra_fuse_readl() would again add 0x100 to it.
|
|
||||||
*/
|
|
||||||
offset -= FUSE_BEGIN;
|
|
||||||
|
|
||||||
return tegra_fuse_readl(offset, value);
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_TEGRA_FUSE_UPSTREAM */
|
|
||||||
|
|||||||
Reference in New Issue
Block a user