Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / i386 / mach-default / setup.c
blob0aa08eaa893281f6c74e49a0ac7f34f5203a481f
1 /*
2 * Machine specific setup for generic
3 */
5 #include <linux/config.h>
6 #include <linux/smp.h>
7 #include <linux/init.h>
8 #include <linux/irq.h>
9 #include <linux/interrupt.h>
10 #include <asm/acpi.h>
11 #include <asm/arch_hooks.h>
13 /**
14 * pre_intr_init_hook - initialisation prior to setting up interrupt vectors
16 * Description:
17 * Perform any necessary interrupt initialisation prior to setting up
18 * the "ordinary" interrupt call gates. For legacy reasons, the ISA
19 * interrupts should be initialised here if the machine emulates a PC
20 * in any way.
21 **/
22 void __init pre_intr_init_hook(void)
24 init_ISA_irqs();
28 * IRQ2 is cascade interrupt to second interrupt controller
30 static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL};
32 /**
33 * intr_init_hook - post gate setup interrupt initialisation
35 * Description:
36 * Fill in any interrupts that may have been left out by the general
37 * init_IRQ() routine. interrupts having to do with the machine rather
38 * than the devices on the I/O bus (like APIC interrupts in intel MP
39 * systems) are started here.
40 **/
41 void __init intr_init_hook(void)
43 #ifdef CONFIG_X86_LOCAL_APIC
44 apic_intr_init();
45 #endif
47 if (!acpi_ioapic)
48 setup_irq(2, &irq2);
51 /**
52 * pre_setup_arch_hook - hook called prior to any setup_arch() execution
54 * Description:
55 * generally used to activate any machine specific identification
56 * routines that may be needed before setup_arch() runs. On VISWS
57 * this is used to get the board revision and type.
58 **/
59 void __init pre_setup_arch_hook(void)
63 /**
64 * trap_init_hook - initialise system specific traps
66 * Description:
67 * Called as the final act of trap_init(). Used in VISWS to initialise
68 * the various board specific APIC traps.
69 **/
70 void __init trap_init_hook(void)
74 static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL};
76 /**
77 * time_init_hook - do any specific initialisations for the system timer.
79 * Description:
80 * Must plug the system timer interrupt source at HZ into the IRQ listed
81 * in irq_vectors.h:TIMER_IRQ
82 **/
83 void __init time_init_hook(void)
85 setup_irq(0, &irq0);
88 #ifdef CONFIG_MCA
89 /**
90 * mca_nmi_hook - hook into MCA specific NMI chain
92 * Description:
93 * The MCA (Microchannel Arcitecture) has an NMI chain for NMI sources
94 * along the MCA bus. Use this to hook into that chain if you will need
95 * it.
96 **/
97 void __init mca_nmi_hook(void)
99 /* If I recall correctly, there's a whole bunch of other things that
100 * we can do to check for NMI problems, but that's all I know about
101 * at the moment.
104 printk("NMI generated from unknown source!\n");
106 #endif