Commit 7445435f authored by Bin Meng's avatar Bin Meng Committed by Simon Glass

pci: Fix expansion ROM programming for multi-function devices

PCI_HEADER_TYPE register (offset 0x0e) bit 7 is an indicator
for multi-function devices. We should mask it off before using
it as the header type.
Signed-off-by: default avatarBin Meng <>
Acked-by: default avatarSimon Glass <>
parent 996ec1dc
......@@ -185,6 +185,7 @@ void pciauto_setup_device(struct pci_controller *hose,
/* Configure the expansion ROM address */
pci_hose_read_config_byte(hose, dev, PCI_HEADER_TYPE, &header_type);
header_type &= 0x7f;
if (header_type != PCI_HEADER_TYPE_CARDBUS) {
rom_addr = (header_type == PCI_HEADER_TYPE_NORMAL) ?
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment