diff options
| author | Simon Glass <[email protected]> | 2021-12-01 09:02:46 -0700 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2022-01-25 11:44:36 -0700 |
| commit | fb746fdec6d58eacd7d9323eda7ccbde9419a41e (patch) | |
| tree | 840af67c895fc5116de3e1568b03141c85408151 /drivers | |
| parent | 383bf1bc9ee21c649d04a03a19eedbffa84b7237 (diff) | |
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 <[email protected]>
Diffstat (limited to 'drivers')
| -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 e988a65ec51..5425e4d0402 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); } |
