drm/amdgpu: Add CLK IP base offset
authorRex Zhu <rex.zhu@amd.com>
Thu, 5 Jul 2018 08:34:13 +0000 (16:34 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Jul 2018 19:16:39 +0000 (14:16 -0500)
so we can read/write the registers in CLK domain
through RREG32/WREG32_SOC15

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c

index 8a440b9fa0fdc691076b141eda6ebd6d2296f5cd..b38c170fb95c6b156787f79f1b8ae6a4feae117e 100644 (file)
@@ -1398,6 +1398,7 @@ enum amd_hw_ip_block_type {
        PWR_HWIP,
        NBIF_HWIP,
        THM_HWIP,
+       CLK_HWIP,
        MAX_HWIP
 };
 
index 45aafca7f31560fb4e0862c500046e61030cb336..c5c9b2bc190d5cdd679e2fd7252d235816cbb166 100644 (file)
@@ -51,6 +51,7 @@ int vega10_reg_base_init(struct amdgpu_device *adev)
                adev->reg_offset[PWR_HWIP][i] = (uint32_t *)(&(PWR_BASE.instance[i]));
                adev->reg_offset[NBIF_HWIP][i] = (uint32_t *)(&(NBIF_BASE.instance[i]));
                adev->reg_offset[THM_HWIP][i] = (uint32_t *)(&(THM_BASE.instance[i]));
+               adev->reg_offset[CLK_HWIP][i] = (uint32_t *)(&(CLK_BASE.instance[i]));
        }
        return 0;
 }