]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/utilities/utxface.c
Merge branch 'v28-range-hrtimers-for-linus-v2' of git://git.kernel.org/pub/scm/linux...
[linux-2.6-omap-h63xx.git] / drivers / acpi / utilities / utxface.c
index 3538f69c82a1cac6de72067d5659cdfaaaa00fa1..c198a4d40583e7f14fc0e1a545d496c118c98b96 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2006, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -49,6 +49,7 @@
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utxface")
 
+#ifndef ACPI_ASL_COMPILER
 /*******************************************************************************
  *
  * FUNCTION:    acpi_initialize_subsystem
@@ -61,12 +62,13 @@ ACPI_MODULE_NAME("utxface")
  *              called, so any early initialization belongs here.
  *
  ******************************************************************************/
-acpi_status acpi_initialize_subsystem(void)
+acpi_status __init acpi_initialize_subsystem(void)
 {
        acpi_status status;
 
        ACPI_FUNCTION_TRACE(acpi_initialize_subsystem);
 
+       acpi_gbl_startup_flags = ACPI_SUBSYSTEM_INITIALIZE;
        ACPI_DEBUG_EXEC(acpi_ut_init_stack_ptr_trace());
 
        /* Initialize the OS-Dependent layer */
@@ -79,7 +81,12 @@ acpi_status acpi_initialize_subsystem(void)
 
        /* Initialize all globals used by the subsystem */
 
-       acpi_ut_init_globals();
+       status = acpi_ut_init_globals();
+       if (ACPI_FAILURE(status)) {
+               ACPI_EXCEPTION((AE_INFO, status,
+                               "During initialization of globals"));
+               return_ACPI_STATUS(status);
+       }
 
        /* Create the default mutex objects */
 
@@ -107,8 +114,6 @@ acpi_status acpi_initialize_subsystem(void)
        return_ACPI_STATUS(status);
 }
 
-ACPI_EXPORT_SYMBOL(acpi_initialize_subsystem)
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_enable_subsystem
@@ -127,20 +132,6 @@ acpi_status acpi_enable_subsystem(u32 flags)
 
        ACPI_FUNCTION_TRACE(acpi_enable_subsystem);
 
-       /*
-        * We must initialize the hardware before we can enable ACPI.
-        * The values from the FADT are validated here.
-        */
-       if (!(flags & ACPI_NO_HARDWARE_INIT)) {
-               ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
-                                 "[Init] Initializing ACPI hardware\n"));
-
-               status = acpi_hw_initialize();
-               if (ACPI_FAILURE(status)) {
-                       return_ACPI_STATUS(status);
-               }
-       }
-
        /* Enable ACPI mode */
 
        if (!(flags & ACPI_NO_ACPI_ENABLE)) {
@@ -207,24 +198,6 @@ acpi_status acpi_enable_subsystem(u32 flags)
                }
        }
 
-       /*
-        * Complete the GPE initialization for the GPE blocks defined in the FADT
-        * (GPE block 0 and 1).
-        *
-        * Note1: This is where the _PRW methods are executed for the GPEs. These
-        * methods can only be executed after the SCI and Global Lock handlers are
-        * installed and initialized.
-        *
-        * Note2: Currently, there seems to be no need to run the _REG methods
-        * before execution of the _PRW methods and enabling of the GPEs.
-        */
-       if (!(flags & ACPI_NO_EVENT_INIT)) {
-               status = acpi_ev_install_fadt_gpes();
-               if (ACPI_FAILURE(status)) {
-                       return (status);
-               }
-       }
-
        return_ACPI_STATUS(status);
 }
 
@@ -294,6 +267,23 @@ acpi_status acpi_initialize_objects(u32 flags)
                }
        }
 
+       /*
+        * Complete the GPE initialization for the GPE blocks defined in the FADT
+        * (GPE block 0 and 1).
+        *
+        * Note1: This is where the _PRW methods are executed for the GPEs. These
+        * methods can only be executed after the SCI and Global Lock handlers are
+        * installed and initialized.
+        *
+        * Note2: Currently, there seems to be no need to run the _REG methods
+        * before execution of the _PRW methods and enabling of the GPEs.
+        */
+       if (!(flags & ACPI_NO_EVENT_INIT)) {
+               status = acpi_ev_install_fadt_gpes();
+               if (ACPI_FAILURE(status))
+                       return (status);
+       }
+
        /*
         * Empty the caches (delete the cached objects) on the assumption that
         * the table load filled them up more than they will be at runtime --
@@ -307,6 +297,7 @@ acpi_status acpi_initialize_objects(u32 flags)
 
 ACPI_EXPORT_SYMBOL(acpi_initialize_objects)
 
+#endif
 /*******************************************************************************
  *
  * FUNCTION:    acpi_terminate
@@ -350,7 +341,7 @@ acpi_status acpi_terminate(void)
 }
 
 ACPI_EXPORT_SYMBOL(acpi_terminate)
-
+#ifndef ACPI_ASL_COMPILER
 #ifdef ACPI_FUTURE_USAGE
 /*******************************************************************************
  *
@@ -398,7 +389,6 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer)
 {
        struct acpi_system_info *info_ptr;
        acpi_status status;
-       u32 i;
 
        ACPI_FUNCTION_TRACE(acpi_get_system_info);
 
@@ -431,9 +421,7 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer)
 
        /* Timer resolution - 24 or 32 bits  */
 
-       if (!acpi_gbl_FADT) {
-               info_ptr->timer_resolution = 0;
-       } else if (acpi_gbl_FADT->tmr_val_ext == 0) {
+       if (acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER) {
                info_ptr->timer_resolution = 24;
        } else {
                info_ptr->timer_resolution = 32;
@@ -449,13 +437,6 @@ acpi_status acpi_get_system_info(struct acpi_buffer * out_buffer)
        info_ptr->debug_layer = acpi_dbg_layer;
        info_ptr->debug_level = acpi_dbg_level;
 
-       /* Current status of the ACPI tables, per table type */
-
-       info_ptr->num_table_types = ACPI_TABLE_ID_MAX + 1;
-       for (i = 0; i < (ACPI_TABLE_ID_MAX + 1); i++) {
-               info_ptr->table_info[i].count = acpi_gbl_table_lists[i].count;
-       }
-
        return_ACPI_STATUS(AE_OK);
 }
 
@@ -493,7 +474,6 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function)
 
 ACPI_EXPORT_SYMBOL(acpi_install_initialization_handler)
 #endif                         /*  ACPI_FUTURE_USAGE  */
-
 /*****************************************************************************
  *
  * FUNCTION:    acpi_purge_cached_objects
@@ -517,3 +497,4 @@ acpi_status acpi_purge_cached_objects(void)
 }
 
 ACPI_EXPORT_SYMBOL(acpi_purge_cached_objects)
+#endif