Commit 1fcc208c authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/psp_v13.0: convert to IP version checking

Use IP versions rather than asic_type to differentiate
IP version specific features.
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent e47868ea
...@@ -47,18 +47,19 @@ static int psp_v13_0_init_microcode(struct psp_context *psp) ...@@ -47,18 +47,19 @@ static int psp_v13_0_init_microcode(struct psp_context *psp)
const char *chip_name; const char *chip_name;
int err = 0; int err = 0;
switch (adev->asic_type) { switch (adev->ip_versions[MP0_HWIP]) {
case CHIP_ALDEBARAN: case IP_VERSION(13, 0, 2):
chip_name = "aldebaran"; chip_name = "aldebaran";
break; break;
case CHIP_YELLOW_CARP: case IP_VERSION(13, 0, 1):
case IP_VERSION(13, 0, 3):
chip_name = "yellow_carp"; chip_name = "yellow_carp";
break; break;
default: default:
BUG(); BUG();
} }
switch (adev->asic_type) { switch (adev->ip_versions[MP0_HWIP]) {
case CHIP_ALDEBARAN: case IP_VERSION(13, 0, 2):
err = psp_init_sos_microcode(psp, chip_name); err = psp_init_sos_microcode(psp, chip_name);
if (err) if (err)
return err; return err;
...@@ -66,7 +67,8 @@ static int psp_v13_0_init_microcode(struct psp_context *psp) ...@@ -66,7 +67,8 @@ static int psp_v13_0_init_microcode(struct psp_context *psp)
if (err) if (err)
return err; return err;
break; break;
case CHIP_YELLOW_CARP: case IP_VERSION(13, 0, 1):
case IP_VERSION(13, 0, 3):
err = psp_init_asd_microcode(psp, chip_name); err = psp_init_asd_microcode(psp, chip_name);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment