diff options
author | Simon Glass <sjg@chromium.org> | 2021-12-01 09:02:46 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-01-25 11:44:36 -0700 |
commit | fb746fdec6d58eacd7d9323eda7ccbde9419a41e (patch) | |
tree | 840af67c895fc5116de3e1568b03141c85408151 /drivers/core | |
parent | 383bf1bc9ee21c649d04a03a19eedbffa84b7237 (diff) | |
download | u-boot-fb746fdec6d58eacd7d9323eda7ccbde9419a41e.zip u-boot-fb746fdec6d58eacd7d9323eda7ccbde9419a41e.tar.gz u-boot-fb746fdec6d58eacd7d9323eda7ccbde9419a41e.tar.bz2 |
acpi: Add a table start
It is useful to record the start of an ACPI table so that offsets from
that point can be easily calculated.
Add this to the context and set it before calling the writer method.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/acpi.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c index e988a65..5425e4d 100644 --- a/drivers/core/acpi.c +++ b/drivers/core/acpi.c @@ -266,19 +266,18 @@ int acpi_recurse_method(struct acpi_ctx *ctx, struct udevice *parent, func = acpi_get_method(parent, method); if (func) { - void *start = ctx->current; - log_debug("- method %d, %s %p\n", method, parent->name, func); ret = device_of_to_plat(parent); if (ret) return log_msg_ret("ofdata", ret); + ctx->tab_start = ctx->current; ret = func(parent, ctx); if (ret) return log_msg_ret("func", ret); /* Add the item to the internal list */ if (type != TYPE_NONE) { - ret = acpi_add_item(ctx, parent, type, start); + ret = acpi_add_item(ctx, parent, type, ctx->tab_start); if (ret) return log_msg_ret("add", ret); } |