achware.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:3k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /******************************************************************************
  2.  *
  3.  * Name: achware.h -- hardware specific interfaces
  4.  *       $Revision: 56 $
  5.  *
  6.  *****************************************************************************/
  7. /*
  8.  *  Copyright (C) 2000, 2001 R. Byron Moore
  9.  *
  10.  *  This program is free software; you can redistribute it and/or modify
  11.  *  it under the terms of the GNU General Public License as published by
  12.  *  the Free Software Foundation; either version 2 of the License, or
  13.  *  (at your option) any later version.
  14.  *
  15.  *  This program is distributed in the hope that it will be useful,
  16.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  17.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18.  *  GNU General Public License for more details.
  19.  *
  20.  *  You should have received a copy of the GNU General Public License
  21.  *  along with this program; if not, write to the Free Software
  22.  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  23.  */
  24. #ifndef __ACHWARE_H__
  25. #define __ACHWARE_H__
  26. /* PM Timer ticks per second (HZ) */
  27. #define PM_TIMER_FREQUENCY  3579545
  28. /* Prototypes */
  29. acpi_status
  30. acpi_hw_initialize (
  31. void);
  32. acpi_status
  33. acpi_hw_shutdown (
  34. void);
  35. acpi_status
  36. acpi_hw_initialize_system_info (
  37. void);
  38. acpi_status
  39. acpi_hw_set_mode (
  40. u32                     mode);
  41. u32
  42. acpi_hw_get_mode (
  43. void);
  44. u32
  45. acpi_hw_get_mode_capabilities (
  46. void);
  47. /* Register I/O Prototypes */
  48. u32
  49. acpi_hw_register_bit_access (
  50. NATIVE_UINT             read_write,
  51. u8                      use_lock,
  52. u32                     register_id,
  53. ... /* DWORD Write Value */);
  54. u32
  55. acpi_hw_register_read (
  56. u8                      use_lock,
  57. u32                     register_id);
  58. void
  59. acpi_hw_register_write (
  60. u8                      use_lock,
  61. u32                     register_id,
  62. u32                     value);
  63. u32
  64. acpi_hw_low_level_read (
  65. u32                     width,
  66. acpi_generic_address    *reg,
  67. u32                     offset);
  68. void
  69. acpi_hw_low_level_write (
  70. u32                     width,
  71. u32                     value,
  72. acpi_generic_address    *reg,
  73. u32                     offset);
  74. void
  75. acpi_hw_clear_acpi_status (
  76.    void);
  77. u32
  78. acpi_hw_get_bit_shift (
  79. u32                     mask);
  80. /* GPE support */
  81. void
  82. acpi_hw_enable_gpe (
  83. u32                     gpe_number);
  84. void
  85. acpi_hw_enable_gpe_for_wakeup (
  86. u32                     gpe_number);
  87. void
  88. acpi_hw_disable_gpe (
  89. u32                     gpe_number);
  90. void
  91. acpi_hw_disable_gpe_for_wakeup (
  92. u32                     gpe_number);
  93. void
  94. acpi_hw_clear_gpe (
  95. u32                     gpe_number);
  96. void
  97. acpi_hw_get_gpe_status (
  98. u32                     gpe_number,
  99. acpi_event_status       *event_status);
  100. void
  101. acpi_hw_disable_non_wakeup_gpes (
  102. void);
  103. void
  104. acpi_hw_enable_non_wakeup_gpes (
  105. void);
  106. /* Sleep Prototypes */
  107. acpi_status
  108. acpi_hw_obtain_sleep_type_register_data (
  109. u8                      sleep_state,
  110. u8                      *slp_typ_a,
  111. u8                      *slp_typ_b);
  112. /* ACPI Timer prototypes */
  113. acpi_status
  114. acpi_get_timer_resolution (
  115. u32                     *resolution);
  116. acpi_status
  117. acpi_get_timer (
  118. u32                     *ticks);
  119. acpi_status
  120. acpi_get_timer_duration (
  121. u32                     start_ticks,
  122. u32                     end_ticks,
  123. u32                     *time_elapsed);
  124. #endif /* __ACHWARE_H__ */