diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-04 19:57:33 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-11-06 04:51:31 +0300 |
commit | 18434aec1b69d8490cb23ef35b2f39cf1784d1d0 (patch) | |
tree | 097c9ba2c28a6b825ecccff390eafd00ffc40795 /drivers/core/acpi.c | |
parent | 01e3c9d2ecbb532ab98da46ceebe8507b6bceec8 (diff) | |
download | u-boot-18434aec1b69d8490cb23ef35b2f39cf1784d1d0.tar.xz |
acpi: Don't reset the tables with every new generation
At present if SSDT and DSDT code is created, only the latter is retained
for examination by the 'acpi items' command. Fix this by only resetting
the list when explicitly requested.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/core/acpi.c')
-rw-r--r-- | drivers/core/acpi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/core/acpi.c b/drivers/core/acpi.c index 7fe93992b5..63a791f335 100644 --- a/drivers/core/acpi.c +++ b/drivers/core/acpi.c @@ -268,8 +268,7 @@ int acpi_recurse_method(struct acpi_ctx *ctx, struct udevice *parent, if (func) { void *start = ctx->current; - log_debug("\n"); - log_debug("- %s %p\n", parent->name, func); + log_debug("- method %d, %s %p\n", method, parent->name, func); ret = device_ofdata_to_platdata(parent); if (ret) return log_msg_ret("ofdata", ret); @@ -299,7 +298,6 @@ int acpi_fill_ssdt(struct acpi_ctx *ctx) int ret; log_debug("Writing SSDT tables\n"); - item_count = 0; ret = acpi_recurse_method(ctx, dm_root(), METHOD_FILL_SSDT, TYPE_SSDT); log_debug("Writing SSDT finished, err=%d\n", ret); ret = sort_acpi_item_type(ctx, start, TYPE_SSDT); @@ -315,7 +313,6 @@ int acpi_inject_dsdt(struct acpi_ctx *ctx) int ret; log_debug("Writing DSDT tables\n"); - item_count = 0; ret = acpi_recurse_method(ctx, dm_root(), METHOD_INJECT_DSDT, TYPE_DSDT); log_debug("Writing DSDT finished, err=%d\n", ret); @@ -326,6 +323,11 @@ int acpi_inject_dsdt(struct acpi_ctx *ctx) return ret; } +void acpi_reset_items(void) +{ + item_count = 0; +} + int acpi_write_dev_tables(struct acpi_ctx *ctx) { int ret; |