blob: 520cca0ee04e382227acb882ebd3a0665a5135b8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * APIC driver for the Unisys ES7000 chipset.
3 */
4#define APIC_DEFINITION 1
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#include <linux/threads.h>
6#include <linux/cpumask.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07007#include <asm/mpspec.h>
8#include <asm/genapic.h>
9#include <asm/fixmap.h>
10#include <asm/apicdef.h>
11#include <linux/kernel.h>
12#include <linux/string.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070013#include <linux/init.h>
Yinghai Luc7e79642008-07-25 02:17:33 -070014#include <asm/es7000/apicdef.h>
Yinghai Lu4696ca52008-07-11 18:43:10 -070015#include <linux/smp.h>
Yinghai Luc7e79642008-07-25 02:17:33 -070016#include <asm/es7000/apic.h>
17#include <asm/es7000/ipi.h>
18#include <asm/es7000/mpparse.h>
19#include <asm/es7000/wakecpu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
Vivek Goyale96763d2007-01-11 01:52:44 +010021static int probe_es7000(void)
Linus Torvalds1da177e2005-04-16 15:20:36 -070022{
23 /* probed later in mptable/ACPI hooks */
24 return 0;
25}
26
Vivek Goyal1833d6b2007-05-02 19:27:08 +020027extern void es7000_sw_apic(void);
28static void __init enable_apic_mode(void)
29{
30 es7000_sw_apic();
31 return;
32}
33
34static __init int mps_oem_check(struct mp_config_table *mpc, char *oem,
35 char *productid)
36{
37 if (mpc->mpc_oemptr) {
38 struct mp_config_oemtable *oem_table =
39 (struct mp_config_oemtable *)mpc->mpc_oemptr;
40 if (!strncmp(oem, "UNISYS", 6))
41 return parse_unisys_oem((char *)oem_table);
42 }
43 return 0;
44}
45
46#ifdef CONFIG_ACPI
47/* Hook from generic ACPI tables.c */
48static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
49{
50 unsigned long oem_addr;
51 if (!find_unisys_acpi_oem_table(&oem_addr)) {
52 if (es7000_check_dsdt())
53 return parse_unisys_oem((char *)oem_addr);
54 else {
55 setup_unisys();
56 return 1;
57 }
58 }
59 return 0;
60}
61#else
62static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
63{
64 return 0;
65}
66#endif
67
Sam Ravnborgd3ab7852007-06-03 00:05:10 +020068struct genapic __initdata_refok apic_es7000 = APIC_INIT("es7000", probe_es7000);