]> git.hungrycats.org Git - linux/commitdiff
[ACPI] allow config to specify custom DSDT (Ulf Dambacher)
authorLen Brown <len.brown@intel.com>
Wed, 1 Sep 2004 18:16:57 +0000 (14:16 -0400)
committerLen Brown <lenb@dhcppc3.>
Wed, 1 Sep 2004 18:16:57 +0000 (14:16 -0400)
drivers/acpi/Kconfig
drivers/acpi/osl.c

index a742764dbe6b64de3fcf7c7204c8279dba1662c2..7ff573b0bfabbbec164c4f996836ca7f3cdb34cd 100644 (file)
@@ -204,6 +204,23 @@ config ACPI_TOSHIBA
          If you have a legacy free Toshiba laptop (such as the Libretto L1
          series), say Y.
 
+config ACPI_CUSTOM_DSDT
+       bool "Include Custom DSDT"
+       depends on X86
+       depends on ACPI_INTERPRETER
+       default n 
+       help
+         Thist option is to load a custom ACPI DSDT
+         If you don't know what that is, say N.
+
+config ACPI_CUSTOM_DSDT_FILE
+       string "Custom DSDT Table file to include"
+       depends on ACPI_CUSTOM_DSDT
+       default ""
+       help
+         Enter the full path name to the file wich includes the AmlCode declaration.
+
+
 config ACPI_DEBUG
        bool "Debug Statements"
        depends on ACPI_INTERPRETER
index 22e7094bbe0831c2bbb03d1f4b8a447b39472b15..4348dfada51ac53eb7dc9053cb01869cc6e2e1ab 100644 (file)
@@ -55,6 +55,9 @@ struct acpi_os_dpc
     void                   *context;
 };
 
+#ifdef CONFIG_ACPI_CUSTOM_DSDT
+#include CONFIG_ACPI_CUSTOM_DSDT_FILE
+#endif
 
 #ifdef ENABLE_DEBUGGER
 #include <linux/kdb.h>
@@ -241,7 +244,14 @@ acpi_os_table_override (struct acpi_table_header *existing_table,
        if (!existing_table || !new_table)
                return AE_BAD_PARAMETER;
 
+#ifdef CONFIG_ACPI_CUSTOM_DSDT
+       if (strncmp(existing_table->signature, "DSDT", 4) == 0)
+               *new_table = (struct acpi_table_header*)AmlCode;
+       else
+               *new_table = NULL;
+#else
        *new_table = NULL;
+#endif
        return AE_OK;
 }