Martin Roth | 86ba0d7 | 2020-02-05 16:46:30 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | |
| 3 | #include <console/console.h> |
| 4 | #include <device/pci_rom.h> |
| 5 | #include <soc/cpu.h> |
| 6 | #include <soc/soc_util.h> |
Elyes Haouas | 68eb439 | 2022-10-08 13:24:08 +0200 | [diff] [blame] | 7 | #include <stdint.h> |
Martin Roth | 86ba0d7 | 2020-02-05 16:46:30 -0700 | [diff] [blame] | 8 | |
| 9 | void map_oprom_vendev_rev(u32 *vendev, u8 *rev) |
| 10 | { |
Felix Held | 924aff9 | 2023-03-09 16:29:46 +0100 | [diff] [blame] | 11 | if (*vendev == PICASSO_VBIOS_VID_DID) { |
| 12 | /* Check if the RV2 video bios needs to be used instead of the RV1/PCO one */ |
| 13 | if (soc_is_raven2()) { |
| 14 | printk(BIOS_NOTICE, "Using RV2 VBIOS.\n"); |
| 15 | *vendev = RAVEN2_VBIOS_VID_DID; |
| 16 | *rev = RAVEN2_VBIOS_REV; |
| 17 | } else { |
| 18 | printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n"); |
| 19 | *rev = PICASSO_VBIOS_REV; |
| 20 | } |
Felix Held | e467a44 | 2023-03-27 16:57:06 +0200 | [diff] [blame] | 21 | } else if (*vendev == RAVEN2_VBIOS_VID_DID) { |
| 22 | printk(BIOS_NOTICE, "Using RV2 VBIOS.\n"); |
| 23 | *rev = RAVEN2_VBIOS_REV; |
Martin Roth | 86ba0d7 | 2020-02-05 16:46:30 -0700 | [diff] [blame] | 24 | } |
| 25 | } |