tree: Remove unused <assert.h>
[coreboot.git] / src / soc / amd / stoneyridge / graphics.c
blob1b83c45f663871503ff8a8b1d9c515ed16d862e3
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/pci_rom.h>
5 #include <stdint.h>
7 #define ST_GPU_FIRST_VID_DID 0x100298e0
8 #define ST_GPU_LAST_VID_DID 0x100298ef
9 #define ST_VBIOS_VID_DID 0x100298e0
10 #define CZ_GPU_FIRST_VID_DID 0x10029870
11 #define CZ_GPU_LAST_VID_DID 0x1002987f
12 #define CZ_VBIOS_VID_DID 0x10029870
14 /* Change the vendor / device IDs to match the generic VBIOS header. */
15 u32 map_oprom_vendev(u32 vendev)
17 u32 new_vendev;
19 if ((vendev >= ST_GPU_FIRST_VID_DID) && (vendev <= ST_GPU_LAST_VID_DID))
20 new_vendev = ST_VBIOS_VID_DID;
21 else if ((vendev >= CZ_GPU_FIRST_VID_DID) && (vendev <= CZ_GPU_LAST_VID_DID))
22 new_vendev = CZ_VBIOS_VID_DID;
23 else
24 new_vendev = vendev;
26 if (vendev != new_vendev)
27 printk(BIOS_NOTICE, "Mapping PCI device %8x to %8x\n", vendev, new_vendev);
29 return new_vendev;