gpu: nvgpu: add PDI reporting for GP10B (Linux)

Read the T186 SoC PDI fuse registers to retrieve the per-device
identifier for GP10B.

Bug 2957580

Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Change-Id: Ie5031a005ca251636614d27c2dc77bddfce0ea21
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2350930
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sami Kiminki
2020-05-18 17:11:31 +03:00
committed by Alex Waterman
parent 872c043ad6
commit d44960d424
4 changed files with 47 additions and 0 deletions

View File

@@ -55,3 +55,22 @@ int nvgpu_tegra_fuse_read_reserved_calib(struct gk20a *g, u32 *val)
{
return tegra_fuse_readl(FUSE_RESERVED_CALIB0_0, val);
}
int nvgpu_tegra_fuse_read_per_device_identifier(struct gk20a *g, u64 *pdi)
{
u32 lo = 0U;
u32 hi = 0U;
int err;
err = tegra_fuse_readl(FUSE_PDI0, &lo);
if (err)
return err;
err = tegra_fuse_readl(FUSE_PDI1, &hi);
if (err)
return err;
*pdi = ((u64)lo) | (((u64)hi) << 32);
return 0;
}