aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mach-es7000/es7000plat.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/mach-es7000/es7000plat.c')
-rw-r--r--arch/i386/mach-es7000/es7000plat.c45
1 files changed, 22 insertions, 23 deletions
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c
index d5936d500479..2000bdca2fc2 100644
--- a/arch/i386/mach-es7000/es7000plat.c
+++ b/arch/i386/mach-es7000/es7000plat.c
@@ -75,12 +75,29 @@ es7000_rename_gsi(int ioapic, int gsi)
75 75
76#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT) 76#endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT)
77 77
78void __init
79setup_unisys ()
80{
81 /*
82 * Determine the generation of the ES7000 currently running.
83 *
84 * es7000_plat = 1 if the machine is a 5xx ES7000 box
85 * es7000_plat = 2 if the machine is a x86_64 ES7000 box
86 *
87 */
88 if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
89 es7000_plat = 2;
90 else
91 es7000_plat = 1;
92 ioapic_renumber_irq = es7000_rename_gsi;
93}
94
78/* 95/*
79 * Parse the OEM Table 96 * Parse the OEM Table
80 */ 97 */
81 98
82int __init 99int __init
83parse_unisys_oem (char *oemptr, int oem_entries) 100parse_unisys_oem (char *oemptr)
84{ 101{
85 int i; 102 int i;
86 int success = 0; 103 int success = 0;
@@ -95,7 +112,7 @@ parse_unisys_oem (char *oemptr, int oem_entries)
95 112
96 tp += 8; 113 tp += 8;
97 114
98 for (i=0; i <= oem_entries; i++) { 115 for (i=0; i <= 6; i++) {
99 type = *tp++; 116 type = *tp++;
100 size = *tp++; 117 size = *tp++;
101 tp -= 2; 118 tp -= 2;
@@ -130,34 +147,18 @@ parse_unisys_oem (char *oemptr, int oem_entries)
130 default: 147 default:
131 break; 148 break;
132 } 149 }
133 if (i == 6) break;
134 tp += size; 150 tp += size;
135 } 151 }
136 152
137 if (success < 2) { 153 if (success < 2) {
138 es7000_plat = 0; 154 es7000_plat = 0;
139 } else { 155 } else
140 printk("\nEnabling ES7000 specific features...\n"); 156 setup_unisys();
141 /*
142 * Determine the generation of the ES7000 currently running.
143 *
144 * es7000_plat = 0 if the machine is NOT a Unisys ES7000 box
145 * es7000_plat = 1 if the machine is a 5xx ES7000 box
146 * es7000_plat = 2 if the machine is a x86_64 ES7000 box
147 *
148 */
149 if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2))
150 es7000_plat = 2;
151 else
152 es7000_plat = 1;
153
154 ioapic_renumber_irq = es7000_rename_gsi;
155 }
156 return es7000_plat; 157 return es7000_plat;
157} 158}
158 159
159int __init 160int __init
160find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length) 161find_unisys_acpi_oem_table(unsigned long *oem_addr)
161{ 162{
162 struct acpi_table_rsdp *rsdp = NULL; 163 struct acpi_table_rsdp *rsdp = NULL;
163 unsigned long rsdp_phys = 0; 164 unsigned long rsdp_phys = 0;
@@ -201,13 +202,11 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length)
201 acpi_table_print(header, sdt.entry[i].pa); 202 acpi_table_print(header, sdt.entry[i].pa);
202 t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length); 203 t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length);
203 addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize); 204 addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize);
204 *length = header->length;
205 *oem_addr = (unsigned long) addr; 205 *oem_addr = (unsigned long) addr;
206 return 0; 206 return 0;
207 } 207 }
208 } 208 }
209 } 209 }
210 Dprintk("ES7000: did not find Unisys ACPI OEM table!\n");
211 return -1; 210 return -1;
212} 211}
213 212