Commit 5ce9aca8a61c6991b2ed6944f0c07c0015578d25
Committed by
Tom Rini
1 parent
d71975ae6e
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
PCI: Document pciauto_region_allocate()
Add a doc comment for pciauto_region_allocate(). Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> Reviewed-by: Simon Glass <sjg@chromium.org>
Showing 1 changed file with 13 additions and 0 deletions Side-by-side Diff
include/pci.h
... | ... | @@ -680,6 +680,19 @@ |
680 | 680 | void pciauto_region_init(struct pci_region *res); |
681 | 681 | void pciauto_region_align(struct pci_region *res, pci_size_t size); |
682 | 682 | void pciauto_config_init(struct pci_controller *hose); |
683 | + | |
684 | +/** | |
685 | + * pciauto_region_allocate() - Allocate resources from a PCI resource region | |
686 | + * | |
687 | + * Allocates @size bytes from the PCI resource @res. If @supports_64bit is | |
688 | + * false, the result will be guaranteed to fit in 32 bits. | |
689 | + * | |
690 | + * @res: PCI region to allocate from | |
691 | + * @size: Amount of bytes to allocate | |
692 | + * @bar: Returns the PCI bus address of the allocated resource | |
693 | + * @supports_64bit: Whether to allow allocations above the 32-bit boundary | |
694 | + * @return 0 if successful, -1 on failure | |
695 | + */ | |
683 | 696 | int pciauto_region_allocate(struct pci_region *res, pci_size_t size, |
684 | 697 | pci_addr_t *bar, bool supports_64bit); |
685 | 698 |