|
Lines 823-840
int __init acpi_ec_ecdt_probe(void)
Link Here
|
| 823 |
/* |
823 |
/* |
| 824 |
* Generate a boot ec context |
824 |
* Generate a boot ec context |
| 825 |
*/ |
825 |
*/ |
| 826 |
|
|
|
| 827 |
status = acpi_get_table(ACPI_SIG_ECDT, 1, |
826 |
status = acpi_get_table(ACPI_SIG_ECDT, 1, |
| 828 |
(struct acpi_table_header **)&ecdt_ptr); |
827 |
(struct acpi_table_header **)&ecdt_ptr); |
| 829 |
if (ACPI_FAILURE(status)) |
828 |
if (ACPI_SUCCESS(status)) { |
| 830 |
goto error; |
829 |
printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n\n"); |
| 831 |
|
830 |
boot_ec->command_addr = ecdt_ptr->control.address; |
| 832 |
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found ECDT")); |
831 |
boot_ec->data_addr = ecdt_ptr->data.address; |
| 833 |
|
832 |
boot_ec->gpe = ecdt_ptr->gpe; |
| 834 |
boot_ec->command_addr = ecdt_ptr->control.address; |
833 |
boot_ec->handle = ACPI_ROOT_OBJECT; |
| 835 |
boot_ec->data_addr = ecdt_ptr->data.address; |
834 |
} else { |
| 836 |
boot_ec->gpe = ecdt_ptr->gpe; |
835 |
acpi_handle *x; |
| 837 |
boot_ec->handle = ACPI_ROOT_OBJECT; |
836 |
printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); |
|
|
837 |
status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, |
| 838 |
boot_ec, NULL); |
| 839 |
/* Check that acpi_get_devices actually find something */ |
| 840 |
if (ACPI_FAILURE(status) || !boot_ec->handle) |
| 841 |
goto error; |
| 842 |
if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) |
| 843 |
goto error; |
| 844 |
} |
| 838 |
|
845 |
|
| 839 |
ret = ec_install_handlers(boot_ec); |
846 |
ret = ec_install_handlers(boot_ec); |
| 840 |
if (!ret) { |
847 |
if (!ret) { |