aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 11:48:20 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:24 -0500
commit765ec20180fb70b4ee9d730167b2a0b76879f791 (patch)
tree1fd0a7ce30dc80be45f6ff21b1ef5c12bf0e8915 /drivers/acpi/utilities
parent1ba753acb372c2955a4843302e92e49ce82e2fea (diff)
ACPICA: Delete stale FADT functions outside tbfadt.c.
Moved all FADT-related functions to a new file, tbfadt.c. Eliminated the acpi_hw_initialize function - the FADT registers are now validated when the table is loaded. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r--drivers/acpi/utilities/utinit.c95
-rw-r--r--drivers/acpi/utilities/utxface.c14
2 files changed, 0 insertions, 109 deletions
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c
index 5079f1943a3b..303bde70fdb6 100644
--- a/drivers/acpi/utilities/utinit.c
+++ b/drivers/acpi/utilities/utinit.c
@@ -50,103 +50,8 @@
50ACPI_MODULE_NAME("utinit") 50ACPI_MODULE_NAME("utinit")
51 51
52/* Local prototypes */ 52/* Local prototypes */
53static void acpi_ut_fadt_register_error(char *register_name, u32 value);
54
55static void acpi_ut_terminate(void); 53static void acpi_ut_terminate(void);
56 54
57/*******************************************************************************
58 *
59 * FUNCTION: acpi_ut_fadt_register_error
60 *
61 * PARAMETERS: register_name - Pointer to string identifying register
62 * Value - Actual register contents value
63 *
64 * RETURN: None
65 *
66 * DESCRIPTION: Display failure message
67 *
68 ******************************************************************************/
69
70static void acpi_ut_fadt_register_error(char *register_name, u32 value)
71{
72
73 ACPI_WARNING((AE_INFO, "Invalid FADT value %s = %X",
74 register_name, value));
75}
76
77/******************************************************************************
78 *
79 * FUNCTION: acpi_ut_validate_fadt
80 *
81 * PARAMETERS: None
82 *
83 * RETURN: Status
84 *
85 * DESCRIPTION: Validate various ACPI registers in the FADT
86 *
87 ******************************************************************************/
88
89acpi_status acpi_ut_validate_fadt(void)
90{
91
92 /*
93 * Verify Fixed ACPI Description Table fields,
94 * but don't abort on any problems, just display error
95 */
96 if (acpi_gbl_FADT.pm1_event_length < 4) {
97 acpi_ut_fadt_register_error("Pm1EventLength",
98 (u32) acpi_gbl_FADT.
99 pm1_event_length);
100 }
101
102 if (acpi_gbl_FADT.pm_timer_length < 4) {
103 acpi_ut_fadt_register_error("PmTimerLength",
104 (u32) acpi_gbl_FADT.
105 pm_timer_length);
106 }
107
108 if (!acpi_gbl_FADT.pm1_control_length) {
109 acpi_ut_fadt_register_error("Pm1ControlLength", 0);
110 }
111
112 if (!acpi_gbl_FADT.xpm1a_event_block.address) {
113 acpi_ut_fadt_register_error("XPm1aEventBlock.Address", 0);
114 }
115
116 if (!acpi_gbl_FADT.xpm1a_control_block.address) {
117 acpi_ut_fadt_register_error("XPm1aControlBlock.Address", 0);
118 }
119
120 if (!acpi_gbl_FADT.xpm_timer_block.address) {
121 acpi_ut_fadt_register_error("XPmTimerBlock.Address", 0);
122 }
123
124 if ((acpi_gbl_FADT.xpm2_control_block.address &&
125 !acpi_gbl_FADT.pm2_control_length)) {
126 acpi_ut_fadt_register_error("Pm2ControlLength",
127 (u32) acpi_gbl_FADT.
128 pm2_control_length);
129 }
130
131 /* Length of GPE blocks must be a multiple of 2 */
132
133 if (acpi_gbl_FADT.xgpe0_block.address &&
134 (acpi_gbl_FADT.gpe0_block_length & 1)) {
135 acpi_ut_fadt_register_error("Gpe0BlockLength",
136 (u32) acpi_gbl_FADT.
137 gpe0_block_length);
138 }
139
140 if (acpi_gbl_FADT.xgpe1_block.address &&
141 (acpi_gbl_FADT.gpe1_block_length & 1)) {
142 acpi_ut_fadt_register_error("Gpe1BlockLength",
143 (u32) acpi_gbl_FADT.
144 gpe1_block_length);
145 }
146
147 return (AE_OK);
148}
149
150/****************************************************************************** 55/******************************************************************************
151 * 56 *
152 * FUNCTION: acpi_ut_terminate 57 * FUNCTION: acpi_ut_terminate
diff --git a/drivers/acpi/utilities/utxface.c b/drivers/acpi/utilities/utxface.c
index 7ea2981d4382..bec0f543e1c7 100644
--- a/drivers/acpi/utilities/utxface.c
+++ b/drivers/acpi/utilities/utxface.c
@@ -127,20 +127,6 @@ acpi_status acpi_enable_subsystem(u32 flags)
127 127
128 ACPI_FUNCTION_TRACE(acpi_enable_subsystem); 128 ACPI_FUNCTION_TRACE(acpi_enable_subsystem);
129 129
130 /*
131 * We must initialize the hardware before we can enable ACPI.
132 * The values from the FADT are validated here.
133 */
134 if (!(flags & ACPI_NO_HARDWARE_INIT)) {
135 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
136 "[Init] Initializing ACPI hardware\n"));
137
138 status = acpi_hw_initialize();
139 if (ACPI_FAILURE(status)) {
140 return_ACPI_STATUS(status);
141 }
142 }
143
144 /* Enable ACPI mode */ 130 /* Enable ACPI mode */
145 131
146 if (!(flags & ACPI_NO_ACPI_ENABLE)) { 132 if (!(flags & ACPI_NO_ACPI_ENABLE)) {