mirror of
https://github.com/torvalds/linux.git
synced 2026-11-25 07:52:34 +00:00
The acpi_os_ioremap() function may be used to map normal RAM or IO regions. The current implementation simply uses ioremap_cache(). This will work for some architectures, but arm64 ioremap_cache() cannot be used to map IO regions which don't support caching. So for arm64, use ioremap() for non-RAM regions. CC: Rafael J Wysocki <[email protected]> CC: Catalin Marinas <[email protected]> Tested-by: Robert Richter <[email protected]> Tested-by: Timur Tabi <[email protected]> Acked-by: Robert Richter <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Grant Likely <[email protected]> Signed-off-by: Mark Salter <[email protected]> Signed-off-by: Hanjun Guo <[email protected]> Signed-off-by: Will Deacon <[email protected]>
25 lines
647 B
C
25 lines
647 B
C
#ifndef _ACPI_IO_H_
|
|
#define _ACPI_IO_H_
|
|
|
|
#include <linux/io.h>
|
|
|
|
#include <asm/acpi.h>
|
|
|
|
#ifndef acpi_os_ioremap
|
|
static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
|
|
acpi_size size)
|
|
{
|
|
return ioremap_cache(phys, size);
|
|
}
|
|
#endif
|
|
|
|
void __iomem *__init_refok
|
|
acpi_os_map_iomem(acpi_physical_address phys, acpi_size size);
|
|
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size);
|
|
void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size);
|
|
|
|
int acpi_os_map_generic_address(struct acpi_generic_address *addr);
|
|
void acpi_os_unmap_generic_address(struct acpi_generic_address *addr);
|
|
|
|
#endif
|