Commit 78cbaaca6908c2ddf1bd26cf58c408938654e3d8

Authored by Rob Herring
1 parent 13a5045d4e

ARM: rpc: make default fiq handler run-time installed

Only rpc uses disable_fiq macro. Change it to a run-time installed
default FIQ handler. The handler is installed before FIQ is enabled
so the behavior should be unchanged.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Nicolas Pitre <nico@linaro.org>

Showing 3 changed files with 23 additions and 1 deletions Side-by-side Diff

arch/arm/mach-rpc/Makefile
... ... @@ -4,7 +4,7 @@
4 4  
5 5 # Object file lists.
6 6  
7   -obj-y := dma.o irq.o riscpc.o
  7 +obj-y := dma.o fiq.o irq.o riscpc.o
8 8 obj-m :=
9 9 obj-n :=
10 10 obj- :=
arch/arm/mach-rpc/fiq.S
  1 +#include <linux/linkage.h>
  2 +#include <asm/assembler.h>
  3 +#include <mach/hardware.h>
  4 +#include <mach/entry-macro.S>
  5 +
  6 + .text
  7 +
  8 + .global rpc_default_fiq_end
  9 +ENTRY(rpc_default_fiq_start)
  10 + mov r12, #ioc_base_high
  11 + .if ioc_base_low
  12 + orr r12, r12, #ioc_base_low
  13 + .endif
  14 + strb r12, [r12, #0x38] @ Disable FIQ register
  15 + subs pc, lr, #4
  16 +rpc_default_fiq_end:
arch/arm/mach-rpc/irq.c
... ... @@ -5,6 +5,7 @@
5 5 #include <asm/mach/irq.h>
6 6 #include <asm/hardware/iomd.h>
7 7 #include <asm/irq.h>
  8 +#include <asm/fiq.h>
8 9  
9 10 static void iomd_ack_irq_a(struct irq_data *d)
10 11 {
... ... @@ -112,6 +113,8 @@
112 113 .irq_unmask = iomd_unmask_irq_fiq,
113 114 };
114 115  
  116 +extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;
  117 +
115 118 void __init rpc_init_irq(void)
116 119 {
117 120 unsigned int irq, flags;
... ... @@ -120,6 +123,9 @@
120 123 iomd_writeb(0, IOMD_IRQMASKB);
121 124 iomd_writeb(0, IOMD_FIQMASK);
122 125 iomd_writeb(0, IOMD_DMAMASK);
  126 +
  127 + set_fiq_handler(&rpc_default_fiq_start,
  128 + &rpc_default_fiq_end - &rpc_default_fiq_start);
123 129  
124 130 for (irq = 0; irq < NR_IRQS; irq++) {
125 131 flags = IRQF_VALID;