aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mach-es7000
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2005-09-08 01:45:47 -0400
committerLen Brown <len.brown@intel.com>2005-09-08 01:45:47 -0400
commit64e47488c913ac704d465a6af86a26786d1412a5 (patch)
treed3b0148592963dcde26e4bb35ddfec8b1eaf8e23 /arch/i386/mach-es7000
parent4a35a46bf1cda4737c428380d1db5d15e2590d18 (diff)
parentcaf39e87cc1182f7dae84eefc43ca14d54c78ef9 (diff)
Merge linux-2.6 with linux-acpi-2.6
Diffstat (limited to 'arch/i386/mach-es7000')
-rw-r--r--arch/i386/mach-es7000/es7000.h5
-rw-r--r--arch/i386/mach-es7000/es7000plat.c45
2 files changed, 25 insertions, 25 deletions
diff --git a/arch/i386/mach-es7000/es7000.h b/arch/i386/mach-es7000/es7000.h
index 70691f0c4ce2..898ed905e119 100644
--- a/arch/i386/mach-es7000/es7000.h
+++ b/arch/i386/mach-es7000/es7000.h
@@ -104,7 +104,8 @@ struct mip_reg {
104#define MIP_SW_APIC 0x1020b 104#define MIP_SW_APIC 0x1020b
105#define MIP_FUNC(VALUE) (VALUE & 0xff) 105#define MIP_FUNC(VALUE) (VALUE & 0xff)
106 106
107extern int parse_unisys_oem (char *oemptr, int oem_entries); 107extern int parse_unisys_oem (char *oemptr);
108extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length); 108extern int find_unisys_acpi_oem_table(unsigned long *oem_addr);
109extern void setup_unisys ();
109extern int es7000_start_cpu(int cpu, unsigned long eip); 110extern int es7000_start_cpu(int cpu, unsigned long eip);
110extern void es7000_sw_apic(void); 111extern void es7000_sw_apic(void);
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c
index f549c0efdb9f..dc6660511b07 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) */ 76#endif /* (CONFIG_X86_IO_APIC) && (CONFIG_ACPI) */
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