summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2020-02-05 21:59:12 +0100
committerTom Rini <trini@konsulko.com>2020-02-13 10:10:50 -0500
commit58fc2b54f5b9102d593f3b98c370b6cbaeb97ac2 (patch)
tree0b471198762b0195b9787bbe86959a53e3c9329a
parent01e7a40e395aefea94e9fb943b9447f7d0fd7efa (diff)
downloadu-boot-58fc2b54f5b9102d593f3b98c370b6cbaeb97ac2.tar.gz
u-boot-58fc2b54f5b9102d593f3b98c370b6cbaeb97ac2.tar.bz2
u-boot-58fc2b54f5b9102d593f3b98c370b6cbaeb97ac2.zip
pci: definition of pci_addr_t and pci_size_t
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 if CONFIG_SYS_PCI_64BIT is not defined. Considering that 32bit U-Boot is used to launch some 64bit x86 systems we cannot do without CONFIG_SYS_PCI_64BIT requiring u64 as type. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--include/pci.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/pci.h b/include/pci.h
index 50ca249f2d..174ddd4460 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -488,8 +488,8 @@
typedef u64 pci_addr_t;
typedef u64 pci_size_t;
#else
-typedef u32 pci_addr_t;
-typedef u32 pci_size_t;
+typedef unsigned long pci_addr_t;
+typedef unsigned long pci_size_t;
#endif
struct pci_region {