2 * BK Id: SCCS/s.open_pic.h 1.17 01/07/03 12:34:14 trini
5 * include/asm-ppc/open_pic.h -- OpenPIC Interrupt Handling
7 * Copyright (C) 1997 Geert Uytterhoeven
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file COPYING in the main directory of this archive
15 #ifndef _PPC_KERNEL_OPEN_PIC_H
16 #define _PPC_KERNEL_OPEN_PIC_H
18 #include <linux/config.h>
19 #include <linux/irq.h>
21 #define OPENPIC_SIZE 0x40000
24 * Non-offset'ed vector numbers
27 #define OPENPIC_VEC_TIMER 64 /* and up */
28 #define OPENPIC_VEC_IPI 72 /* and up */
29 #define OPENPIC_VEC_SPURIOUS 127
31 /* OpenPIC IRQ controller structure */
32 extern struct hw_interrupt_type open_pic;
34 /* OpenPIC IPI controller structure */
36 extern struct hw_interrupt_type open_pic_ipi;
37 #endif /* CONFIG_SMP */
39 extern u_int OpenPIC_NumInitSenses;
40 extern u_char *OpenPIC_InitSenses;
41 extern void* OpenPIC_Addr;
43 /* Exported functions */
44 extern void openpic_set_sources(int first_irq, int num_irqs, void *isr);
45 extern void openpic_init(int linux_irq_offset);
46 extern void openpic_init_nmi_irq(u_int irq);
47 extern void openpic_hookup_cascade(u_int irq, char *name,
48 int (*cascade_fn)(struct pt_regs *));
49 extern u_int openpic_irq(void);
50 extern void openpic_eoi(void);
51 extern void openpic_request_IPIs(void);
52 extern void do_openpic_setup_cpu(void);
53 extern int openpic_get_irq(struct pt_regs *regs);
54 extern void openpic_reset_processor_phys(u_int cpumask);
55 extern void openpic_setup_ISU(int isu_num, unsigned long addr);
56 extern void openpic_cause_IPI(u_int ipi, u_int cpumask);
57 extern void smp_openpic_message_pass(int target, int msg, unsigned long data,
60 extern inline int openpic_to_irq(int irq)
62 /* IRQ 0 usually means 'disabled'.. don't mess with it
63 * exceptions to this (sandpoint maybe?)
64 * shouldn't use openpic_to_irq
68 //return irq += NUM_8259_INTERRUPTS;
74 /*extern int open_pic_irq_offset;*/
75 #endif /* _PPC_KERNEL_OPEN_PIC_H */