acpi: Collect tables in the acpi_item list

At present this list is used to collect items within the DSDT and SSDT
tables. It is useful for it to collect the whole tables as well, so there
is a list of what was created and which write created each one.

Refactor the code accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2021-12-01 09:03:04 -07:00
parent 9d2adca8c3
commit 2d7c738296
3 changed files with 51 additions and 11 deletions

View File

@@ -262,6 +262,20 @@ int acpi_inject_dsdt(struct acpi_ctx *ctx);
*/
int acpi_setup_nhlt(struct acpi_ctx *ctx, struct nhlt *nhlt);
/**
* acpi_add_other_item() - Add a new table to the list of ACPI tables
*
* This adds an entry of type ACPIT_TYPE_OTHER
*
* @ctx: ACPI context
* @writer: Writer entry that generated the data
* @type: Table type it refers to
* @start: The start of the data (the end is obtained from ctx->current)
* @return 0 if OK, -ENOSPC if too many items, -ENOMEM if out of memory
*/
int acpi_add_other_item(struct acpi_ctx *ctx, const struct acpi_writer *writer,
void *start);
/**
* acpi_dump_items() - Dump out the collected ACPI items
*