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>
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>
When building the CVNAS driver as an external module against upstream
Linux kernels, there are some downstream fuse APIs that are not found.
To fix building CVNAS for upstream kernels ...
1. Use the device-tree machine compatibility string instead of the
downstream fuse function tegra_get_chip_id().
2. For the functions tegra_platform_is_silicon() and
tegra_platform_is_sim() add implementations in a fuse-helper.h
that always assume that platform is silicon and not a simulator.
Note this assumption is only applied to upstream kernels and
downstream kernel still use the downstream implementation. Long
term we need to revisit this.
3. Copy the downstream implementation for function tegra_get_sku_id()
to the fuse-helper.h so that this is available for upstream kernels.
The functions implemented in fuse-helper.h are only used if the compiler
flag CONFIG_TEGRA_FUSE_UPSTREAM is defined.
Bug 3459526
Change-Id: I5bbd08ac2560c236f932606ce5ad0e73dc71205a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2650491
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2894844
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>