From 8adcc0af043fd7e364f49492d9512a1ef7a2864e Mon Sep 17 00:00:00 2001 From: Bob Moore Date: Tue, 30 Dec 2008 11:11:57 +0800 Subject: [PATCH] --- yaml --- r: 128051 b: refs/heads/master c: d3fd902d1ed43aebfc407c08d7ce86495604124c h: refs/heads/master i: 128049: 00044ba96a2e4d6a1051fb6e565862d73e30817c 128047: 21d9023fd86038ad2d5cd7b4384eab535be55958 v: v3 --- [refs] | 2 +- trunk/drivers/acpi/hardware/hwxface.c | 37 +++++++++++++++++++++++++++ trunk/include/acpi/acpixf.h | 2 ++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 9d0b09c2883b..caa71e343564 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7db5d82d0278b506441ab6025f0c6ce2f2aa3019 +refs/heads/master: d3fd902d1ed43aebfc407c08d7ce86495604124c diff --git a/trunk/drivers/acpi/hardware/hwxface.c b/trunk/drivers/acpi/hardware/hwxface.c index b6244a0fcf4c..0601ed711f30 100644 --- a/trunk/drivers/acpi/hardware/hwxface.c +++ b/trunk/drivers/acpi/hardware/hwxface.c @@ -48,6 +48,43 @@ #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwxface") +/****************************************************************************** + * + * FUNCTION: acpi_reset + * + * PARAMETERS: None + * + * RETURN: Status + * + * DESCRIPTION: Set reset register in memory or IO space. Note: Does not + * support reset register in PCI config space, this must be + * handled separately. + * + ******************************************************************************/ +acpi_status acpi_reset(void) +{ + struct acpi_generic_address *reset_reg; + acpi_status status; + + ACPI_FUNCTION_TRACE(acpi_reset); + + reset_reg = &acpi_gbl_FADT.reset_register; + + /* Check if the reset register is supported */ + + if (!(acpi_gbl_FADT.flags & ACPI_FADT_RESET_REGISTER) || + !reset_reg->address) { + return_ACPI_STATUS(AE_NOT_EXIST); + } + + /* Write the reset value to the reset register */ + + status = acpi_write(acpi_gbl_FADT.reset_value, reset_reg); + return_ACPI_STATUS(status); +} + +ACPI_EXPORT_SYMBOL(acpi_reset) + /****************************************************************************** * * FUNCTION: acpi_read diff --git a/trunk/include/acpi/acpixf.h b/trunk/include/acpi/acpixf.h index 030aeb556e6b..b3bceadf6f75 100644 --- a/trunk/include/acpi/acpixf.h +++ b/trunk/include/acpi/acpixf.h @@ -322,6 +322,8 @@ acpi_resource_to_address64(struct acpi_resource *resource, /* * Hardware (ACPI device) interfaces */ +acpi_status acpi_reset(void); + acpi_status acpi_get_register(u32 register_id, u32 * return_value); acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value);