xref: /linux/arch/loongarch/include/asm/acpi.h (revision 2da68a77)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Author: Jianmin Lv <lvjianmin@loongson.cn>
4  *         Huacai Chen <chenhuacai@loongson.cn>
5  * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
6  */
7 
8 #ifndef _ASM_LOONGARCH_ACPI_H
9 #define _ASM_LOONGARCH_ACPI_H
10 
11 #ifdef CONFIG_ACPI
12 extern int acpi_strict;
13 extern int acpi_disabled;
14 extern int acpi_pci_disabled;
15 extern int acpi_noirq;
16 
17 #define acpi_os_ioremap acpi_os_ioremap
18 void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
19 
20 static inline void disable_acpi(void)
21 {
22 	acpi_disabled = 1;
23 	acpi_pci_disabled = 1;
24 	acpi_noirq = 1;
25 }
26 
27 static inline bool acpi_has_cpu_in_madt(void)
28 {
29 	return true;
30 }
31 
32 extern struct list_head acpi_wakeup_device_list;
33 
34 #endif /* !CONFIG_ACPI */
35 
36 #define ACPI_TABLE_UPGRADE_MAX_PHYS ARCH_LOW_ADDRESS_LIMIT
37 
38 #endif /* _ASM_LOONGARCH_ACPI_H */
39