1 // SPDX-License-Identifier: GPL-2.0-only
3 * Author: Sudeep Holla <sudeep.holla@arm.com>
4 * Copyright 2022 Arm Limited
6 #include <linux/kernel.h>
7 #include <linux/acpi.h>
8 #include <linux/completion.h>
12 static struct acpi_ffh_info ffh_ctx;
14 int __weak acpi_ffh_address_space_arch_setup(void *handler_ctxt,
20 int __weak acpi_ffh_address_space_arch_handler(acpi_integer *value,
27 acpi_ffh_address_space_setup(acpi_handle region_handle, u32 function,
28 void *handler_context, void **region_context)
30 return acpi_ffh_address_space_arch_setup(handler_context,
35 acpi_ffh_address_space_handler(u32 function, acpi_physical_address addr,
36 u32 bits, acpi_integer *value,
37 void *handler_context, void *region_context)
39 return acpi_ffh_address_space_arch_handler(value, region_context);
42 void __init acpi_init_ffh(void)
46 status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
47 ACPI_ADR_SPACE_FIXED_HARDWARE,
48 &acpi_ffh_address_space_handler,
49 &acpi_ffh_address_space_setup,
51 if (ACPI_FAILURE(status))
52 pr_alert("OperationRegion handler could not be installed\n");