blob: d0633fc1fc156eee7432a34481d64483a54964a6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Rafael J. Wysocki2d6d9fd2011-01-19 22:27:14 +01002#ifndef _ACPI_IO_H_
3#define _ACPI_IO_H_
4
5#include <linux/io.h>
Rafael J. Wysocki2d6d9fd2011-01-19 22:27:14 +01006
Mark Salter652261a2015-03-24 14:02:38 +00007#include <asm/acpi.h>
8
9#ifndef acpi_os_ioremap
Rafael J. Wysocki2d6d9fd2011-01-19 22:27:14 +010010static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
11 acpi_size size)
12{
13 return ioremap_cache(phys, size);
14}
Mark Salter652261a2015-03-24 14:02:38 +000015#endif
Rafael J. Wysocki2d6d9fd2011-01-19 22:27:14 +010016
Lv Zheng8d3523f2016-12-14 15:04:46 +080017extern bool acpi_permanent_mmap;
18
Fabian Frederickbd721ea2016-08-02 14:03:33 -070019void __iomem *__ref
Lv Zhenga2383172014-05-20 15:39:41 +080020acpi_os_map_iomem(acpi_physical_address phys, acpi_size size);
21void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size);
Rafael J. Wysocki13606a22011-02-08 23:38:25 +010022void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size);
23
Myron Stowe6f68c912011-11-07 16:23:34 -070024int acpi_os_map_generic_address(struct acpi_generic_address *addr);
25void acpi_os_unmap_generic_address(struct acpi_generic_address *addr);
26
Rafael J. Wysocki2d6d9fd2011-01-19 22:27:14 +010027#endif