summaryrefslogtreecommitdiff
path: root/include/pci.h
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-05-14 23:50:05 +0300
committerTom Rini <trini@konsulko.com>2018-05-26 12:46:50 -0400
commit5ce9aca8a61c6991b2ed6944f0c07c0015578d25 (patch)
tree2975405a0e8dde36394b49d17129f5551ba9cae1 /include/pci.h
parentd71975ae6e0f3dc1c0c96d3a8cc0120a266305b9 (diff)
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>
Diffstat (limited to 'include/pci.h')
-rw-r--r--include/pci.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/pci.h b/include/pci.h
index 127d3c6a6f..8e27cbfaf1 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -680,6 +680,19 @@ 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, bool supports_64bit);