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

Submitted by Bin Meng on March 16, 2017, 2:26 p.m.

Details

Message ID 1489674408-17498-18-git-send-email-bmeng.cn@gmail.com
State Superseded
Delegated to: Bin Meng
Headers show

Commit Message

Bin Meng March 16, 2017, 2:26 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>
---

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

Comments

Simon Glass March 21, 2017, 8:07 p.m.
Hi Bin,

On 16 March 2017 at 08:26, 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>
> ---
>
>  arch/x86/include/asm/acpi_table.h | 1 +
>  arch/x86/lib/acpi_table.c         | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)

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

But please can you add a function comment?

>
> diff --git a/arch/x86/include/asm/acpi_table.h b/arch/x86/include/asm/acpi_table.h
> index 6cadd90..3e11362 100644
> --- a/arch/x86/include/asm/acpi_table.h
> +++ b/arch/x86/include/asm/acpi_table.h
> @@ -316,5 +316,6 @@ 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);
> +void enter_acpi_mode(int pm1_cnt);
>  ulong write_acpi_tables(ulong start);
>  void *acpi_find_wakeup_vector(void);
> 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);
>
> --
> 2.9.2
>

Regards,
Simon

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 6cadd90..3e11362 100644
--- a/arch/x86/include/asm/acpi_table.h
+++ b/arch/x86/include/asm/acpi_table.h
@@ -316,5 +316,6 @@  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);
+void enter_acpi_mode(int pm1_cnt);
 ulong write_acpi_tables(ulong start);
 void *acpi_find_wakeup_vector(void);
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);