From 924aff9e226a1ef2e6456230cf1b466436d91aeb Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 9 Mar 2023 16:29:46 +0100 Subject: 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 Change-Id: I3b81a9464ed49672889fcb767920154fe6efdfcc Reviewed-on: https://review.coreboot.org/c/coreboot/+/74044 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/amd/picasso/graphics.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/soc/amd/picasso/graphics.c b/src/soc/amd/picasso/graphics.c index 298e177881..f0f5bd4e4f 100644 --- a/src/soc/amd/picasso/graphics.c +++ b/src/soc/amd/picasso/graphics.c @@ -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; + } } } -- cgit v1.2.3