aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-15 21:39:03 -0600
committerBin Meng <bmeng@tinylab.org>2023-07-17 17:12:26 +0800
commitfa5690c1f53929b78f9d9f4e270bd64befcda755 (patch)
tree24ee8d4042bb6d6bda24dc928122d101c168de76 /drivers/pci
parentb7d4df5a04733c19747de80b9dfdfdee58c9850d (diff)
downloadu-boot-fa5690c1f53929b78f9d9f4e270bd64befcda755.zip
u-boot-fa5690c1f53929b78f9d9f4e270bd64befcda755.tar.gz
u-boot-fa5690c1f53929b78f9d9f4e270bd64befcda755.tar.bz2
pci: Mask the ROM address in case it is already enabled
In some cases the video ROM may have been enabled previously, such as by a previous firmware stage. Use the correct address in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci_rom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c
index 503feb1..438583a 100644
--- a/drivers/pci/pci_rom.c
+++ b/drivers/pci/pci_rom.c
@@ -93,6 +93,7 @@ static int pci_rom_probe(struct udevice *dev, struct pci_rom_header **hdrp)
debug("%s: rom_address=%x\n", __func__, rom_address);
return -ENOENT;
}
+ rom_address &= PCI_ROM_ADDRESS_MASK;
/* Enable expansion ROM address decoding. */
dm_pci_write_config32(dev, PCI_ROM_ADDRESS,