diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-15 00:13:52 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-15 00:13:52 -0400 |
commit | dc825b17904a06bbd2f79d720b23156e4c01a22f (patch) | |
tree | 8f1e13b850a06264530f1f1bb680a541e73cef34 /include/linux/sh_intc.h | |
parent | fecf066c2d2fbc7e6a7e7e3a5af772a165bdd7b0 (diff) |
sh: intc: IRQ auto-distribution support.
This implements support for hardware-managed IRQ balancing as implemented
by SH-X3 cores (presently only hooked up for SH7786, but can probably be
carried over to other SH-X3 cores, too).
CPUs need to specify their distribution register along with the mask
definitions, as these follow the same format. Peripheral IRQs that don't
opt out of balancing will be automatically distributed at the whim of the
hardware block, while each CPU needs to verify whether it is handling the
IRQ or not, especially before clearing the mask.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/linux/sh_intc.h')
-rw-r--r-- | include/linux/sh_intc.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index f0e8cca199c7..0d6cd38e673d 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -23,6 +23,9 @@ struct intc_group { | |||
23 | struct intc_mask_reg { | 23 | struct intc_mask_reg { |
24 | unsigned long set_reg, clr_reg, reg_width; | 24 | unsigned long set_reg, clr_reg, reg_width; |
25 | intc_enum enum_ids[32]; | 25 | intc_enum enum_ids[32]; |
26 | #ifdef CONFIG_INTC_BALANCING | ||
27 | unsigned long dist_reg; | ||
28 | #endif | ||
26 | #ifdef CONFIG_SMP | 29 | #ifdef CONFIG_SMP |
27 | unsigned long smp; | 30 | unsigned long smp; |
28 | #endif | 31 | #endif |
@@ -41,8 +44,14 @@ struct intc_sense_reg { | |||
41 | intc_enum enum_ids[16]; | 44 | intc_enum enum_ids[16]; |
42 | }; | 45 | }; |
43 | 46 | ||
47 | #ifdef CONFIG_INTC_BALANCING | ||
48 | #define INTC_SMP_BALANCING(reg) .dist_reg = (reg) | ||
49 | #else | ||
50 | #define INTC_SMP_BALANCING(reg) | ||
51 | #endif | ||
52 | |||
44 | #ifdef CONFIG_SMP | 53 | #ifdef CONFIG_SMP |
45 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) | 54 | #define INTC_SMP(stride, nr) .smp = (stride) | ((nr) << 8) |
46 | #else | 55 | #else |
47 | #define INTC_SMP(stride, nr) | 56 | #define INTC_SMP(stride, nr) |
48 | #endif | 57 | #endif |