soc/amd/stoneyridge: move map_oprom_vendev to graphics.c

Move map_oprom_vendev to graphics.c to match the other AMD SoCs. Also
change the comment style to be more in line with the rest of coreboot
and drop the unneeded line break in the printk call.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Icc1f3d73fba973413c5a22e2f5ae01bc58bc3e76
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74041
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
This commit is contained in:
Felix Held 2023-03-27 14:39:29 +02:00
parent 0b03c08223
commit 1d66ad1cbd
3 changed files with 24 additions and 21 deletions

View File

@ -50,6 +50,7 @@ ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-y += fch.c ramstage-y += fch.c
ramstage-y += fch_agesa.c ramstage-y += fch_agesa.c
ramstage-y += gpio.c ramstage-y += gpio.c
ramstage-y += graphics.c
ramstage-y += monotonic_timer.c ramstage-y += monotonic_timer.c
ramstage-y += northbridge.c ramstage-y += northbridge.c
ramstage-y += sata.c ramstage-y += sata.c

View File

@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <device/pci_rom.h>
#include <stdint.h>
/* 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;
else
new_vendev = vendev;
if (vendev != new_vendev)
printk(BIOS_NOTICE, "Mapping PCI device %8x to %8x\n", vendev, new_vendev);
return new_vendev;
}

View File

@ -407,27 +407,6 @@ void domain_read_resources(struct device *dev)
} }
} }
/*********************************************************************
* 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;
else
new_vendev = vendev;
if (vendev != new_vendev)
printk(BIOS_NOTICE, "Mapping PCI device %8x to %8x\n",
vendev, new_vendev);
return new_vendev;
}
__weak void set_board_env_params(GNB_ENV_CONFIGURATION *params) { } __weak void set_board_env_params(GNB_ENV_CONFIGURATION *params) { }
void SetNbEnvParams(GNB_ENV_CONFIGURATION *params) void SetNbEnvParams(GNB_ENV_CONFIGURATION *params)