diff options
Diffstat (limited to 'include/asm-i386/mach-es7000/mach_mpparse.h')
-rw-r--r-- | include/asm-i386/mach-es7000/mach_mpparse.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h index 85809e0898d..28a84f6185a 100644 --- a/include/asm-i386/mach-es7000/mach_mpparse.h +++ b/include/asm-i386/mach-es7000/mach_mpparse.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef __ASM_MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define __ASM_MACH_MPPARSE_H |
3 | 3 | ||
4 | #include <linux/acpi.h> | ||
5 | |||
4 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | 6 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, |
5 | struct mpc_config_translation *translation) | 7 | struct mpc_config_translation *translation) |
6 | { | 8 | { |
@@ -12,8 +14,9 @@ static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, | |||
12 | { | 14 | { |
13 | } | 15 | } |
14 | 16 | ||
15 | extern int parse_unisys_oem (char *oemptr, int oem_entries); | 17 | extern int parse_unisys_oem (char *oemptr); |
16 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length); | 18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
19 | extern void setup_unisys(); | ||
17 | 20 | ||
18 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | 21 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, |
19 | char *productid) | 22 | char *productid) |
@@ -22,18 +25,33 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
22 | struct mp_config_oemtable *oem_table = | 25 | struct mp_config_oemtable *oem_table = |
23 | (struct mp_config_oemtable *)mpc->mpc_oemptr; | 26 | (struct mp_config_oemtable *)mpc->mpc_oemptr; |
24 | if (!strncmp(oem, "UNISYS", 6)) | 27 | if (!strncmp(oem, "UNISYS", 6)) |
25 | return parse_unisys_oem((char *)oem_table, oem_table->oem_length); | 28 | return parse_unisys_oem((char *)oem_table); |
26 | } | 29 | } |
27 | return 0; | 30 | return 0; |
28 | } | 31 | } |
29 | 32 | ||
33 | static inline int es7000_check_dsdt() | ||
34 | { | ||
35 | struct acpi_table_header *header = NULL; | ||
36 | if(!acpi_get_table_header_early(ACPI_DSDT, &header)) | ||
37 | acpi_table_print(header, 0); | ||
38 | if (!strncmp(header->oem_id, "UNISYS", 6)) | ||
39 | return 1; | ||
40 | return 0; | ||
41 | } | ||
42 | |||
30 | /* Hook from generic ACPI tables.c */ | 43 | /* Hook from generic ACPI tables.c */ |
31 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 44 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
32 | { | 45 | { |
33 | unsigned long oem_addr; | 46 | unsigned long oem_addr; |
34 | int oem_entries; | 47 | if (!find_unisys_acpi_oem_table(&oem_addr)) { |
35 | if (!find_unisys_acpi_oem_table(&oem_addr, &oem_entries)) | 48 | if (es7000_check_dsdt()) |
36 | return parse_unisys_oem((char *)oem_addr, oem_entries); | 49 | return parse_unisys_oem((char *)oem_addr); |
50 | else { | ||
51 | setup_unisys(); | ||
52 | return 1; | ||
53 | } | ||
54 | } | ||
37 | return 0; | 55 | return 0; |
38 | } | 56 | } |
39 | 57 | ||