
On Sun, 14 Nov 2021 at 11:03, Heinrich Schuchardt heinrich.schuchardt@canonical.com wrote:
Correct Sphinx style comments in include/lmb.h
Add the logical memory block API to the HTML documentation.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com
doc/api/index.rst | 1 + doc/api/lmb.rst | 7 +++++++ include/lmb.h | 23 ++++++++++++----------- 3 files changed, 20 insertions(+), 11 deletions(-) create mode 100644 doc/api/lmb.rst
diff --git a/doc/api/index.rst b/doc/api/index.rst index 281d1dca96..806c7385a6 100644 --- a/doc/api/index.rst +++ b/doc/api/index.rst @@ -10,6 +10,7 @@ U-Boot API documentation efi getopt linker_lists
- lmb logging pinctrl rng
diff --git a/doc/api/lmb.rst b/doc/api/lmb.rst new file mode 100644 index 0000000000..2095bfa161 --- /dev/null +++ b/doc/api/lmb.rst @@ -0,0 +1,7 @@ +.. SPDX-License-Identifier: GPL-2.0+
+Logical memory blocks +=====================
+.. kernel-doc:: include/lmb.h
- :internal:
diff --git a/include/lmb.h b/include/lmb.h index ee5b938e19..5efdf9d2e8 100644 --- a/include/lmb.h +++ b/include/lmb.h @@ -25,8 +25,9 @@ enum lmb_flags { /**
- struct lmb_property - Description of one region.
- @base: Base address of the region.
- @size: Size of the region
- @base: Base address of the region.
- @size: Size of the region
*/
- @flags: memory region attributes
struct lmb_property { phys_addr_t base; @@ -83,11 +84,11 @@ extern long lmb_reserve(struct lmb *lmb, phys_addr_t base, phys_size_t size); /**
- lmb_reserve_flags - Reserve one region with a specific flags bitfield.
- @lmb the logical memory block struct
- @base base address of the memory region
- @size size of the memory region
- @flags flags for the memory region
- @return 0 if OK, > 0 for coalesced region or a negative error code.
- @lmb: the logical memory block struct
- @base: base address of the memory region
- @size: size of the memory region
- @flags: flags for the memory region
*/
- Return: 0 if OK, > 0 for coalesced region or a negative error code.
long lmb_reserve_flags(struct lmb *lmb, phys_addr_t base, phys_size_t size, enum lmb_flags flags); @@ -103,10 +104,10 @@ extern int lmb_is_reserved(struct lmb *lmb, phys_addr_t addr); /**
- lmb_is_reserved_flags - test if tha address is in reserved region with a bitfield flag
- @lmb the logical memory block struct
- @addr address to be tested
- @flags flags bitfied to be tested
- @return 0 if not reserved or reserved without the requested flag else 1
- @lmb: the logical memory block struct
- @addr: address to be tested
- @flags: flags bitfied to be tested
*/
- Return: if not reserved or reserved without the requested flag else 1
int lmb_is_reserved_flags(struct lmb *lmb, phys_addr_t addr, int flags); extern long lmb_free(struct lmb *lmb, phys_addr_t base, phys_size_t size); -- 2.32.0
Acked-by: Ilias Apalodimas ilias.apalodimas@linaro.org