mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
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 <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ed12a89d07
commit
d71975ae6e
4 changed files with 14 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue