soc/tegra: fuse: Extract tegra_get_platform()
authorThierry Reding <treding@nvidia.com>
Thu, 17 Sep 2020 10:07:45 +0000 (12:07 +0200)
committerThierry Reding <treding@nvidia.com>
Fri, 18 Sep 2020 13:55:22 +0000 (15:55 +0200)
commit775edf7856d81fde852968212cd58fc9a3f8cd7d
treef84a697349d98656c767bfd5b2f469ef0a7033e5
parent9123e3a74ec7b934a4a099e98af6a61c2f80bbf5
soc/tegra: fuse: Extract tegra_get_platform()

This function extracts the PRE_SI_PLATFORM field from the HIDREV
register and can be used to determine which platform the kernel runs on
(silicon, simulation, ...). Note that while only Tegra194 and later
define this field, it should be safe to call this on prior generations
as well since this field should read as 0, indicating silicon.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/soc/tegra/fuse/fuse-tegra.c
drivers/soc/tegra/fuse/tegra-apbmisc.c
include/soc/tegra/fuse.h