Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Machine specific setup for generic |
| 3 | */ |
| 4 | |
| 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> |
| 12 | |
| 13 | /** |
| 14 | * pre_intr_init_hook - initialisation prior to setting up interrupt vectors |
| 15 | * |
| 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) |
| 23 | { |
| 24 | init_ISA_irqs(); |
| 25 | } |
| 26 | |
| 27 | /* |
| 28 | * IRQ2 is cascade interrupt to second interrupt controller |
| 29 | */ |
| 30 | static struct irqaction irq2 = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL}; |
| 31 | |
| 32 | /** |
| 33 | * intr_init_hook - post gate setup interrupt initialisation |
| 34 | * |
| 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) |
| 42 | { |
| 43 | #ifdef CONFIG_X86_LOCAL_APIC |
| 44 | apic_intr_init(); |
| 45 | #endif |
| 46 | |
| 47 | if (!acpi_ioapic) |
| 48 | setup_irq(2, &irq2); |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * pre_setup_arch_hook - hook called prior to any setup_arch() execution |
| 53 | * |
| 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) |
| 60 | { |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * trap_init_hook - initialise system specific traps |
| 65 | * |
| 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) |
| 71 | { |
| 72 | } |
| 73 | |
| 74 | static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; |
| 75 | |
| 76 | /** |
| 77 | * time_init_hook - do any specific initialisations for the system timer. |
| 78 | * |
| 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) |
| 84 | { |
| 85 | setup_irq(0, &irq0); |
| 86 | } |
| 87 | |
| 88 | #ifdef CONFIG_MCA |
| 89 | /** |
| 90 | * mca_nmi_hook - hook into MCA specific NMI chain |
| 91 | * |
| 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) |
| 98 | { |
| 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. |
| 102 | */ |
| 103 | |
| 104 | printk("NMI generated from unknown source!\n"); |
| 105 | } |
| 106 | #endif |