PCI: dm: Ignore 64-bit memory regions if CONFIG_SYS_PCI_64BIT not set
[oweals/u-boot.git] / drivers / pci / pci-uclass.c
index 49be1ebdd7701a1eaad0375b0ef05c057d3dc6e5..1cd1e409e3eeaa11ce99adab149c648a576e5c60 100644 (file)
@@ -860,6 +860,13 @@ static int decode_regions(struct pci_controller *hose, ofnode parent_node,
                } else {
                        continue;
                }
+
+               if (!IS_ENABLED(CONFIG_SYS_PCI_64BIT) &&
+                   type == PCI_REGION_MEM && upper_32_bits(pci_addr)) {
+                       debug(" - beyond the 32-bit boundary, ignoring\n");
+                       continue;
+               }
+
                pos = -1;
                for (i = 0; i < hose->region_count; i++) {
                        if (hose->regions[i].flags == type)