diff options
author | Magnus Damm <damm@igel.co.jp> | 2007-06-15 05:56:19 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-06-15 05:56:19 -0400 |
commit | 68abdbbb03476a60d932eeba0035dd5069afec38 (patch) | |
tree | de3854f76d6d9aec121c432a3cd276bb756003c9 /include/asm-sh/irq.h | |
parent | 50f63f2518ee68bc132d357d2b6fdb7f60ef79e0 (diff) |
sh: rework ipr code
This patch reworks the ipr code by grouping the offset array together
with the ipr_data structure in a new data structure called ipr_desc.
This new structure also contains the name of the controller in struct
irq_chip. The idea behind putting struct irq_chip in there is that we
can use offsetof() to locate the base addresses in the irq_chip
callbacks. This strategy has much in common with the recently merged
intc2 code.
One logic change has been made - the original ipr code enabled the
interrupts by default but with this patch they are all disabled by
default.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/irq.h')
-rw-r--r-- | include/asm-sh/irq.h | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/include/asm-sh/irq.h b/include/asm-sh/irq.h index c247b733a7d6..c61d902b8bff 100644 --- a/include/asm-sh/irq.h +++ b/include/asm-sh/irq.h | |||
@@ -31,37 +31,7 @@ extern unsigned short *irq_mask_register; | |||
31 | * PINT IRQs | 31 | * PINT IRQs |
32 | */ | 32 | */ |
33 | void init_IRQ_pint(void); | 33 | void init_IRQ_pint(void); |
34 | |||
35 | /* | ||
36 | * The shift value is now the number of bits to shift, not the number of | ||
37 | * bits/4. This is to make it easier to read the value directly from the | ||
38 | * datasheets. The IPR address, addr, will be set from ipr_idx via the | ||
39 | * map_ipridx_to_addr function. | ||
40 | */ | ||
41 | struct ipr_data { | ||
42 | unsigned int irq; | ||
43 | int ipr_idx; /* Index for the IPR registered */ | ||
44 | int shift; /* Number of bits to shift the data */ | ||
45 | int priority; /* The priority */ | ||
46 | unsigned int addr; /* Address of Interrupt Priority Register */ | ||
47 | }; | ||
48 | |||
49 | /* | ||
50 | * Given an IPR IDX, map the value to an IPR register address. | ||
51 | */ | ||
52 | unsigned int map_ipridx_to_addr(int idx); | ||
53 | |||
54 | /* | ||
55 | * Enable individual interrupt mode for external IPR IRQs. | ||
56 | */ | ||
57 | void ipr_irq_enable_irlm(void); | ||
58 | |||
59 | /* | ||
60 | * Function for "on chip support modules". | ||
61 | */ | ||
62 | void make_ipr_irq(struct ipr_data *table, unsigned int nr_irqs); | ||
63 | void make_imask_irq(unsigned int irq); | 34 | void make_imask_irq(unsigned int irq); |
64 | void init_IRQ_ipr(void); | ||
65 | 35 | ||
66 | static inline int generic_irq_demux(int irq) | 36 | static inline int generic_irq_demux(int irq) |
67 | { | 37 | { |