diff options
| author | Tuomas Tynkkynen <[email protected]> | 2018-05-14 19:38:13 +0300 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2018-05-26 12:46:50 -0400 |
| commit | d71975ae6e0f3dc1c0c96d3a8cc0120a266305b9 (patch) | |
| tree | a7684ddd6ff0eb0c17fa38ca840a2636342d54b0 /include | |
| parent | ed12a89d0738dd030c42a608efa7a72dd4a1f6da (diff) | |
PCI: autoconfig: Don't allocate 64-bit addresses to 32-bit only resources
Currently, if we happen to allocate an address requiring 64 bits to a
device only supporting 32-bit BARs, the address eventually gets silently
truncated to 32 bits. Avoid this by adding a new flag to
pciauto_region_allocate() to bail out in such situations.
Signed-off-by: Tuomas Tynkkynen <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/pci.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/pci.h b/include/pci.h index cda69076889..127d3c6a6fe 100644 --- a/include/pci.h +++ b/include/pci.h @@ -681,7 +681,7 @@ void pciauto_region_init(struct pci_region *res); void pciauto_region_align(struct pci_region *res, pci_size_t size); void pciauto_config_init(struct pci_controller *hose); int pciauto_region_allocate(struct pci_region *res, pci_size_t size, - pci_addr_t *bar); + pci_addr_t *bar, bool supports_64bit); #if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT) extern int pci_hose_read_config_byte_via_dword(struct pci_controller *hose, |
