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

@@ -46,7 +46,7 @@
bool is_nvgpu_gpu_state_valid(struct gk20a *g)
{
u32 boot_0 = nvgpu_mc_boot_0(g, NULL, NULL, NULL);
u32 boot_0 = g->ops.mc.get_chip_details(g, NULL, NULL, NULL);
if (boot_0 == 0xffffffffU) {
nvgpu_err(g, "GPU has disappeared from bus!!");