dm: core: Add macros to access the new linker lists

Add macros which work with instantiated devices and uclasses, as created
at build time by dtoc. Include variants that can be used in data
structures.

These are mostly used by dtoc but it is worth documenting them fully for
the occasional case where they might come up in user code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2021-03-15 17:25:14 +13:00
parent 851144350b
commit 607f9bcb0d
5 changed files with 179 additions and 2 deletions

View file

@ -214,8 +214,8 @@
/**
* ll_entry_ref() - Get a reference to a linker-generated array entry
*
* Once ll_entry_decl() has been used to declare the reference, this macro
* allows the entry to be accessed.
* Once an extern ll_entry_declare() has been used to declare the reference,
* this macro allows the entry to be accessed.
*
* This is like ll_entry_get(), but without the extra code, so it is suitable
* for putting into data structures.