diff options
author | Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> | 2007-02-02 11:48:22 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-02-02 21:14:28 -0500 |
commit | ceb6c46839021d5c7c338d48deac616944660124 (patch) | |
tree | 191485a16c3a19bccde887f1c8938a7a26020401 /arch/i386/mach-es7000/es7000plat.c | |
parent | a7a22fa9c368ba22f13b87585052b8cdbbc18f7a (diff) |
ACPICA: Remove duplicate table manager
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/i386/mach-es7000/es7000plat.c')
-rw-r--r-- | arch/i386/mach-es7000/es7000plat.c | 53 |
1 files changed, 8 insertions, 45 deletions
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c index 3d0fc853516d..9be6ceabf042 100644 --- a/arch/i386/mach-es7000/es7000plat.c +++ b/arch/i386/mach-es7000/es7000plat.c | |||
@@ -160,51 +160,14 @@ parse_unisys_oem (char *oemptr) | |||
160 | int __init | 160 | int __init |
161 | find_unisys_acpi_oem_table(unsigned long *oem_addr) | 161 | find_unisys_acpi_oem_table(unsigned long *oem_addr) |
162 | { | 162 | { |
163 | struct acpi_table_rsdp *rsdp = NULL; | 163 | struct acpi_table_header *header = NULL; |
164 | unsigned long rsdp_phys = 0; | 164 | int i = 0; |
165 | struct acpi_table_header *header = NULL; | 165 | while (ACPI_SUCCESS(acpi_get_table("OEM1", i++, &header))) { |
166 | int i; | 166 | if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) { |
167 | struct acpi_table_sdt sdt; | 167 | struct oem_table *t = (struct oem_table *)header; |
168 | 168 | *oem_addr = (unsigned long)__acpi_map_table(t->OEMTableAddr, | |
169 | rsdp_phys = acpi_find_rsdp(); | 169 | t->OEMTableSize); |
170 | rsdp = __va(rsdp_phys); | 170 | return 0; |
171 | if (rsdp->rsdt_address) { | ||
172 | struct acpi_table_rsdt *mapped_rsdt = NULL; | ||
173 | sdt.pa = rsdp->rsdt_address; | ||
174 | |||
175 | header = (struct acpi_table_header *) | ||
176 | __acpi_map_table(sdt.pa, sizeof(struct acpi_table_header)); | ||
177 | if (!header) | ||
178 | return -ENODEV; | ||
179 | |||
180 | sdt.count = (header->length - sizeof(struct acpi_table_header)) >> 3; | ||
181 | mapped_rsdt = (struct acpi_table_rsdt *) | ||
182 | __acpi_map_table(sdt.pa, header->length); | ||
183 | if (!mapped_rsdt) | ||
184 | return -ENODEV; | ||
185 | |||
186 | header = &mapped_rsdt->header; | ||
187 | |||
188 | for (i = 0; i < sdt.count; i++) | ||
189 | sdt.entry[i].pa = (unsigned long) mapped_rsdt->entry[i]; | ||
190 | }; | ||
191 | for (i = 0; i < sdt.count; i++) { | ||
192 | |||
193 | header = (struct acpi_table_header *) | ||
194 | __acpi_map_table(sdt.entry[i].pa, | ||
195 | sizeof(struct acpi_table_header)); | ||
196 | if (!header) | ||
197 | continue; | ||
198 | if (!strncmp((char *) &header->signature, "OEM1", 4)) { | ||
199 | if (!strncmp((char *) &header->oem_id, "UNISYS", 6)) { | ||
200 | void *addr; | ||
201 | struct oem_table *t; | ||
202 | acpi_table_print(header, sdt.entry[i].pa); | ||
203 | t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length); | ||
204 | addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize); | ||
205 | *oem_addr = (unsigned long) addr; | ||
206 | return 0; | ||
207 | } | ||
208 | } | 171 | } |
209 | } | 172 | } |
210 | return -1; | 173 | return -1; |