mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
video: tegra: Migrate to fuse helpers
The fuse function tegra_get_sku_id() does not exist in upstream and so when building downstream drivers against an upstream kernel, the build fails. The tegra_get_sku_id() calls the function tegra_fuse_readl() which is supported in upstream and exported so can be used by external kernel modules. The implementation of the tegra_get_sku_id() has been moved to the header file 'fuse-helpers.h' that can be used by drivers and allow drivers to be built as external modules. Therefore, migrate drivers to use this implementation so we can move the implementation from the downstream kernel. Bug 2444929 Change-Id: I5a71044a11b63becc726784b9afb31c6384cb651 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2653442 Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894845 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
6f721a9441
commit
56d80b9a47
@@ -5,10 +5,18 @@
|
||||
|
||||
#include <soc/tegra/fuse.h>
|
||||
|
||||
#ifdef CONFIG_TEGRA_FUSE_UPSTREAM
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TEGRA_FUSE_UPSTREAM
|
||||
|
||||
/*
|
||||
* For upstream the following functions to determine if the
|
||||
* platform is silicon and simulator are not supported and
|
||||
@@ -24,12 +32,4 @@ static inline bool tegra_platform_is_sim(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_TEGRA_FUSE_UPSTREAM */
|
||||
|
||||
Reference in New Issue
Block a user