diff options
author | Zhao Yakui <yakui.zhao@intel.com> | 2008-08-11 22:40:10 -0400 |
---|---|---|
committer | Andi Kleen <ak@linux.intel.com> | 2008-08-14 21:12:27 -0400 |
commit | 2500822bf4eb0179ef80e5b072c1e0fa83037381 (patch) | |
tree | 33412466417282b2b1cd251e80aa8bc1a050b490 /drivers/acpi | |
parent | b635acec48bcaa9183fcbf4e3955616b0d4119b5 (diff) |
ACPI : Add the EC dmi table to fix the incorrect ECDT table
On some ASUS laptops the ECDT gives the incorrect command/status & Data I/O
register address.
AK: it seems like the command/data addresses are exchanged.
In such case it will cause that EC device can't be
initialized correctly.
To add the EC dmi table is to fix this issue. If the laptop falls into the
EC dmi table, the EC command/data I/O address will be fixed.
AK: Add comments describing this better
http://bugzilla.kernel.org/show_bug.cgi?id=9399
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
tested-by : Jan Kasprzak <kas@fi.muni.cz>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ec.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5622aee996b2..76784ae7e6a1 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -110,6 +110,31 @@ static struct acpi_ec { | |||
110 | u8 handlers_installed; | 110 | u8 handlers_installed; |
111 | } *boot_ec, *first_ec; | 111 | } *boot_ec, *first_ec; |
112 | 112 | ||
113 | /* | ||
114 | * Some Asus system have exchanged ECDT data/command IO addresses. | ||
115 | */ | ||
116 | static int print_ecdt_error(const struct dmi_system_id *id) | ||
117 | { | ||
118 | printk(KERN_NOTICE PREFIX "%s detected - " | ||
119 | "ECDT has exchanged control/data I/O address\n", | ||
120 | id->ident); | ||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | static struct dmi_system_id __cpuinitdata ec_dmi_table[] = { | ||
125 | { | ||
126 | print_ecdt_error, "Asus L4R", { | ||
127 | DMI_MATCH(DMI_BIOS_VERSION, "1008.006"), | ||
128 | DMI_MATCH(DMI_PRODUCT_NAME, "L4R"), | ||
129 | DMI_MATCH(DMI_BOARD_NAME, "L4R") }, NULL}, | ||
130 | { | ||
131 | print_ecdt_error, "Asus M6R", { | ||
132 | DMI_MATCH(DMI_BIOS_VERSION, "0207"), | ||
133 | DMI_MATCH(DMI_PRODUCT_NAME, "M6R"), | ||
134 | DMI_MATCH(DMI_BOARD_NAME, "M6R") }, NULL}, | ||
135 | {}, | ||
136 | }; | ||
137 | |||
113 | /* -------------------------------------------------------------------------- | 138 | /* -------------------------------------------------------------------------- |
114 | Transaction Management | 139 | Transaction Management |
115 | -------------------------------------------------------------------------- */ | 140 | -------------------------------------------------------------------------- */ |
@@ -911,6 +936,15 @@ int __init acpi_ec_ecdt_probe(void) | |||
911 | pr_info(PREFIX "EC description table is found, configuring boot EC\n"); | 936 | pr_info(PREFIX "EC description table is found, configuring boot EC\n"); |
912 | boot_ec->command_addr = ecdt_ptr->control.address; | 937 | boot_ec->command_addr = ecdt_ptr->control.address; |
913 | boot_ec->data_addr = ecdt_ptr->data.address; | 938 | boot_ec->data_addr = ecdt_ptr->data.address; |
939 | if (dmi_check_system(ec_dmi_table)) { | ||
940 | /* | ||
941 | * If the board falls into ec_dmi_table, it means | ||
942 | * that ECDT table gives the incorrect command/status | ||
943 | * & data I/O address. Just fix it. | ||
944 | */ | ||
945 | boot_ec->data_addr = ecdt_ptr->control.address; | ||
946 | boot_ec->command_addr = ecdt_ptr->data.address; | ||
947 | } | ||
914 | boot_ec->gpe = ecdt_ptr->gpe; | 948 | boot_ec->gpe = ecdt_ptr->gpe; |
915 | boot_ec->handle = ACPI_ROOT_OBJECT; | 949 | boot_ec->handle = ACPI_ROOT_OBJECT; |
916 | acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle); | 950 | acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle); |