diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-04-22 17:26:26 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-04-26 15:45:06 -0400 |
commit | deac3d874ea1e1ef50604cec33ddfb01edb0c976 (patch) | |
tree | 7524fce14d00fb8d76cb56ac453f36517889d3fd /arch/arm/plat-orion/irq.c | |
parent | 0180ed45da5198e0e7362c56b3a107d3278666f6 (diff) |
ARM: orion: switch to a per-platform handle_irq() function
Moving to the Device Tree implies having CONFIG_MULTI_IRQ_HANDLER
enabled, even for non-DT platforms (if we want both DT and non-DT
platforms to be supported in a single kernel).
However, the common CONFIG_MULTI_IRQ_HANDLER handler for non-DT
platforms in plat-orion/irq.c doesn't match the needs of
Orion5x. Also, it doesn't make much sense for orion_irq_init() to
register the multi-IRQ handler: orion_irq_init() is called once for
each IRQ cause/mask tuple, while the multi-IRQ handler only needs to
be registered once.
To solve this problem, we move the multi-IRQ handle in per-platform
code: mach-kirkwood/irq.c and mach-dove/irq.c. The Orion5x variant
will be introduced in a followup commit. Of course, this code will
ultimately be completely removed once all boards are converted to the
Device Tree.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Link: https://lkml.kernel.org/r/1398202002-28530-23-git-send-email-thomas.petazzoni@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch/arm/plat-orion/irq.c')
-rw-r--r-- | arch/arm/plat-orion/irq.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/arch/arm/plat-orion/irq.c b/arch/arm/plat-orion/irq.c index 807df142444b..27ec18b53595 100644 --- a/arch/arm/plat-orion/irq.c +++ b/arch/arm/plat-orion/irq.c | |||
@@ -20,47 +20,6 @@ | |||
20 | #include <plat/orion-gpio.h> | 20 | #include <plat/orion-gpio.h> |
21 | #include <mach/bridge-regs.h> | 21 | #include <mach/bridge-regs.h> |
22 | 22 | ||
23 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
24 | /* | ||
25 | * Compiling with both non-DT and DT support enabled, will | ||
26 | * break asm irq handler used by non-DT boards. Therefore, | ||
27 | * we provide a C-style irq handler even for non-DT boards, | ||
28 | * if MULTI_IRQ_HANDLER is set. | ||
29 | * | ||
30 | * Notes: | ||
31 | * - this is prepared for Kirkwood and Dove only, update | ||
32 | * accordingly if you add Orion5x or MV78x00. | ||
33 | * - Orion5x uses different macro names and has only one | ||
34 | * set of CAUSE/MASK registers. | ||
35 | * - MV78x00 uses the same macro names but has a third | ||
36 | * set of CAUSE/MASK registers. | ||
37 | * | ||
38 | */ | ||
39 | |||
40 | static void __iomem *orion_irq_base = IRQ_VIRT_BASE; | ||
41 | |||
42 | asmlinkage void | ||
43 | __exception_irq_entry orion_legacy_handle_irq(struct pt_regs *regs) | ||
44 | { | ||
45 | u32 stat; | ||
46 | |||
47 | stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_LOW_OFF); | ||
48 | stat &= readl_relaxed(orion_irq_base + IRQ_MASK_LOW_OFF); | ||
49 | if (stat) { | ||
50 | unsigned int hwirq = __fls(stat); | ||
51 | handle_IRQ(hwirq, regs); | ||
52 | return; | ||
53 | } | ||
54 | stat = readl_relaxed(orion_irq_base + IRQ_CAUSE_HIGH_OFF); | ||
55 | stat &= readl_relaxed(orion_irq_base + IRQ_MASK_HIGH_OFF); | ||
56 | if (stat) { | ||
57 | unsigned int hwirq = 32 + __fls(stat); | ||
58 | handle_IRQ(hwirq, regs); | ||
59 | return; | ||
60 | } | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) | 23 | void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) |
65 | { | 24 | { |
66 | struct irq_chip_generic *gc; | 25 | struct irq_chip_generic *gc; |
@@ -78,10 +37,6 @@ void __init orion_irq_init(unsigned int irq_start, void __iomem *maskaddr) | |||
78 | ct->chip.irq_unmask = irq_gc_mask_set_bit; | 37 | ct->chip.irq_unmask = irq_gc_mask_set_bit; |
79 | irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE, | 38 | irq_setup_generic_chip(gc, IRQ_MSK(32), IRQ_GC_INIT_MASK_CACHE, |
80 | IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); | 39 | IRQ_NOREQUEST, IRQ_LEVEL | IRQ_NOPROBE); |
81 | |||
82 | #ifdef CONFIG_MULTI_IRQ_HANDLER | ||
83 | set_handle_irq(orion_legacy_handle_irq); | ||
84 | #endif | ||
85 | } | 40 | } |
86 | 41 | ||
87 | #ifdef CONFIG_OF | 42 | #ifdef CONFIG_OF |