summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2018-07-18 21:42:15 -0700
committerBin Meng <bmeng.cn@gmail.com>2018-07-20 09:33:22 +0800
commita0609a8d19d4a9a86572fffb7cb8a3661fffbcf7 (patch)
tree3f587887376b079435794f85c80d2ba984224100 /arch/x86/include/asm
parentb37b7b2063e02718970ca1882a4522ccbe1106e9 (diff)
x86: acpi: Move APIs unrelated to ACPI tables generation to a separate library
acpi_find_fadt(), acpi_find_wakeup_vector() and enter_acpi_mode() are something unrelated to ACPI tables generation. Move these to a separate library. This also fixes several style issues reported by checkpatch in the original codes. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/acpi.h41
-rw-r--r--arch/x86/include/asm/acpi_table.h28
2 files changed, 41 insertions, 28 deletions
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
new file mode 100644
index 00000000000..4475d046e8c
--- /dev/null
+++ b/arch/x86/include/asm/acpi.h
@@ -0,0 +1,41 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
+ */
+
+#ifndef __ASM_ACPI_H__
+#define __ASM_ACPI_H__
+
+struct acpi_fadt;
+
+/**
+ * acpi_find_fadt() - find ACPI FADT table in the system memory
+ *
+ * This routine parses the ACPI table to locate the ACPI FADT table.
+ *
+ * @return: a pointer to the ACPI FADT table in the system memory
+ */
+struct acpi_fadt *acpi_find_fadt(void);
+
+/**
+ * acpi_find_wakeup_vector() - find OS installed wake up vector address
+ *
+ * This routine parses the ACPI table to locate the wake up vector installed
+ * by the OS previously.
+ *
+ * @fadt: a pointer to the ACPI FADT table in the system memory
+ * @return: wake up vector address installed by the OS
+ */
+void *acpi_find_wakeup_vector(struct acpi_fadt *fadt);
+
+/**
+ * enter_acpi_mode() - enter into ACPI mode
+ *
+ * This programs the ACPI-defined PM1_CNT register to enable SCI interrupt
+ * so that the whole system swiches to ACPI mode.
+ *
+ * @pm1_cnt: PM1_CNT register I/O address
+ */
+void enter_acpi_mode(int pm1_cnt);
+
+#endif /* __ASM_ACPI_H__ */
diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index 239bcdc576e..dd516df97f4 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -317,15 +317,6 @@ int acpi_create_mcfg_mmconfig(struct acpi_mcfg_mmconfig *mmconfig, u32 base,
u16 seg_nr, u8 start, u8 end);
u32 acpi_fill_mcfg(u32 current);
void acpi_create_gnvs(struct acpi_global_nvs *gnvs);
-/**
- * enter_acpi_mode() - enter into ACPI mode
- *
- * This programs the ACPI-defined PM1_CNT register to enable SCI interrupt
- * so that the whole system swiches to ACPI mode.
- *
- * @pm1_cnt: PM1_CNT register I/O address
- */
-void enter_acpi_mode(int pm1_cnt);
ulong write_acpi_tables(ulong start);
/**
@@ -336,22 +327,3 @@ ulong write_acpi_tables(ulong start);
* @return: ACPI RSDP table address
*/
ulong acpi_get_rsdp_addr(void);
-
-/**
- * acpi_find_fadt() - find ACPI FADT table in the sytem memory
- *
- * This routine parses the ACPI table to locate the ACPI FADT table.
- *
- * @return: a pointer to the ACPI FADT table in the system memory
- */
-struct acpi_fadt *acpi_find_fadt(void);
-
-/**
- * acpi_find_wakeup_vector() - find OS installed wake up vector address
- *
- * This routine parses the ACPI table to locate the wake up vector installed
- * by the OS previously.
- *
- * @return: wake up vector address installed by the OS
- */
-void *acpi_find_wakeup_vector(struct acpi_fadt *);