1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <console/console.h>
4 #include <device/pci_rom.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
)
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
;
26 if (vendev
!= new_vendev
)
27 printk(BIOS_NOTICE
, "Mapping PCI device %8x to %8x\n", vendev
, new_vendev
);