From: Simon Glass Date: Sun, 16 Jul 2023 03:39:03 +0000 (-0600) Subject: pci: Mask the ROM address in case it is already enabled X-Git-Tag: v2023.10~90^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa5690c1f53929b78f9d9f4e270bd64befcda755;p=platform%2Fkernel%2Fu-boot.git 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 Reviewed-by: Bin Meng --- 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,