diff options
author | Pali Rohár <pali@kernel.org> | 2021-10-07 14:50:57 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-14 19:45:07 -0400 |
commit | b9caab8b47ae6ad6a317a9ed05e90475248739d7 (patch) | |
tree | 20343c556d4da37e1f445273084c5c2cfa933b2a /drivers | |
parent | b04f64aa48eeaf099fe52c28c512f956690f5eec (diff) | |
download | u-boot-b9caab8b47ae6ad6a317a9ed05e90475248739d7.zip u-boot-b9caab8b47ae6ad6a317a9ed05e90475248739d7.tar.gz u-boot-b9caab8b47ae6ad6a317a9ed05e90475248739d7.tar.bz2 |
pci: Skip configuring PCI Rom Address for unsupported header types
PCI Rom Address is currently supported only for Normal (0x00) and
Bridge (0x01) header types. Fix code accordingly.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci_auto.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c index 0808246..288f799 100644 --- a/drivers/pci/pci_auto.c +++ b/drivers/pci/pci_auto.c @@ -131,7 +131,8 @@ static void dm_pciauto_setup_device(struct udevice *dev, int bars_num, /* Configure the expansion ROM address */ dm_pci_read_config8(dev, PCI_HEADER_TYPE, &header_type); header_type &= 0x7f; - if (header_type != PCI_HEADER_TYPE_CARDBUS) { + if (header_type == PCI_HEADER_TYPE_NORMAL || + header_type == PCI_HEADER_TYPE_BRIDGE) { rom_addr = (header_type == PCI_HEADER_TYPE_NORMAL) ? PCI_ROM_ADDRESS : PCI_ROM_ADDRESS1; dm_pci_write_config32(dev, rom_addr, 0xfffffffe); |