summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-03-27 14:52:36 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-03-28 15:16:13 +0000
commite30532d0f406e58caac338164b6048abbaa487f5 (patch)
tree25634f7da5a7b1e1ed28356bc4424320d2f7630c /src/soc/amd
parent1d66ad1cbde133a83efd632dcecaaa4253699d85 (diff)
soc/amd/stoneyridge/graphics: introduce defines for constants
Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I2021a106e0d3a603b1a05296411700ffea32fc8c Reviewed-on: https://review.coreboot.org/c/coreboot/+/74042 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/stoneyridge/graphics.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/soc/amd/stoneyridge/graphics.c b/src/soc/amd/stoneyridge/graphics.c
index c0d4328c71..1b83c45f66 100644
--- a/src/soc/amd/stoneyridge/graphics.c
+++ b/src/soc/amd/stoneyridge/graphics.c
@@ -4,15 +4,22 @@
#include <device/pci_rom.h>
#include <stdint.h>
+#define ST_GPU_FIRST_VID_DID 0x100298e0
+#define ST_GPU_LAST_VID_DID 0x100298ef
+#define ST_VBIOS_VID_DID 0x100298e0
+#define CZ_GPU_FIRST_VID_DID 0x10029870
+#define CZ_GPU_LAST_VID_DID 0x1002987f
+#define CZ_VBIOS_VID_DID 0x10029870
+
/* Change the vendor / device IDs to match the generic VBIOS header. */
u32 map_oprom_vendev(u32 vendev)
{
u32 new_vendev;
- if ((vendev >= 0x100298e0) && (vendev <= 0x100298ef))
- new_vendev = 0x100298e0;
- else if ((vendev >= 0x10029870) && (vendev <= 0x1002987f))
- new_vendev = 0x10029870;
+ if ((vendev >= ST_GPU_FIRST_VID_DID) && (vendev <= ST_GPU_LAST_VID_DID))
+ new_vendev = ST_VBIOS_VID_DID;
+ else if ((vendev >= CZ_GPU_FIRST_VID_DID) && (vendev <= CZ_GPU_LAST_VID_DID))
+ new_vendev = CZ_VBIOS_VID_DID;
else
new_vendev = vendev;