All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] pci: Skip configuring PCI Rom Address for unsupported header types
@ 2021-10-07 12:50 Pali Rohár
  2021-10-07 12:50 ` [PATCH 2/5] pci: Skip configuring invalid P2P bridge devices Pali Rohár
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Pali Rohár @ 2021-10-07 12:50 UTC (permalink / raw)
  To: Simon Glass, Vladimir Oltean, Bin Meng, Stefan Roese; +Cc: u-boot

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>
---
 drivers/pci/pci_auto.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index 08082460eb86..288f7996c7c0 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);
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-10-15 11:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 12:50 [PATCH 1/5] pci: Skip configuring PCI Rom Address for unsupported header types Pali Rohár
2021-10-07 12:50 ` [PATCH 2/5] pci: Skip configuring invalid P2P bridge devices Pali Rohár
2021-10-08  5:52   ` Stefan Roese
2021-10-15 11:52   ` Tom Rini
2021-10-07 12:50 ` [PATCH 3/5] pci: Fix configuring BARs Pali Rohár
2021-10-08  5:53   ` Stefan Roese
2021-10-15 11:52   ` Tom Rini
2021-10-07 12:51 ` [PATCH 4/5] pci: Fix showing bars Pali Rohár
2021-10-08  5:53   ` Stefan Roese
2021-10-15 11:52   ` Tom Rini
2021-10-07 12:51 ` [PATCH 5/5] pci: Fix showing registers Pali Rohár
2021-10-08  5:53   ` Stefan Roese
2021-10-15 11:52   ` Tom Rini
2021-10-08  5:52 ` [PATCH 1/5] pci: Skip configuring PCI Rom Address for unsupported header types Stefan Roese
2021-10-15 11:52 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.