device/pci_rom: Convert #if to C code

No reason to use the preprocessor for this.

BUG=none
TEST=build guybrush

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I920dfa2d27c2eb27e8bc50c615ccd13601610fd7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56400
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
This commit is contained in:
Raul E Rangel 2021-07-16 15:04:18 -06:00 committed by Felix Held
parent a736f48088
commit 69cb69f35f
1 changed files with 1 additions and 3 deletions

View File

@ -78,11 +78,9 @@ struct rom_header *pci_rom_probe(const struct device *dev)
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS); rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
if (rom_address == 0x00000000 || rom_address == 0xffffffff) { if (rom_address == 0x00000000 || rom_address == 0xffffffff) {
#if CONFIG(CPU_QEMU_X86) if (CONFIG(CPU_QEMU_X86) && (dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
rom_address = 0xc0000; rom_address = 0xc0000;
else else
#endif
return NULL; return NULL;
} else { } else {
/* Enable expansion ROM address decoding. */ /* Enable expansion ROM address decoding. */