drm/amdgpu: rename amdgpu_ip_funcs to amd_ip_funcs (v2)

The structure is renamed and moved to amd_shared.h to make
the component independent.  This makes it easier to add
new components in the future.

v2: fix include path

Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Signed-off-by: yanyang1 <young.yang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c b/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c
index cf97d49..2d5b1bd 100644
--- a/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/tonga_dpm.c
@@ -30,8 +30,10 @@
 
 static void tonga_dpm_set_funcs(struct amdgpu_device *adev);
 
-static int tonga_dpm_early_init(struct amdgpu_device *adev)
+static int tonga_dpm_early_init(void *handle)
 {
+	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
 	tonga_dpm_set_funcs(adev);
 
 	return 0;
@@ -41,7 +43,6 @@
 {
 	char fw_name[30] = "amdgpu/tonga_smc.bin";
 	int err;
-
 	err = request_firmware(&adev->pm.fw, fw_name, adev->dev);
 	if (err)
 		goto out;
@@ -56,9 +57,10 @@
 	return err;
 }
 
-static int tonga_dpm_sw_init(struct amdgpu_device *adev)
+static int tonga_dpm_sw_init(void *handle)
 {
 	int ret;
+	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
 	ret = tonga_dpm_init_microcode(adev);
 	if (ret)
@@ -67,14 +69,15 @@
 	return 0;
 }
 
-static int tonga_dpm_sw_fini(struct amdgpu_device *adev)
+static int tonga_dpm_sw_fini(void *handle)
 {
 	return 0;
 }
 
-static int tonga_dpm_hw_init(struct amdgpu_device *adev)
+static int tonga_dpm_hw_init(void *handle)
 {
 	int ret;
+	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
 	mutex_lock(&adev->pm.mutex);
 
@@ -99,41 +102,47 @@
 	return -EINVAL;
 }
 
-static int tonga_dpm_hw_fini(struct amdgpu_device *adev)
+static int tonga_dpm_hw_fini(void *handle)
 {
+	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
 	mutex_lock(&adev->pm.mutex);
 	tonga_smu_fini(adev);
 	mutex_unlock(&adev->pm.mutex);
 	return 0;
 }
 
-static int tonga_dpm_suspend(struct amdgpu_device *adev)
+static int tonga_dpm_suspend(void *handle)
 {
+	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
 	tonga_dpm_hw_fini(adev);
 
 	return 0;
 }
 
-static int tonga_dpm_resume(struct amdgpu_device *adev)
+static int tonga_dpm_resume(void *handle)
 {
+	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+
 	tonga_dpm_hw_init(adev);
 
 	return 0;
 }
 
-static int tonga_dpm_set_clockgating_state(struct amdgpu_device *adev,
-			enum amdgpu_clockgating_state state)
+static int tonga_dpm_set_clockgating_state(void *handle,
+			enum amd_clockgating_state state)
 {
 	return 0;
 }
 
-static int tonga_dpm_set_powergating_state(struct amdgpu_device *adev,
-			enum amdgpu_powergating_state state)
+static int tonga_dpm_set_powergating_state(void *handle,
+			enum amd_powergating_state state)
 {
 	return 0;
 }
 
-const struct amdgpu_ip_funcs tonga_dpm_ip_funcs = {
+const struct amd_ip_funcs tonga_dpm_ip_funcs = {
 	.early_init = tonga_dpm_early_init,
 	.late_init = NULL,
 	.sw_init = tonga_dpm_sw_init,