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>
diff --git a/include/dm/acpi.h b/include/dm/acpi.h
index e8b0336..e6951b6 100644
--- a/include/dm/acpi.h
+++ b/include/dm/acpi.h
@@ -226,6 +226,15 @@
*/
int acpi_get_path(const struct udevice *dev, char *out_path, int maxlen);
+/**
+ * acpi_reset_items() - Reset the list of ACPI items to empty
+ *
+ * This list keeps track of DSDT and SSDT items that are generated
+ * programmatically. The 'acpi items' command shows the list. Use this function
+ * to empty the list, before writing new items.
+ */
+void acpi_reset_items(void);
+
#endif /* __ACPI__ */
#endif