[PATCH 04/18] pci: set upper word for 64bit base addresses
Sascha Hauer
s.hauer at pengutronix.de
Thu May 4 01:17:31 PDT 2023
Set the upper word correctly when the PCI address space is outside
the 32bit range.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 57a7a75f84..046711cd14 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -223,7 +223,7 @@ static void setup_device(struct pci_dev *dev, int max_bar)
*last_addr = ALIGN(*last_addr, size);
pci_write_config_dword(dev, pci_base_address_0, *last_addr);
if (mask & PCI_BASE_ADDRESS_MEM_TYPE_64)
- pci_write_config_dword(dev, pci_base_address_1, 0);
+ pci_write_config_dword(dev, pci_base_address_1, *last_addr >> 32);
start = *last_addr;
*last_addr += size;
} else {
--
2.39.2
More information about the barebox
mailing list