X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fpci.h;h=8e27cbfaf146cfb3ad0587aeb460cd454eba926f;hb=896019b18b0a6f9392fa234c082ef492e1630cc3;hp=7adc04301c06a90f582622d26bb17f770781a699;hpb=f855a7bc12dc3bdf83905b4c72a6d795ee8d8ee5;p=u-boot diff --git a/include/pci.h b/include/pci.h index 7adc04301c..8e27cbfaf1 100644 --- a/include/pci.h +++ b/include/pci.h @@ -1,11 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2001 Sysgo Real-Time Solutions, GmbH * Andreas Heppel * * (C) Copyright 2002 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef _PCI_H @@ -585,8 +584,6 @@ struct pci_controller { /* Used by auto config */ struct pci_region *pci_mem, *pci_io, *pci_prefetch; - /* Used by ppc405 autoconfig*/ - struct pci_region *pci_fb; #ifndef CONFIG_DM_PCI int current_busno; @@ -683,8 +680,21 @@ extern int pci_write_config_dword(pci_dev_t dev, int where, u32 val); 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); + +/** + * pciauto_region_allocate() - Allocate resources from a PCI resource region + * + * Allocates @size bytes from the PCI resource @res. If @supports_64bit is + * false, the result will be guaranteed to fit in 32 bits. + * + * @res: PCI region to allocate from + * @size: Amount of bytes to allocate + * @bar: Returns the PCI bus address of the allocated resource + * @supports_64bit: Whether to allow allocations above the 32-bit boundary + * @return 0 if successful, -1 on failure + */ 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,