mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
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>
63 lines
1.2 KiB
C
63 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2022-2023, NVIDIA CORPORATION. All rights reserved.
|
|
*/
|
|
|
|
#include <linux/version.h>
|
|
#include <linux/sys_soc.h>
|
|
#include <soc/tegra/fuse.h>
|
|
|
|
#define FUSE_SKU_INFO 0x10
|
|
|
|
static inline u32 tegra_get_sku_id(void)
|
|
{
|
|
if (!tegra_sku_info.sku_id)
|
|
tegra_fuse_readl(FUSE_SKU_INFO, &tegra_sku_info.sku_id);
|
|
|
|
return tegra_sku_info.sku_id;
|
|
}
|
|
|
|
static inline bool tegra_platform_is_silicon(void)
|
|
{
|
|
const struct soc_device_attribute tegra_soc_attrs[] = {
|
|
{ .revision = "Silicon*" },
|
|
{/* sentinel */}
|
|
};
|
|
|
|
if (soc_device_match(tegra_soc_attrs))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
static inline bool tegra_platform_is_sim(void)
|
|
{
|
|
return !tegra_platform_is_silicon();
|
|
}
|
|
|
|
static inline bool tegra_platform_is_fpga(void)
|
|
{
|
|
const struct soc_device_attribute tegra_soc_attrs[] = {
|
|
{ .revision = "*FPGA" },
|
|
{/* sentinel */}
|
|
};
|
|
|
|
if (soc_device_match(tegra_soc_attrs))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
|
|
static inline bool tegra_platform_is_vdk(void)
|
|
{
|
|
const struct soc_device_attribute tegra_soc_attrs[] = {
|
|
{ .revision = "VDK" },
|
|
{/* sentinel */}
|
|
};
|
|
|
|
if (soc_device_match(tegra_soc_attrs))
|
|
return true;
|
|
|
|
return false;
|
|
}
|