ACPICA: Restructure includes into public/private
[deliverable/linux.git] / drivers / acpi / utilities / utxface.c
index 2d496918b3cda4593d383b36cce08f18e2535253..5b27724a2749d4a160fee0badd4aacd5435b480d 100644 (file)
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2007, R. Byron Moore
+ * Copyright (C) 2000 - 2008, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  */
 
 #include <acpi/acpi.h>
+#include <acpi/accommon.h>
 #include <acpi/acevents.h>
 #include <acpi/acnamesp.h>
 #include <acpi/acdebug.h>
+#include <acpi/actables.h>
 
 #define _COMPONENT          ACPI_UTILITIES
 ACPI_MODULE_NAME("utxface")
 
+#ifndef ACPI_ASL_COMPILER
 /*******************************************************************************
  *
  * FUNCTION:    acpi_initialize_subsystem
@@ -80,7 +83,12 @@ acpi_status __init 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 */
 
@@ -141,6 +149,16 @@ acpi_status acpi_enable_subsystem(u32 flags)
                }
        }
 
+       /*
+        * Obtain a permanent mapping for the FACS. This is required for the
+        * Global Lock and the Firmware Waking Vector
+        */
+       status = acpi_tb_initialize_facs();
+       if (ACPI_FAILURE(status)) {
+               ACPI_WARNING((AE_INFO, "Could not map the FACS table"));
+               return_ACPI_STATUS(status);
+       }
+
        /*
         * Install the default op_region handlers. These are installed unless
         * other handlers have already been installed via the
@@ -192,24 +210,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);
 }
 
@@ -279,6 +279,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 --
@@ -292,6 +309,7 @@ acpi_status acpi_initialize_objects(u32 flags)
 
 ACPI_EXPORT_SYMBOL(acpi_initialize_objects)
 
+#endif
 /*******************************************************************************
  *
  * FUNCTION:    acpi_terminate
@@ -335,6 +353,7 @@ acpi_status acpi_terminate(void)
 }
 
 ACPI_EXPORT_SYMBOL(acpi_terminate)
+#ifndef ACPI_ASL_COMPILER
 #ifdef ACPI_FUTURE_USAGE
 /*******************************************************************************
  *
@@ -490,3 +509,4 @@ acpi_status acpi_purge_cached_objects(void)
 }
 
 ACPI_EXPORT_SYMBOL(acpi_purge_cached_objects)
+#endif
This page took 0.029653 seconds and 5 git commands to generate.