diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2015-07-08 13:06:41 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-14 18:03:20 -0600 |
commit | f110da9984c0aa0aba9e1c4178b67b7abecf7e8d (patch) | |
tree | 0d4eb923147f9e907e91f502bf57df8929278b09 /drivers/pci/pci_rom.c | |
parent | 6c89663cb152bb49f7618f283d999c417fd85746 (diff) | |
download | u-boot-imx-f110da9984c0aa0aba9e1c4178b67b7abecf7e8d.zip u-boot-imx-f110da9984c0aa0aba9e1c4178b67b7abecf7e8d.tar.gz u-boot-imx-f110da9984c0aa0aba9e1c4178b67b7abecf7e8d.tar.bz2 |
pci: Disable expansion ROM address decoding when signature check fails
We should not leave the expansion ROM address window open when there
is not a valid ROM.
Suggested-by: Matt Porter <mporter@konsulko.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pci/pci_rom.c')
-rw-r--r-- | drivers/pci/pci_rom.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/pci_rom.c b/drivers/pci/pci_rom.c index aa06767..a33efae 100644 --- a/drivers/pci/pci_rom.c +++ b/drivers/pci/pci_rom.c @@ -104,6 +104,10 @@ static int pci_rom_probe(pci_dev_t dev, uint class, if (le16_to_cpu(rom_header->signature) != PCI_ROM_HDR) { printf("Incorrect expansion ROM header signature %04x\n", le16_to_cpu(rom_header->signature)); +#ifndef CONFIG_VGA_BIOS_ADDR + /* Disable expansion ROM address decoding */ + pci_write_config_dword(dev, PCI_ROM_ADDRESS, rom_address); +#endif return -EINVAL; } |