diff mbox series

acpi: Move acpi_write_tables() to a generic header

Message ID 20220129213052.531779-1-sjg@chromium.org
State Accepted
Commit aafb31fc953aac0af89e44a1e4a841803141768d
Delegated to: Tom Rini
Headers show
Series acpi: Move acpi_write_tables() to a generic header | expand

Commit Message

Simon Glass Jan. 29, 2022, 9:30 p.m. UTC
This function is used by both x86 and sandbox. Put it in a common header
file.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/include/asm/acpi_table.h |  2 +-
 arch/x86/include/asm/acpi_table.h     |  2 --
 include/acpi/acpi_table.h             | 10 ++++++++++
 3 files changed, 11 insertions(+), 3 deletions(-)

Comments

Tom Rini Feb. 11, 2022, 5:06 p.m. UTC | #1
On Sat, Jan 29, 2022 at 02:30:52PM -0700, Simon Glass wrote:

> This function is used by both x86 and sandbox. Put it in a common header
> file.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/sandbox/include/asm/acpi_table.h b/arch/sandbox/include/asm/acpi_table.h
index ae17f6c5197..cb10eb542b2 100644
--- a/arch/sandbox/include/asm/acpi_table.h
+++ b/arch/sandbox/include/asm/acpi_table.h
@@ -6,6 +6,6 @@ 
 #ifndef __ASM_ACPI_TABLE_H__
 #define __ASM_ACPI_TABLE_H__
 
-ulong write_acpi_tables(ulong start);
+/* Empty for now, this file is required by acpi/acpi_table.h */
 
 #endif /* __ASM_ACPI_TABLE_H__ */
diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index 0d07f7cad87..50dcf0e3ca2 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -65,8 +65,6 @@  int acpi_write_dbg2_pci_uart(struct acpi_ctx *ctx, struct udevice *dev,
  */
 int acpi_create_gnvs(struct acpi_global_nvs *gnvs);
 
-ulong write_acpi_tables(ulong start);
-
 /**
  * acpi_get_rsdp_addr() - get ACPI RSDP table address
  *
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index c98c874fe40..4030d25c66a 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -913,6 +913,16 @@  void acpi_fill_header(struct acpi_table_header *header, char *signature);
  */
 int acpi_fill_csrt(struct acpi_ctx *ctx);
 
+/**
+ * write_acpi_tables() - Write out the ACPI tables
+ *
+ * This writes all ACPI tables to the given address
+ *
+ * @start: Start address for the tables
+ * @return address of end of tables, where the next tables can be written
+ */
+ulong write_acpi_tables(ulong start);
+
 #endif /* !__ACPI__*/
 
 #include <asm/acpi_table.h>