gpu: nvgpu: fuse and chip revision updates for k5.4

1. use fuse.h instead of chip-id.h in k5.4.
2. chip revision checks for TEGRA210_REVISION_A04p and
   TEGRA194_REVISION_A01 are replaced with chip id
   check and revision check for TEGRA_REVISION_A04p
   and TEGRA_REVISION_A01.

Bug 200591811
Bug 200602747

Change-Id: I3383b691e400265723214e81ac193fd1cc1946e3
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2338262
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Bitan Biswas
2020-05-03 04:50:43 -07:00
committed by Alex Waterman
parent 3bd0430aa8
commit 7d6645d7af
3 changed files with 19 additions and 1 deletions

View File

@@ -43,7 +43,12 @@
#include <linux/platform/tegra/tegra_emc.h> #include <linux/platform/tegra/tegra_emc.h>
#ifdef CONFIG_NVGPU_TEGRA_FUSE #ifdef CONFIG_NVGPU_TEGRA_FUSE
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
#include <soc/tegra/chip-id.h> #include <soc/tegra/chip-id.h>
#else
#include <soc/tegra/fuse.h>
#endif
#endif #endif
#include <nvgpu/kmem.h> #include <nvgpu/kmem.h>
@@ -857,7 +862,12 @@ static int gk20a_tegra_probe(struct device *dev)
} }
platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_B1; platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_B1;
#ifdef CONFIG_NVGPU_TEGRA_FUSE #ifdef CONFIG_NVGPU_TEGRA_FUSE
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
if (tegra_chip_get_revision() > TEGRA210_REVISION_A04p) if (tegra_chip_get_revision() > TEGRA210_REVISION_A04p)
#else
if (tegra_get_chip_id() == TEGRA210 &&
tegra_chip_get_revision() > TEGRA_REVISION_A04p)
#endif
platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_C1; platform->g->clk.gpc_pll.id = GM20B_GPC_PLL_C1;
#endif #endif
} }

View File

@@ -11,7 +11,10 @@
* more details. * more details.
*/ */
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
#include <soc/tegra/chip-id.h> #include <soc/tegra/chip-id.h>
#endif
#include <soc/tegra/fuse.h> #include <soc/tegra/fuse.h>
#include <soc/tegra/tegra_bpmp.h> #include <soc/tegra/tegra_bpmp.h>
#ifdef CONFIG_TEGRA_HV_MANAGER #ifdef CONFIG_TEGRA_HV_MANAGER
@@ -53,7 +56,7 @@ bool nvgpu_is_soc_t194_a01(struct gk20a *g)
struct gk20a_platform *platform = gk20a_get_platform(dev); struct gk20a_platform *platform = gk20a_get_platform(dev);
return ((platform->platform_chip_id == TEGRA_194 && return ((platform->platform_chip_id == TEGRA_194 &&
tegra_chip_get_revision() == TEGRA194_REVISION_A01) ? tegra_chip_get_revision() == TEGRA_REVISION_A01) ?
true : false); true : false);
} }

View File

@@ -23,7 +23,12 @@
#include <linux/pm_qos.h> #include <linux/pm_qos.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#ifdef CONFIG_NVGPU_TEGRA_FUSE #ifdef CONFIG_NVGPU_TEGRA_FUSE
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
#include <soc/tegra/chip-id.h> #include <soc/tegra/chip-id.h>
#else
#include <soc/tegra/fuse.h>
#endif
#endif #endif
#include <nvgpu/kmem.h> #include <nvgpu/kmem.h>