soc/amd/picasso/graphics: refactor map_oprom_vendev_rev

Refactor map_oprom_vendev_rev as a preparation to also remap the
revision ID in the RAVEN2_VBIOS_VID_DID case.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3b81a9464ed49672889fcb767920154fe6efdfcc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74044
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
This commit is contained in:
Felix Held 2023-03-09 16:29:46 +01:00
parent d8707e7e0f
commit 924aff9e22
1 changed files with 10 additions and 11 deletions

View File

@ -8,16 +8,15 @@
void map_oprom_vendev_rev(u32 *vendev, u8 *rev)
{
if (*vendev != PICASSO_VBIOS_VID_DID)
return;
/* Check if the RV2 video bios needs to be used instead of the RV1/PCO one */
if (soc_is_raven2()) {
printk(BIOS_NOTICE, "Using RV2 VBIOS.\n");
*vendev = RAVEN2_VBIOS_VID_DID;
*rev = RAVEN2_VBIOS_REV;
} else {
printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n");
*rev = PICASSO_VBIOS_REV;
if (*vendev == PICASSO_VBIOS_VID_DID) {
/* Check if the RV2 video bios needs to be used instead of the RV1/PCO one */
if (soc_is_raven2()) {
printk(BIOS_NOTICE, "Using RV2 VBIOS.\n");
*vendev = RAVEN2_VBIOS_VID_DID;
*rev = RAVEN2_VBIOS_REV;
} else {
printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n");
*rev = PICASSO_VBIOS_REV;
}
}
}