Skip to content

Commit

Permalink
ARM: rpc: make default fiq handler run-time installed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rob Herring committed Feb 21, 2012
1 parent 13a5045 commit 78cbaac
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-rpc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Object file lists.

obj-y := dma.o irq.o riscpc.o
obj-y := dma.o fiq.o irq.o riscpc.o
obj-m :=
obj-n :=
obj- :=
Expand Down
16 changes: 16 additions & 0 deletions arch/arm/mach-rpc/fiq.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <linux/linkage.h>
#include <asm/assembler.h>
#include <mach/hardware.h>
#include <mach/entry-macro.S>

.text

.global rpc_default_fiq_end
ENTRY(rpc_default_fiq_start)
mov r12, #ioc_base_high
.if ioc_base_low
orr r12, r12, #ioc_base_low
.endif
strb r12, [r12, #0x38] @ Disable FIQ register
subs pc, lr, #4
rpc_default_fiq_end:
6 changes: 6 additions & 0 deletions arch/arm/mach-rpc/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <asm/mach/irq.h>
#include <asm/hardware/iomd.h>
#include <asm/irq.h>
#include <asm/fiq.h>

static void iomd_ack_irq_a(struct irq_data *d)
{
Expand Down Expand Up @@ -112,6 +113,8 @@ static struct irq_chip iomd_fiq_chip = {
.irq_unmask = iomd_unmask_irq_fiq,
};

extern unsigned char rpc_default_fiq_start, rpc_default_fiq_end;

void __init rpc_init_irq(void)
{
unsigned int irq, flags;
Expand All @@ -121,6 +124,9 @@ void __init rpc_init_irq(void)
iomd_writeb(0, IOMD_FIQMASK);
iomd_writeb(0, IOMD_DMAMASK);

set_fiq_handler(&rpc_default_fiq_start,
&rpc_default_fiq_end - &rpc_default_fiq_start);

for (irq = 0; irq < NR_IRQS; irq++) {
flags = IRQF_VALID;

Expand Down

0 comments on commit 78cbaac

Please sign in to comment.