blob: 1b83c45f663871503ff8a8b1d9c515ed16d862e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#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 >= 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;
if (vendev != new_vendev)
printk(BIOS_NOTICE, "Mapping PCI device %8x to %8x\n", vendev, new_vendev);
return new_vendev;
}
|