From: Len Brown <lenb@kernel.org>
To: linux-acpi@vger.kernel.org
Cc: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>,
Len Brown <len.brown@intel.com>
Subject: [PATCH 13/22] ACPI: EC: "Fake ECDT" workaround is not needed any longer.
Date: Fri, 9 Mar 2007 23:00:50 -0500 [thread overview]
Message-ID: <1173499271658-git-send-email-lenb@kernel.org> (raw)
Message-ID: <94418415a62ec4c88109385d8663e56aac54dfd6.1173498656.git.len.brown@intel.com> (raw)
In-Reply-To: <11734992592550-git-send-email-lenb@kernel.org>
In-Reply-To: <941b1971a405f95537bc6f9a738e737eb2186e45.1173498647.git.len.brown@intel.com>
From: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
drivers/acpi/ec.c | 81 -----------------------------------------------------
1 files changed, 0 insertions(+), 81 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 0e06ba8..5999abd 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -805,74 +805,6 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
return 0;
}
-static acpi_status __init
-acpi_fake_ecdt_callback(acpi_handle handle,
- u32 Level, void *context, void **retval)
-{
- acpi_status status;
-
- mutex_init(&ec_ecdt->lock);
- atomic_set(&ec->event_count, 1);
- if (acpi_ec_mode == EC_INTR) {
- init_waitqueue_head(&ec_ecdt->wait);
- }
- status = acpi_walk_resources(handle, METHOD_NAME__CRS,
- acpi_ec_io_ports, ec_ecdt);
- if (ACPI_FAILURE(status))
- return status;
-
- ec_ecdt->uid = -1;
- acpi_evaluate_integer(handle, "_UID", NULL, &ec_ecdt->uid);
-
- status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec_ecdt->gpe);
- if (ACPI_FAILURE(status))
- return status;
- ec_ecdt->handle = handle;
-
- ACPI_DEBUG_PRINT((ACPI_DB_INFO, "GPE=0x%02lx, ports=0x%2lx, 0x%2lx",
- ec_ecdt->gpe, ec_ecdt->command_addr,
- ec_ecdt->data_addr));
-
- return AE_CTRL_TERMINATE;
-}
-
-/*
- * Some BIOS (such as some from Gateway laptops) access EC region very early
- * such as in BAT0._INI or EC._INI before an EC device is found and
- * do not provide an ECDT. According to ACPI spec, ECDT isn't mandatorily
- * required, but if EC regison is accessed early, it is required.
- * The routine tries to workaround the BIOS bug by pre-scan EC device
- * It assumes that _CRS, _HID, _GPE, _UID methods of EC don't touch any
- * op region (since _REG isn't invoked yet). The assumption is true for
- * all systems found.
- */
-static int __init acpi_ec_fake_ecdt(void)
-{
- acpi_status status;
- int ret = 0;
-
- ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Try to make an fake ECDT"));
-
- ec_ecdt = kzalloc(sizeof(struct acpi_ec), GFP_KERNEL);
- if (!ec_ecdt) {
- ret = -ENOMEM;
- goto error;
- }
-
- status = acpi_get_devices(ACPI_EC_HID,
- acpi_fake_ecdt_callback, NULL, NULL);
- if (ACPI_FAILURE(status)) {
- kfree(ec_ecdt);
- ec_ecdt = NULL;
- ret = -ENODEV;
- ACPI_EXCEPTION((AE_INFO, status, "Can't make an fake ECDT"));
- goto error;
- }
- return 0;
- error:
- return ret;
-}
-
static int __init acpi_ec_get_real_ecdt(void)
{
acpi_status status;
@@ -916,18 +848,12 @@ static int __init acpi_ec_get_real_ecdt(void)
return -ENODEV;
}
-static int __initdata acpi_fake_ecdt_enabled;
int __init acpi_ec_ecdt_probe(void)
{
acpi_status status;
int ret;
ret = acpi_ec_get_real_ecdt();
- /* Try to make a fake ECDT */
- if (ret && acpi_fake_ecdt_enabled) {
- ret = acpi_ec_fake_ecdt();
- }
-
if (ret)
return 0;
@@ -1000,13 +926,6 @@ static void __exit acpi_ec_exit(void)
}
#endif /* 0 */
-static int __init acpi_fake_ecdt_setup(char *str)
-{
- acpi_fake_ecdt_enabled = 1;
- return 1;
-}
-
-__setup("acpi_fake_ecdt", acpi_fake_ecdt_setup);
static int __init acpi_ec_set_intr_mode(char *str)
{
int intr;
--
1.5.0.3.310.g05ef5
next prev parent reply other threads:[~2007-03-10 4:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-10 4:00 ACPI patches in test for Linux-2.6.22 Len Brown
2007-03-10 4:00 ` [PATCH 01/22] cpuidle take2: Core cpuidle infrastructure Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-15 12:31 ` Andi Kleen
2007-03-15 16:47 ` Len Brown
2007-03-15 13:13 ` Richard Hughes
2007-03-15 16:38 ` Len Brown
2007-03-15 16:42 ` Richard Hughes
2007-03-10 4:00 ` [PATCH 02/22] cpuidle take2: Hookup ACPI C-states driver with cpuidle Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 03/22] cpuidle take2: Basic documentation for cpuidle Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 04/22] ACPI: battery: make internal names consistent with battery "state" Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 05/22] ACPI: Cache battery status instead of re-evaluating AML Len Brown
2007-03-10 4:00 ` Len Brown
2007-04-19 18:23 ` Andrew Morton
2007-03-10 4:00 ` [PATCH 06/22] ACPI: battery: Lindent Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 07/22] cpuidle: build fix for !CPU_IDLE Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 08/22] cpu_idle: fix build break Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 09/22] cpuidle: make code static Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 10/22] cpuidle: ladder does not depend on ACPI Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 11/22] ACPI: EC: Don't use Global Lock if not asked to do so Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 14:12 ` Sanjoy Mahajan
2007-03-10 4:00 ` [PATCH 12/22] ACPI: EC: Make EC to initialize first in ACPI Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` Len Brown [this message]
2007-03-10 4:00 ` [PATCH 13/22] ACPI: EC: "Fake ECDT" workaround is not needed any longer Len Brown
2007-03-10 4:00 ` [PATCH 14/22] ACPI: EC: enable burst functionality in EC Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 15/22] ACPI: EC: Remove casts to/from void* from ec.c Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 16/22] ACPI: EC: Put install handlers into separate function Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 17/22] ACPI: EC: Clean ECDT and namespace parsing Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 18/22] ACPI: EC: Rename ec_ecdt to more informative boot_ec Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 19/22] ACPI: EC: first_ec is better to be acpi_ec than acpi_device Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 20/22] ACPI: EC: Cleanup of EC initialization Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-10 4:00 ` [PATCH 21/22] ACPI: EC: Block queries until EC is fully initialized Len Brown
2007-03-10 4:00 ` Len Brown
2007-03-16 17:58 ` ACPI patches in test for Linux-2.6.22 Sergio Monteiro Basto
2007-03-16 18:03 ` Alexey Starikovskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1173499271658-git-send-email-lenb@kernel.org \
--to=lenb@kernel.org \
--cc=alexey.y.starikovskiy@intel.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.