Bin Meng | ac63025 | 2018-07-18 21:42:15 -0700 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com> |
| 4 | */ |
| 5 | |
| 6 | #ifndef __ASM_ACPI_H__ |
| 7 | #define __ASM_ACPI_H__ |
| 8 | |
| 9 | struct acpi_fadt; |
| 10 | |
| 11 | /** |
| 12 | * acpi_find_fadt() - find ACPI FADT table in the system memory |
| 13 | * |
| 14 | * This routine parses the ACPI table to locate the ACPI FADT table. |
| 15 | * |
| 16 | * @return: a pointer to the ACPI FADT table in the system memory |
| 17 | */ |
| 18 | struct acpi_fadt *acpi_find_fadt(void); |
| 19 | |
| 20 | /** |
| 21 | * acpi_find_wakeup_vector() - find OS installed wake up vector address |
| 22 | * |
| 23 | * This routine parses the ACPI table to locate the wake up vector installed |
| 24 | * by the OS previously. |
| 25 | * |
| 26 | * @fadt: a pointer to the ACPI FADT table in the system memory |
| 27 | * @return: wake up vector address installed by the OS |
| 28 | */ |
| 29 | void *acpi_find_wakeup_vector(struct acpi_fadt *fadt); |
| 30 | |
| 31 | /** |
| 32 | * enter_acpi_mode() - enter into ACPI mode |
| 33 | * |
| 34 | * This programs the ACPI-defined PM1_CNT register to enable SCI interrupt |
| 35 | * so that the whole system swiches to ACPI mode. |
| 36 | * |
| 37 | * @pm1_cnt: PM1_CNT register I/O address |
| 38 | */ |
| 39 | void enter_acpi_mode(int pm1_cnt); |
| 40 | |
| 41 | #endif /* __ASM_ACPI_H__ */ |