[U-Boot,v2,16/22] x86: acpi: Make enter_acpi_mode() public

Submitted by Bin Meng on April 21, 2017, 2:24 p.m.

Details

Message ID 1492784689-15701-17-git-send-email-bmeng.cn@gmail.com
State Accepted
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng April 21, 2017, 2:24 p.m.
enter_acpi_mode() is useful on other boot path like S3 resume, so
make it public.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>

---

Changes in v2:
- add a function comment block for enter_acpi_mode()

 arch/x86/include/asm/acpi_table.h | 9 +++++++++
 arch/x86/lib/acpi_table.c         | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

Comments

Bin Meng April 26, 2017, 7:35 a.m.
On Fri, Apr 21, 2017 at 10:24 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> enter_acpi_mode() is useful on other boot path like S3 resume, so
> make it public.
>
> Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
>
> ---
>
> Changes in v2:
> - add a function comment block for enter_acpi_mode()
>
>  arch/x86/include/asm/acpi_table.h | 9 +++++++++
>  arch/x86/lib/acpi_table.c         | 2 +-
>  2 files changed, 10 insertions(+), 1 deletion(-)
>

applied to u-boot-x86/next, thanks!

Patch hide | download patch | download mbox

diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
index 20b906c..e96409b 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -316,6 +316,15 @@  int acpi_create_madt_lapic_nmi(struct acpi_madt_lapic_nmi *lapic_nmi,
 			       u8 cpu, u16 flags, u8 lint);
 u32 acpi_fill_madt(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);
 
 /**
diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c
index 8be8120..87a71ca 100644
--- a/arch/x86/lib/acpi_table.c
+++ b/arch/x86/lib/acpi_table.c
@@ -304,7 +304,7 @@  static void acpi_create_mcfg(struct acpi_mcfg *mcfg)
 	header->checksum = table_compute_checksum((void *)mcfg, header->length);
 }
 
-static void enter_acpi_mode(int pm1_cnt)
+void enter_acpi_mode(int pm1_cnt)
 {
 	u16 val = inw(pm1_cnt);