[BACK]Return to acpi.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / acpi

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/acpi/acpi.c between version 1.39 and 1.40

version 1.39, 2003/07/03 14:37:34 version 1.40, 2003/07/06 04:03:22
Line 60  __KERNEL_RCSID(0, "$NetBSD$");
Line 60  __KERNEL_RCSID(0, "$NetBSD$");
 #include <dev/acpi/acpidevs_data.h>  #include <dev/acpi/acpidevs_data.h>
 #endif  #endif
   
 #ifndef ACPI_ACTIVATE_DEV  
 #define ACPI_ACTIVATE_DEV 0  
 #endif  
   
 #ifdef ACPI_PCI_FIXUP  #ifdef ACPI_PCI_FIXUP
 #include <dev/acpi/acpica/Subsystem/acnamesp.h> /* AcpiNsGetNodeByPath() */  #include <dev/acpi/acpica/Subsystem/acnamesp.h> /* AcpiNsGetNodeByPath() */
 #include <dev/pci/pcidevs.h>  #include <dev/pci/pcidevs.h>
Line 73  MALLOC_DECLARE(M_ACPI);
Line 69  MALLOC_DECLARE(M_ACPI);
   
 #include <machine/acpi_machdep.h>  #include <machine/acpi_machdep.h>
   
 #undef ENABLE_DEBUGGER  #ifdef ACPI_DEBUGGER
   
 #ifdef ENABLE_DEBUGGER  
 #define ACPI_DBGR_INIT          0x01  #define ACPI_DBGR_INIT          0x01
 #define ACPI_DBGR_TABLES        0x02  #define ACPI_DBGR_TABLES        0x02
 #define ACPI_DBGR_ENABLE        0x04  #define ACPI_DBGR_ENABLE        0x04
Line 126  void  acpi_enable_fixed_events(struct ac
Line 120  void  acpi_enable_fixed_events(struct ac
 #ifdef ACPI_PCI_FIXUP  #ifdef ACPI_PCI_FIXUP
 void            acpi_pci_fixup(struct acpi_softc *);  void            acpi_pci_fixup(struct acpi_softc *);
 #endif  #endif
 #if defined(ACPI_PCI_FIXUP) || ACPI_ACTIVATE_DEV  #if defined(ACPI_PCI_FIXUP) || defined(ACPI_ACTIVATE_DEV)
 ACPI_STATUS     acpi_allocate_resources(ACPI_HANDLE handle);  ACPI_STATUS     acpi_allocate_resources(ACPI_HANDLE handle);
 #endif  #endif
   
Line 155  acpi_probe(void)
Line 149  acpi_probe(void)
         /*          /*
          * Start up ACPICA.           * Start up ACPICA.
          */           */
 #ifdef ENABLE_DEBUGGER  #ifdef ACPI_DEBUGGER
         if (acpi_dbgr & ACPI_DBGR_INIT)          if (acpi_dbgr & ACPI_DBGR_INIT)
                 acpi_osd_debugger();                  acpi_osd_debugger();
 #endif  #endif
Line 166  acpi_probe(void)
Line 160  acpi_probe(void)
                 return (0);                  return (0);
         }          }
   
 #ifdef ENABLE_DEBUGGER  #ifdef ACPI_DEBUGGER
         if (acpi_dbgr & ACPI_DBGR_TABLES)          if (acpi_dbgr & ACPI_DBGR_TABLES)
                 acpi_osd_debugger();                  acpi_osd_debugger();
 #endif  #endif
Line 284  acpi_attach(struct device *parent, struc
Line 278  acpi_attach(struct device *parent, struc
          * XXX We need to arrange for the object init pass after we have           * XXX We need to arrange for the object init pass after we have
          * XXX attached all of our children.           * XXX attached all of our children.
          */           */
 #ifdef ENABLE_DEBUGGER  #ifdef ACPI_DEBUGGER
         if (acpi_dbgr & ACPI_DBGR_ENABLE)          if (acpi_dbgr & ACPI_DBGR_ENABLE)
                 acpi_osd_debugger();                  acpi_osd_debugger();
 #endif  #endif
Line 319  acpi_attach(struct device *parent, struc
Line 313  acpi_attach(struct device *parent, struc
         /*          /*
          * Scan the namespace and build our device tree.           * Scan the namespace and build our device tree.
          */           */
 #ifdef ENABLE_DEBUGGER  #ifdef ACPI_DEBUGGER
         if (acpi_dbgr & ACPI_DBGR_PROBE)          if (acpi_dbgr & ACPI_DBGR_PROBE)
                 acpi_osd_debugger();                  acpi_osd_debugger();
 #endif  #endif
Line 336  acpi_attach(struct device *parent, struc
Line 330  acpi_attach(struct device *parent, struc
                 printf("%s: WARNING: unable to register shutdown hook\n",                  printf("%s: WARNING: unable to register shutdown hook\n",
                     sc->sc_dev.dv_xname);                      sc->sc_dev.dv_xname);
   
 #ifdef ENABLE_DEBUGGER  #ifdef ACPI_DEBUGGER
         if (acpi_dbgr & ACPI_DBGR_RUNNING)          if (acpi_dbgr & ACPI_DBGR_RUNNING)
                 acpi_osd_debugger();                  acpi_osd_debugger();
 #endif  #endif
Line 468  acpi_build_tree(struct acpi_softc *sc)
Line 462  acpi_build_tree(struct acpi_softc *sc)
         }          }
 }  }
   
 #if ACPI_ACTIVATE_DEV  #ifdef ACPI_ACTIVATE_DEV
 static void  static void
 acpi_activate_device(ACPI_HANDLE handle, ACPI_DEVICE_INFO *di)  acpi_activate_device(ACPI_HANDLE handle, ACPI_DEVICE_INFO *di)
 {  {
Line 525  acpi_make_devnode(ACPI_HANDLE handle, UI
Line 519  acpi_make_devnode(ACPI_HANDLE handle, UI
   
                 switch (type) {                  switch (type) {
                 case ACPI_TYPE_DEVICE:                  case ACPI_TYPE_DEVICE:
 #if ACPI_ACTIVATE_DEV  #ifdef ACPI_ACTIVATE_DEV
                         if ((devinfo.Valid & ACPI_VALID_STA) &&                          if ((devinfo.Valid & ACPI_VALID_STA) &&
                             (devinfo.CurrentStatus &                              (devinfo.CurrentStatus &
                              (ACPI_STA_DEV_PRESENT|ACPI_STA_DEV_ENABLED)) ==                               (ACPI_STA_DEV_PRESENT|ACPI_STA_DEV_ENABLED)) ==
Line 1209  acpi_pci_fixup_bus(ACPI_HANDLE handle, U
Line 1203  acpi_pci_fixup_bus(ACPI_HANDLE handle, U
 }  }
 #endif /* ACPI_PCI_FIXUP */  #endif /* ACPI_PCI_FIXUP */
   
 #if defined(ACPI_PCI_FIXUP) || ACPI_ACTIVATE_DEV  #if defined(ACPI_PCI_FIXUP) || defined(ACPI_ACTIVATE_DEV)
 /* XXX This very incomplete */  /* XXX This very incomplete */
 ACPI_STATUS  ACPI_STATUS
 acpi_allocate_resources(ACPI_HANDLE handle)  acpi_allocate_resources(ACPI_HANDLE handle)

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

CVSweb <webmaster@jp.NetBSD.org>