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) void map_oprom_vendev_rev(u32 *vendev, u8 *rev)
{ {
if (*vendev != PICASSO_VBIOS_VID_DID) 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()) {
/* Check if the RV2 video bios needs to be used instead of the RV1/PCO one */ printk(BIOS_NOTICE, "Using RV2 VBIOS.\n");
if (soc_is_raven2()) { *vendev = RAVEN2_VBIOS_VID_DID;
printk(BIOS_NOTICE, "Using RV2 VBIOS.\n"); *rev = RAVEN2_VBIOS_REV;
*vendev = RAVEN2_VBIOS_VID_DID; } else {
*rev = RAVEN2_VBIOS_REV; printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n");
} else { *rev = PICASSO_VBIOS_REV;
printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n"); }
*rev = PICASSO_VBIOS_REV;
} }
} }