From patchwork Wed Feb 5 19:07:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 236002 List-Id: U-Boot discussion From: xypron.glpk at gmx.de (Heinrich Schuchardt) Date: Wed, 5 Feb 2020 20:07:26 +0100 Subject: [PATCH 1/1] pci: definition of pci_addr_t and pci_size_t Message-ID: <20200205190726.15753-1-xypron.glpk@gmx.de> Currently the size of pci_addr_t and pci_size_t depends on CONFIG_SYS_PCI_64BIT. For qemu_arm64_defconfig with 4 GiB RAM this leads to an error pci_hose_phys_to_bus: invalid physical address which is due to the truncation of the bus address in _dm_pci_phys_to_bus. Defining CONFIG_SYS_PCI_64BIT is not a solution as this results in an error PCI: Failed autoconfig bar 10 So let's use unsigned long for pci_addr_t and pci_size_t. Signed-off-by: Heinrich Schuchardt --- include/pci.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) -- 2.24.1 diff --git a/include/pci.h b/include/pci.h index 8c761d8da3..d8bce8ab80 100644 --- a/include/pci.h +++ b/include/pci.h @@ -484,13 +484,8 @@ #include -#ifdef CONFIG_SYS_PCI_64BIT -typedef u64 pci_addr_t; -typedef u64 pci_size_t; -#else -typedef u32 pci_addr_t; -typedef u32 pci_size_t; -#endif +typedef unsigned long pci_addr_t; +typedef unsigned long pci_size_t; struct pci_region { pci_addr_t bus_start; /* Start on the bus */