diff options
| -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); |
