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 extern int loongarch_acpi_suspend(void); 39 extern int (*acpi_suspend_lowlevel)(void); 40 extern void loongarch_suspend_enter(void); 41 42 static inline unsigned long acpi_get_wakeup_address(void) 43 { 44 #ifdef CONFIG_SUSPEND 45 extern void loongarch_wakeup_start(void); 46 return (unsigned long)loongarch_wakeup_start; 47 #endif 48 return 0UL; 49 } 50 51 #endif /* _ASM_LOONGARCH_ACPI_H */ 52