summaryrefslogtreecommitdiffstats
path: root/src/device/pci_rom.c
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2021-07-16 15:04:18 -0600
committerFelix Held <felix-coreboot@felixheld.de>2021-07-20 16:51:50 +0000
commit69cb69f35fc3c5fa1e75b49ce0f9358acbc42ea8 (patch)
tree0784c61959a5b6c56aacb324af11a68533ee21d6 /src/device/pci_rom.c
parenta736f480883e544b2131c966cdfb80bb42e751b3 (diff)
downloadcoreboot-69cb69f35fc3c5fa1e75b49ce0f9358acbc42ea8.tar.gz
coreboot-69cb69f35fc3c5fa1e75b49ce0f9358acbc42ea8.tar.bz2
coreboot-69cb69f35fc3c5fa1e75b49ce0f9358acbc42ea8.zip
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>
Diffstat (limited to 'src/device/pci_rom.c')
-rw-r--r--src/device/pci_rom.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/device/pci_rom.c b/src/device/pci_rom.c
index 106b5f9c8bc2..fe7c1cfdf029 100644
--- a/src/device/pci_rom.c
+++ b/src/device/pci_rom.c
@@ -78,11 +78,9 @@ struct rom_header *pci_rom_probe(const struct device *dev)
rom_address = pci_read_config32(dev, PCI_ROM_ADDRESS);
if (rom_address == 0x00000000 || rom_address == 0xffffffff) {
-#if CONFIG(CPU_QEMU_X86)
- if ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
+ if (CONFIG(CPU_QEMU_X86) && (dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
rom_address = 0xc0000;
else
-#endif
return NULL;
} else {
/* Enable expansion ROM address decoding. */