Handled by IP discovery now.
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
        int r;
 
-       switch (adev->ip_versions[SDMA0_HWIP]) {
-       case IP_VERSION(4, 1, 0):
-       case IP_VERSION(4, 1, 1):
-       case IP_VERSION(4, 1, 2):
-               adev->sdma.num_instances = 1;
-               break;
-       case IP_VERSION(4, 2, 2):
-               adev->sdma.num_instances = 8;
-               break;
-       case IP_VERSION(4, 4, 0):
-               adev->sdma.num_instances = 5;
-               break;
-       default:
-               adev->sdma.num_instances = 2;
-               break;
-       }
-
        r = sdma_v4_0_init_microcode(adev);
        if (r) {
                DRM_ERROR("Failed to load sdma firmware!\n");
 
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       adev->sdma.num_instances = 2;
-
        sdma_v5_0_set_ring_funcs(adev);
        sdma_v5_0_set_buffer_funcs(adev);
        sdma_v5_0_set_vm_pte_funcs(adev);
 
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       switch (adev->ip_versions[SDMA0_HWIP]) {
-       case IP_VERSION(5, 2, 0):
-               adev->sdma.num_instances = 4;
-               break;
-       case IP_VERSION(5, 2, 2):
-       case IP_VERSION(5, 2, 4):
-               adev->sdma.num_instances = 2;
-               break;
-       case IP_VERSION(5, 2, 1):
-       case IP_VERSION(5, 2, 5):
-       case IP_VERSION(5, 2, 3):
-               adev->sdma.num_instances = 1;
-               break;
-       default:
-               break;
-       }
-
        sdma_v5_2_set_ring_funcs(adev);
        sdma_v5_2_set_buffer_funcs(adev);
        sdma_v5_2_set_vm_pte_funcs(adev);