blob: 399c81981ed5a2081e8a4a32dff54c341d2036af [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * include/asm-parisc/irq.h
3 *
4 * Copyright 2005 Matthew Wilcox <matthew@wil.cx>
5 */
6
7#ifndef _ASM_PARISC_IRQ_H
8#define _ASM_PARISC_IRQ_H
9
James Bottomleyc2ab64d2005-11-17 16:28:37 -050010#include <linux/cpumask.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#include <asm/types.h>
12
13#define NO_IRQ (-1)
14
15#ifdef CONFIG_GSC
16#define GSC_IRQ_BASE 16
17#define GSC_IRQ_MAX 63
18#define CPU_IRQ_BASE 64
19#else
20#define CPU_IRQ_BASE 16
21#endif
22
23#define TIMER_IRQ (CPU_IRQ_BASE + 0)
24#define IPI_IRQ (CPU_IRQ_BASE + 1)
25#define CPU_IRQ_MAX (CPU_IRQ_BASE + (BITS_PER_LONG - 1))
26
27#define NR_IRQS (CPU_IRQ_MAX + 1)
28
Linus Torvalds1da177e2005-04-16 15:20:36 -070029static __inline__ int irq_canonicalize(int irq)
30{
31 return (irq == 2) ? 9 : irq;
32}
33
Kyle McMartin5cfe87d2006-08-13 22:25:45 -040034struct irq_chip;
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
36/*
37 * Some useful "we don't have to do anything here" handlers. Should
38 * probably be provided by the generic code.
39 */
40void no_ack_irq(unsigned int irq);
41void no_end_irq(unsigned int irq);
James Bottomley70856892006-09-09 12:36:25 -070042void cpu_ack_irq(unsigned int irq);
43void cpu_end_irq(unsigned int irq);
Linus Torvalds1da177e2005-04-16 15:20:36 -070044
45extern int txn_alloc_irq(unsigned int nbits);
46extern int txn_claim_irq(int);
47extern unsigned int txn_alloc_data(unsigned int);
48extern unsigned long txn_alloc_addr(unsigned int);
James Bottomleyc2ab64d2005-11-17 16:28:37 -050049extern unsigned long txn_affinity_addr(unsigned int irq, int cpu);
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
Kyle McMartin5cfe87d2006-08-13 22:25:45 -040051extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *);
James Bottomleyc2ab64d2005-11-17 16:28:37 -050052extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest);
Linus Torvalds1da177e2005-04-16 15:20:36 -070053
54/* soft power switch support (power.c) */
55extern struct tasklet_struct power_tasklet;
56
57#endif /* _ASM_PARISC_IRQ_H */