gpu: nvgpu: move mc_boot_0 function to hals and rename to get_chip_details

This function gets the GPU chip architecture, implementation and
revision information by reading the MC boot register, hence it
is more suited to be located in HAL files.
test_check_gpu_state is now being run after test_hal_init as the
gops.mc needs to be initialized for test_check_gpu_state subtest.

JIRA NVGPU-2524

Change-Id: I85355af11d3505a9eb4f10a3fe4e6d9b56285047
Signed-off-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2226018
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sagar Kamble
2019-10-24 13:07:13 +05:30
committed by Alex Waterman
parent 2edf3db10a
commit b26acdeb87
15 changed files with 76 additions and 35 deletions

View File

@@ -36,6 +36,8 @@
#include "hal_tu104.h"
#endif
#include "hal/mc/mc_gm20b.h"
int nvgpu_init_hal(struct gk20a *g)
{
int err = 0;
@@ -97,9 +99,10 @@ int nvgpu_detect_chip(struct gk20a *g)
return 0;
}
boot_0 = nvgpu_mc_boot_0(g, &p->gpu_arch, &p->gpu_impl, &p->gpu_rev);
boot_0 = gm20b_get_chip_details(g, &p->gpu_arch,
&p->gpu_impl, &p->gpu_rev);
if (boot_0 == U32_MAX) {
nvgpu_err(g, "nvgpu_mc_boot_0 failure!");
nvgpu_err(g, "get_chip_details failure!");
return -ENODEV;
}