Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
54 lines
1.4 KiB
C
54 lines
1.4 KiB
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
* Author: Sudeep Holla <sudeep.holla@arm.com>
|
|
* Copyright 2022 Arm Limited
|
|
*/
|
|
#include <linux/kernel.h>
|
|
#include <linux/acpi.h>
|
|
#include <linux/completion.h>
|
|
#include <linux/idr.h>
|
|
#include <linux/io.h>
|
|
|
|
static struct acpi_ffh_info ffh_ctx;
|
|
|
|
int __weak acpi_ffh_address_space_arch_setup(void *handler_ctxt,
|
|
void **region_ctxt)
|
|
{
|
|
return -EOPNOTSUPP;
|
|
}
|
|
|
|
int __weak acpi_ffh_address_space_arch_handler(acpi_integer *value,
|
|
void *region_context)
|
|
{
|
|
return -EOPNOTSUPP;
|
|
}
|
|
|
|
static acpi_status
|
|
acpi_ffh_address_space_setup(acpi_handle region_handle, u32 function,
|
|
void *handler_context, void **region_context)
|
|
{
|
|
return acpi_ffh_address_space_arch_setup(handler_context,
|
|
region_context);
|
|
}
|
|
|
|
static acpi_status
|
|
acpi_ffh_address_space_handler(u32 function, acpi_physical_address addr,
|
|
u32 bits, acpi_integer *value,
|
|
void *handler_context, void *region_context)
|
|
{
|
|
return acpi_ffh_address_space_arch_handler(value, region_context);
|
|
}
|
|
|
|
void __init acpi_init_ffh(void)
|
|
{
|
|
acpi_status status;
|
|
|
|
status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
|
|
ACPI_ADR_SPACE_FIXED_HARDWARE,
|
|
&acpi_ffh_address_space_handler,
|
|
&acpi_ffh_address_space_setup,
|
|
&ffh_ctx);
|
|
if (ACPI_FAILURE(status))
|
|
pr_alert("OperationRegion handler could not be installed\n");
|
|
}
|