patch-2.4.0-test9 linux/drivers/acpi/events/evsci.c

Next file: linux/drivers/acpi/events/evxface.c
Previous file: linux/drivers/acpi/events/evrgnini.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test8/linux/drivers/acpi/events/evsci.c linux/drivers/acpi/events/evsci.c
@@ -1,9 +1,10 @@
-/******************************************************************************
+/*******************************************************************************
  *
  * Module Name: evsci - System Control Interrupt configuration and
  *                      legacy to ACPI mode state transition functions
+ *              $Revision: 59 $
  *
- *****************************************************************************/
+ ******************************************************************************/
 
 /*
  *  Copyright (C) 2000 R. Byron Moore
@@ -24,27 +25,26 @@
  */
 
 #include "acpi.h"
-#include "namesp.h"
-#include "hardware.h"
-#include "events.h"
+#include "acnamesp.h"
+#include "achware.h"
+#include "acevents.h"
 
 
 #define _COMPONENT          EVENT_HANDLING
-	 MODULE_NAME         ("evsci");
+	 MODULE_NAME         ("evsci")
 
 
 /*
- * Elements correspond to counts for
- * TMR, NOT_USED, GBL, PWR_BTN, SLP_BTN, RTC,
- * and GENERAL respectively.  These counts
- * are modified by the ACPI interrupt handler...
- * Note that GENERAL should probably be split out
- * into one element for each bit in the GPE
- * registers
+ * Elements correspond to counts for TMR, NOT_USED, GBL, PWR_BTN, SLP_BTN, RTC,
+ * and GENERAL respectively.  These counts are modified by the ACPI interrupt
+ * handler.
+ *
+ * TBD: [Investigate] Note that GENERAL should probably be split out into
+ * one element for each bit in the GPE registers
  */
 
 
-/******************************************************************************
+/*******************************************************************************
  *
  * FUNCTION:    Acpi_ev_sci_handler
  *
@@ -61,16 +61,16 @@
 u32
 acpi_ev_sci_handler (void *context)
 {
-	u32 interrupt_handled = INTERRUPT_NOT_HANDLED;
+	u32                     interrupt_handled = INTERRUPT_NOT_HANDLED;
+
 
 	/*
-	 * ACPI Enabled?
-	 * -------------
 	 * Make sure that ACPI is enabled by checking SCI_EN.  Note that we are
 	 * required to treat the SCI interrupt as sharable, level, active low.
 	 */
-	if (!acpi_hw_register_access (ACPI_READ, ACPI_MTX_DO_NOT_LOCK, (s32)SCI_EN)) {
-		REPORT_ERROR ("Received and SCI but ACPI is not enabled.");
+	if (!acpi_hw_register_access (ACPI_READ, ACPI_MTX_DO_NOT_LOCK, SCI_EN)) {
+		/* ACPI is not enabled;  this interrupt cannot be for us */
+
 		return (INTERRUPT_NOT_HANDLED);
 	}
 
@@ -107,12 +107,12 @@
 u32
 acpi_ev_install_sci_handler (void)
 {
-	u32 except = AE_OK;
+	u32                     except = AE_OK;
+
 
-	except = acpi_os_install_interrupt_handler (
-		(u32) acpi_gbl_FACP->sci_int,
-		acpi_ev_sci_handler,
-		NULL);
+	except = acpi_os_install_interrupt_handler ((u32) acpi_gbl_FACP->sci_int,
+			  acpi_ev_sci_handler,
+			  NULL);
 
 	return (except);
 }
@@ -163,24 +163,21 @@
 
 #endif
 
-	acpi_os_remove_interrupt_handler (
-		(u32) acpi_gbl_FACP->sci_int,
-		acpi_ev_sci_handler);
+	acpi_os_remove_interrupt_handler ((u32) acpi_gbl_FACP->sci_int,
+			   acpi_ev_sci_handler);
 
 	return (AE_OK);
 }
 
 
-/******************************************************************************
+/*******************************************************************************
  *
  * FUNCTION:    Acpi_ev_sci_count
  *
- * PARAMETERS:  char * Event_name       name (fully qualified name from namespace
- *                                      or one of the fixed event names defined above)
- *                                      of the event to check if it's generated an SCI.
+ * PARAMETERS:  Event       Event that generated an SCI.
  *
- * RETURN:      Number of SCI's for requested event since last time i_sci_occured()
- *              was called for this event.
+ * RETURN:      Number of SCI's for requested event since last time
+ *              Sci_occured() was called for this event.
  *
  * DESCRIPTION: Checks to see if SCI has been generated from requested source
  *              since the last time this function was called.
@@ -188,7 +185,7 @@
  ******************************************************************************/
 
 
-/******************************************************************************
+/*******************************************************************************
  *
  * FUNCTION:    Acpi_ev_restore_acpi_state
  *
@@ -203,7 +200,7 @@
 void
 acpi_ev_restore_acpi_state (void)
 {
-	s32                     index;
+	u32                     index;
 
 
 	/* Restore the state of the chipset enable bits. */
@@ -283,6 +280,7 @@
 void
 acpi_ev_terminate (void)
 {
+
 
 	/*
 	 * Free global tables, etc.

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)